]> git.saurik.com Git - wxWidgets.git/commitdiff
don't use TPM_RECURSE under NT4, it results in TrackPopupMenu() not showing the menu...
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 23 Mar 2007 16:20:30 +0000 (16:20 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 23 Mar 2007 16:20:30 +0000 (16:20 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45038 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/changes.txt
src/msw/window.cpp

index fd3c6af7ff0f1718c1a502548114c14015b32970..7b346adec983edd43a2405cbdf1d4017b2658af5 100644 (file)
@@ -107,6 +107,16 @@ wxMSW:
 - Return the restored window size from GetSize() when window is minimized.
 
 
+2.8.4
+-----
+
+wxMSW:
+
+- Corrected wxStaticBox label appearance when its foreground colour was set:
+  it didn't respect font size nor background colour then (Juan Antonio Ortega)
+- Fixed popup menus under Windows NT 4
+
+
 2.8.3
 -----
 
index e04a5e4b60fcf8e028a8baf56ffbe35830be57a3..b66358af13dd1d667df7279493a63075c7389e13 100644 (file)
@@ -2043,10 +2043,22 @@ bool wxWindowMSW::DoPopupMenu(wxMenu *menu, int x, int y)
     ::ClientToScreen(hWnd, &point);
     wxCurrentPopupMenu = menu;
 #if defined(__WXWINCE__)
-    UINT flags = 0;
-#else
-    UINT flags = TPM_RIGHTBUTTON | TPM_RECURSE;
-#endif
+    static const UINT flags = 0;
+#else // !__WXWINCE__
+    UINT flags = TPM_RIGHTBUTTON;
+    // NT4 doesn't support TPM_RECURSE and simply doesn't show the menu at all
+    // when it's use, I'm not sure about Win95/98 but prefer to err on the safe
+    // side and not to use it there neither -- modify the test if it does work
+    // on these systems
+    if ( wxGetWinVersion() >= wxWinVersion_5 )
+    {
+        // using TPM_RECURSE allows us to show a popup menu while another menu
+        // is opened which can be useful and is supported by the other
+        // platforms, so allow it under Windows too
+        flags |= TPM_RECURSE;
+    }
+#endif // __WXWINCE__/!__WXWINCE__
+
     ::TrackPopupMenu(hMenu, flags, point.x, point.y, 0, hWnd, NULL);
 
     // we need to do it right now as otherwise the events are never going to be