-// m_windowStyle |= wxTAB_TRAVERSAL;
-//
-// WXDWORD extendedStyle = MakeExtendedStyle(m_windowStyle);
-// if (m_windowStyle & wxSTAY_ON_TOP)
-// extendedStyle |= WS_EX_TOPMOST;
-//
- // Allows creation of dialogs with & without captions under MSWindows,
- // resizeable or not (but a resizeable dialog always has caption -
- // otherwise it would look too strange)
-// const wxChar *dlg;
-// if ( style & wxRESIZE_BORDER )
-// dlg = wxT("wxResizeableDialog");
-// else if ( style & wxCAPTION )
-// dlg = wxT("wxCaptionDialog");
-// else
-// dlg = wxT("wxNoCaptionDialog");
-// MSWCreate(m_windowId, parent, NULL, this, NULL,
-// x, y, width, height,
-// 0, // style is not used if we have dlg template
-// dlg,
-// extendedStyle);
-//
-// HWND hwnd = (HWND)GetHWND();
-//
-// if ( !hwnd )
-// {
-// wxLogError(wxT("Failed to create dialog."));
-//
-// return FALSE;
-// }
-//
-// SubclassWin(GetHWND());
-//
-// SetWindowText(hwnd, title);
-// SetFont(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT));
-//
+ //
+ lStyle |= wxTAB_TRAVERSAL;
+
+ if (!wxTopLevelWindow::Create( pParent
+ ,vId
+ ,rsTitle
+ ,rPos
+ ,rSize
+ ,lStyle
+ ,rsName
+ ))
+ return FALSE;
+ SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT));
+
+ //
+ // Must defer setting the title until after dialog is created and sized
+ //
+ if (!rsTitle.IsNull())
+ SetTitle(rsTitle);