X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/39d2f9a7c866338762ca974209219f40d4420af6..75299490cde1b98fce6b452564b535da03d88c79:/src/msw/toplevel.cpp diff --git a/src/msw/toplevel.cpp b/src/msw/toplevel.cpp index 6bc345507e..76363e5dc7 100644 --- a/src/msw/toplevel.cpp +++ b/src/msw/toplevel.cpp @@ -17,7 +17,7 @@ // headers // ---------------------------------------------------------------------------- -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "toplevel.h" #endif @@ -43,7 +43,9 @@ #include "wx/msw/private.h" #include "wx/msw/winundef.h" -#ifdef CreateDialog +// This can't be undefed in winundef.h or +// there are further errors +#if defined(__WXWINCE__) && defined(CreateDialog) #undef CreateDialog #endif @@ -345,10 +347,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 +910,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 ) {