Fix for coordinates in wxEVT_COMMAND_LIST_COL_RIGHT_CLICK [patch #1019696] with test code in the sample.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29013 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2004-09-03 14:35:45 +00:00
parent 143318ddbb
commit 77ace0c533
2 changed files with 6 additions and 1 deletions

View File

@@ -686,6 +686,11 @@ void MyListCtrl::OnColRightClick(wxListEvent& event)
SetColumnImage(col, -1);
}
// Show popupmenu at position
wxMenu menu(wxT("Test"));
menu.Append(LIST_ABOUT, _T("&About"));
PopupMenu(&menu, event.GetPoint());
wxLogMessage( wxT("OnColumnRightClick at %d."), event.GetColumn() );
}

View File

@@ -1743,7 +1743,7 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
wxLogLastError(_T("GetCursorPos"));
}
if ( !::ScreenToClient(hwndHdr, &ptClick) )
if ( !::ScreenToClient(GetHwnd(), &ptClick) )
{
wxLogLastError(_T("ScreenToClient(listctrl header)"));
}