]> git.saurik.com Git - wxWidgets.git/commitdiff
synthesize NM_RCLICK ourselves now that def window proc doesn't do it as we don't...
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 6 Apr 2005 22:34:43 +0000 (22:34 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 6 Apr 2005 22:34:43 +0000 (22:34 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33397 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/treectrl.cpp

index b065b3157200afe1172c0a1f817dc3bacea585cc..10d4f48857a416c337f742110e6cab6f24fae78e 100644 (file)
@@ -2550,6 +2550,22 @@ wxTreeCtrl::MSWDefWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
     if ( nMsg == WM_RBUTTONDOWN )
         return 0;
 
+    // but because of the above we don't get NM_RCLICK which is normally
+    // generated by tree window proc when the modal loop mentioned above ends
+    // because the mouse is released -- synthesize it ourselves instead
+    if ( nMsg == WM_RBUTTONUP )
+    {
+        NMHDR hdr;
+        hdr.hwndFrom = GetHwnd();
+        hdr.idFrom = GetId();
+        hdr.code = NM_RCLICK;
+
+        WXLPARAM rc;
+        MSWOnNotify(GetId(), (LPARAM)&hdr, &rc);
+
+        // continue as usual
+    }
+
     if ( nMsg == WM_CHAR )
     {
         // also don't let the control process Space and Return keys because it