X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e6ba3fd4b7a04756333f79467825613b400e987e..2cc78389312dce6285d0d6b6e891d24372252ada:/src/msw/dialog.cpp

diff --git a/src/msw/dialog.cpp b/src/msw/dialog.cpp
index ee00bfd5de..bc03783404 100644
--- a/src/msw/dialog.cpp
+++ b/src/msw/dialog.cpp
@@ -170,12 +170,30 @@ bool wxDialog::Create(wxWindow *parent,
         dlg = wxT("wxCaptionDialog");
     else
         dlg = wxT("wxNoCaptionDialog");
+
+#ifdef __WXMICROWIN__
+    extern const wxChar *wxFrameClassName;
+    
+    int msflags = WS_OVERLAPPED|WS_POPUP;
+    if (style & wxCAPTION)
+        msflags |= WS_CAPTION;
+    if (style & wxCLIP_CHILDREN)
+        msflags |= WS_CLIPCHILDREN;
+    if ((style & wxTHICK_FRAME) == 0)
+      msflags |= WS_BORDER;
+    MSWCreate(m_windowId, parent, wxFrameClassName, this, NULL,
+              x, y, width, height,
+              msflags,
+              NULL,
+              extendedStyle);
+
+#else
     MSWCreate(m_windowId, parent, NULL, this, NULL,
               x, y, width, height,
               0, // style is not used if we have dlg template
               dlg,
               extendedStyle);
-
+#endif
     HWND hwnd = (HWND)GetHWND();
 
     if ( !hwnd )
@@ -185,8 +203,10 @@ bool wxDialog::Create(wxWindow *parent,
         return FALSE;
     }
 
+#ifndef __WXMICROWIN__
     SubclassWin(GetHWND());
-
+#endif
+    
     SetWindowText(hwnd, title);
 
     return TRUE;
@@ -194,6 +214,7 @@ bool wxDialog::Create(wxWindow *parent,
 
 bool wxDialog::EnableCloseButton(bool enable)
 {
+#ifndef __WXMICROWIN__
     // get system (a.k.a. window) menu
     HMENU hmenu = ::GetSystemMenu(GetHwnd(), FALSE /* get it */);
     if ( !hmenu )
@@ -218,7 +239,8 @@ bool wxDialog::EnableCloseButton(bool enable)
     {
         wxLogLastError(_T("DrawMenuBar"));
     }
-
+#endif
+    
     return TRUE;
 }