-bool wxWindow::PopupMenu(wxMenu *menu, int x, int y)
-{
- menu->SetInvokingWindow(this);
- menu->UpdateUI();
-
- HWND hWnd = (HWND) GetHWND();
- HMENU hMenu = (HMENU)menu->GetHMenu();
- POINT point;
- point.x = x;
- point.y = y;
- ::ClientToScreen(hWnd, &point);
- wxCurrentPopupMenu = menu;
- ::TrackPopupMenu(hMenu, TPM_RIGHTBUTTON, point.x, point.y, 0, hWnd, NULL);
- wxYield();
- wxCurrentPopupMenu = NULL;
-
- menu->SetInvokingWindow(NULL);
-
- return TRUE;
-}
-