+#if 0 // now that we got owner window right it doesn't seem to be needed
+ case WM_ACTIVATE:
+ switch ( LOWORD(wParam) )
+ {
+ case WA_ACTIVE:
+ case WA_CLICKACTIVE:
+ if ( IsModalShowing() && GetParent() )
+ {
+ // bring the owner window to top as the standard dialog
+ // boxes do
+ if ( !::SetWindowPos
+ (
+ GetHwndOf(GetParent()),
+ GetHwnd(),
+ 0, 0,
+ 0, 0,
+ SWP_NOACTIVATE |
+ SWP_NOMOVE |
+ SWP_NOSIZE
+ ) )
+ {
+ wxLogLastError(wxT("SetWindowPos(SWP_NOACTIVATE)"));
+ }
+ }
+ // fall through to process it normally as well
+ }
+ break;
+#endif // 0
+
+ case WM_CLOSE:
+ // if we can't close, tell the system that we processed the
+ // message - otherwise it would close us
+ processed = !Close();
+ break;
+
+#ifndef __WXMICROWIN__
+ case WM_SETCURSOR:
+ // we want to override the busy cursor for modal dialogs:
+ // typically, wxBeginBusyCursor() is called and then a modal dialog
+ // is shown, but the modal dialog shouldn't have hourglass cursor
+ if ( IsModalShowing() && wxIsBusy() )
+ {
+ // set our cursor for all windows (but see below)
+ wxCursor cursor = m_cursor;
+ if ( !cursor.Ok() )
+ cursor = wxCURSOR_ARROW;
+
+ ::SetCursor(GetHcursorOf(cursor));
+
+ // in any case, stop here and don't let wxWindow process this
+ // message (it would set the busy cursor)
+ processed = TRUE;
+
+ // but return FALSE to tell the child window (if the event
+ // comes from one of them and not from ourselves) that it can
+ // set its own cursor if it has one: thus, standard controls
+ // (e.g. text ctrl) still have correct cursors in a dialog
+ // invoked while wxIsBusy()
+ rc = FALSE;
+ }
+ break;
+#endif // __WXMICROWIN__