+ // 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 & wxTHICK_FRAME )
+ dlg = _T("wxResizeableDialog");
+ else if ( style & wxCAPTION )
+ dlg = _T("wxCaptionDialog");
+ else
+ dlg = _T("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;