]>
git.saurik.com Git - wxWidgets.git/blob - src/os2/popupwin.cpp
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: src/os2/popupwin.cpp
3 // Purpose: implements wxPopupWindow for OS2
4 // Author: Dave Webster
7 // Copyright: (c) 2002 Dave Webster <dwebster@bhmi.com>
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
11 // ============================================================================
13 // ============================================================================
15 // ----------------------------------------------------------------------------
17 // ----------------------------------------------------------------------------
19 // For compilers that support precompilation, includes "wx.h".
20 #include "wx/wxprec.h"
27 #include "wx/popupwin.h"
29 // ============================================================================
31 // ============================================================================
33 bool wxPopupWindow::Create( wxWindow
* pParent
,
36 return wxPopupWindowBase::Create(pParent
) &&
37 wxWindow::Create( pParent
41 ,nFlags
| wxPOPUP_WINDOW
43 } // end of wxPopupWindow::Create
45 void wxPopupWindow::DoGetPosition( int* pnX
,
49 // The position of a "top level" window such as this should be in
50 // screen coordinates, not in the client ones which MSW gives us
51 // (because we are a child window)
53 wxPopupWindowBase::DoGetPosition(pnX
, pnY
);
54 GetParent()->ClientToScreen(pnX
, pnY
);
55 } // end of wxPopupWindow::DoGetPosition
57 WXHWND
wxPopupWindow::OS2GetParent() const
59 // we must be a child of the desktop to be able to extend beyond the parent
60 // window client area (like the comboboxes drop downs do)
62 return (WXHWND
)HWND_DESKTOP
;
63 } // end of wxPopupWindow::OS2GetParent
65 WXDWORD
wxPopupWindow::OS2GetStyle( long lFlags
,
66 WXDWORD
* dwExstyle
) const
68 WXDWORD dwStyle
= wxWindow::OS2GetStyle( lFlags
& wxBORDER_MASK
73 } // end of wxPopupWindow::OS2GetStyle