X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ed4eede6c2c16cdb422a39c1b3655956b8f51a1c..5e533062fad19cba1c101abfb967141766dd176b:/src/msw/treectrl.cpp diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp index b065b31572..10d4f48857 100644 --- a/src/msw/treectrl.cpp +++ b/src/msw/treectrl.cpp @@ -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