]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/toplevel.cpp
restored custom drawing (was accidentally disabled by the last 2 commits)
[wxWidgets.git] / src / msw / toplevel.cpp
index 6bc345507ea02864d3b4ee15dbcb685d4f745a1d..a59da317aba5ec5589686aeff6c61da105cd27aa 100644 (file)
 #include "wx/msw/private.h"
 #include "wx/msw/winundef.h"
 
-#ifdef CreateDialog
-#undef CreateDialog
-#endif
-
 #include "wx/display.h"
 
 #ifndef ICON_BIG
@@ -345,10 +341,12 @@ bool wxTopLevelWindowMSW::CreateDialog(const void *dlgTemplate,
     if ( exflags )
     {
         ::SetWindowLong(GetHwnd(), GWL_EXSTYLE, exflags);
-        ::SetWindowPos(GetHwnd(), NULL, 0, 0, 0, 0,
+        ::SetWindowPos(GetHwnd(),
+                       exflags & WS_EX_TOPMOST ? HWND_TOPMOST : 0,
+                       0, 0, 0, 0,
                        SWP_NOSIZE |
                        SWP_NOMOVE |
-                       SWP_NOZORDER |
+                       (exflags & WS_EX_TOPMOST ? 0 : SWP_NOZORDER) |
                        SWP_NOACTIVATE);
     }
 
@@ -906,7 +904,10 @@ void wxTopLevelWindowMSW::OnActivate(wxActivateEvent& event)
 
 // the DialogProc for all wxWindows dialogs
 LONG APIENTRY _EXPORT
-wxDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
+wxDlgProc(HWND WXUNUSED(hDlg),
+          UINT message,
+          WPARAM WXUNUSED(wParam),
+          LPARAM WXUNUSED(lParam))
 {
     switch ( message )
     {