// Created: 10/12/99
// RCS-ID: $Id$
// Copyright: (c) David Webster
-// Licence: wxWidgets licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
//
BEGIN_EVENT_TABLE(wxWindowOS2, wxWindowBase)
EVT_ERASE_BACKGROUND(wxWindowOS2::OnEraseBackground)
EVT_SYS_COLOUR_CHANGED(wxWindowOS2::OnSysColourChanged)
- EVT_INIT_DIALOG(wxWindowOS2::OnInitDialog)
EVT_IDLE(wxWindowOS2::OnIdle)
EVT_SET_FOCUS(wxWindowOS2::OnSetFocus)
END_EVENT_TABLE()
pMenu->SetInvokingWindow(this);
pMenu->UpdateUI();
-
- DoClientToScreen( &nX
- ,&nY
- );
+
+ if ( x == -1 && y == -1 )
+ {
+ wxPoint mouse = wxGetMousePosition();
+ nX = mouse.x; nY = mouse.y;
+ }
+ else
+ {
+ DoClientToScreen( &nX
+ ,&nY
+ );
+ }
wxCurrentPopupMenu = pMenu;
::WinPopupMenu( hWndParent
,vSwp.y - nDiff
,vSwp.cx
,vSwp.cy
- ,SWP_MOVE | SWP_SHOW | SWP_ZORDER
+ ,SWP_MOVE
);
::WinQueryWindowPos(GetHwndOf(pWin), pWin->GetSwp());
if (pWin->IsKindOf(CLASSINFO(wxRadioBox)))