]>
git.saurik.com Git - wxWidgets.git/blob - src/os2/popupwin.cpp
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: os2/popupwin.cpp
3 // Purpose: implements wxPopupWindow for OS2
4 // Author: Dave Webster
8 // Copyright: (c) 2002 Dave Webster <dwebster@bhmi.com>
9 // License: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
12 // ============================================================================
14 // ============================================================================
16 // ----------------------------------------------------------------------------
18 // ----------------------------------------------------------------------------
21 #pragma implementation "popup.h"
24 // For compilers that support precompilation, includes "wx.h".
25 #include "wx/wxprec.h"
31 #include "wx/popupwin.h"
33 // ============================================================================
35 // ============================================================================
37 bool wxPopupWindow::Create( wxWindow
* pParent
,
40 return wxPopupWindowBase::Create(pParent
) &&
41 wxWindow::Create( pParent
45 ,nFlags
| wxPOPUP_WINDOW
47 } // end of wxPopupWindow::Create
49 void wxPopupWindow::DoGetPosition( int* pnX
,
53 // The position of a "top level" window such as this should be in
54 // screen coordinates, not in the client ones which MSW gives us
55 // (because we are a child window)
57 wxPopupWindowBase::DoGetPosition(pnX
, pnY
);
58 GetParent()->ClientToScreen(pnX
, pnY
);
59 } // end of wxPopupWindow::DoGetPosition
61 WXHWND
wxPopupWindow::OS2GetParent() const
63 // we must be a child of the desktop to be able to extend beyond the parent
64 // window client area (like the comboboxes drop downs do)
66 return (WXHWND
)HWND_DESKTOP
;
67 } // end of wxPopupWindow::OS2GetParent
69 WXDWORD
wxPopupWindow::OS2GetStyle( long lFlags
,
70 WXDWORD
* dwExstyle
) const
72 WXDWORD dwStyle
= wxWindow::OS2GetStyle( lFlags
& wxBORDER_MASK
77 } // end of wxPopupWindow::OS2GetStyle