+ // 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 char *dlg;
+ if ( style & wxTHICK_FRAME )
+ dlg = "wxResizeableDialog";
+ else if ( style & wxCAPTION )
+ dlg = "wxCaptionDialog";
+ else
+ dlg = "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(_("Failed to create dialog."));
+
+ return FALSE;
+ }
+
+ SubclassWin(GetHWND());
+
+ SetWindowText(hwnd, title);
+ SetFont(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT));
+
+ return TRUE;