don't generate wxEVT_CONTEXT_MENU messages for right clicks in the list control header

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38644 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-04-10 01:17:49 +00:00
parent 2754877b7c
commit 777f37e0cc

View File

@@ -2695,15 +2695,26 @@ void wxListCtrl::OnPaint(wxPaintEvent& event)
WXLRESULT
wxListCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
{
#ifdef WM_PRINT
if ( nMsg == WM_PRINT )
switch ( nMsg )
{
// we should bypass our own WM_PRINT handling as we don't handle
// PRF_CHILDREN flag, so leave it to the native control itself
return MSWDefWindowProc(nMsg, wParam, lParam);
}
#ifdef WM_PRINT
case WM_PRINT:
// we should bypass our own WM_PRINT handling as we don't handle
// PRF_CHILDREN flag, so leave it to the native control itself
return MSWDefWindowProc(nMsg, wParam, lParam);
#endif // WM_PRINT
case WM_CONTEXTMENU:
// because this message is propagated upwards the child-parent
// chain, we get it for the right clicks on the header window but
// this is confusing in wx as right clicking there already
// generates a separate wxEVT_COMMAND_LIST_COL_RIGHT_CLICK event
// so just ignore them
if ( (HWND)wParam == ListView_GetHeader(GetHwnd()) )
return 0;
//else: break
}
return wxControl::MSWWindowProc(nMsg, wParam, lParam);
}