-// 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));
-//
- return TRUE;
+ //
+ 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);
+ return true;
+} // end of wxDialog::Create
+
+#if WXWIN_COMPATIBILITY_2_6
+
+// deprecated ctor
+wxDialog::wxDialog(wxWindow *parent,
+ const wxString& title,
+ bool WXUNUSED(modal),
+ int x,
+ int y,
+ int w,
+ int h,
+ long style,
+ const wxString& name)
+{
+ Init();
+
+ Create(parent, wxID_ANY, title, wxPoint(x, y), wxSize(w, h), style, name);