]>
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 // ----------------------------------------------------------------------------
20 // For compilers that support precompilation, includes "wx.h".
21 #include "wx/wxprec.h"
28 #include "wx/popupwin.h"
30 // ============================================================================
32 // ============================================================================
34 bool wxPopupWindow::Create( wxWindow
* pParent
,
37 return wxPopupWindowBase::Create(pParent
) &&
38 wxWindow::Create( pParent
42 ,nFlags
| wxPOPUP_WINDOW
44 } // end of wxPopupWindow::Create
46 void wxPopupWindow::DoGetPosition( int* pnX
,
50 // The position of a "top level" window such as this should be in
51 // screen coordinates, not in the client ones which MSW gives us
52 // (because we are a child window)
54 wxPopupWindowBase::DoGetPosition(pnX
, pnY
);
55 GetParent()->ClientToScreen(pnX
, pnY
);
56 } // end of wxPopupWindow::DoGetPosition
58 WXHWND
wxPopupWindow::OS2GetParent() const
60 // we must be a child of the desktop to be able to extend beyond the parent
61 // window client area (like the comboboxes drop downs do)
63 return (WXHWND
)HWND_DESKTOP
;
64 } // end of wxPopupWindow::OS2GetParent
66 WXDWORD
wxPopupWindow::OS2GetStyle( long lFlags
,
67 WXDWORD
* dwExstyle
) const
69 WXDWORD dwStyle
= wxWindow::OS2GetStyle( lFlags
& wxBORDER_MASK
74 } // end of wxPopupWindow::OS2GetStyle