/////////////////////////////////////////////////////////////////////////////
-// Name: windows.cpp
+// Name: src/os2/window.cpp
// Purpose: wxWindow
// Author: David Webster
// Modified by:
::WinSetWindowPos(GetHwnd(), HWND_BOTTOM, 0, 0, 0, 0, SWP_ZORDER | SWP_DEACTIVATE);
} // end of wxWindowOS2::Lower
-void wxWindowOS2::SetTitle( const wxString& rTitle )
+void wxWindowOS2::SetLabel( const wxString& label )
{
- ::WinSetWindowText(GetHwnd(), (PSZ)rTitle.c_str());
-} // end of wxWindowOS2::SetTitle
+ ::WinSetWindowText(GetHwnd(), (PSZ)label.c_str());
+} // end of wxWindowOS2::SetLabel
-wxString wxWindowOS2::GetTitle() const
+wxString wxWindowOS2::GetLabel() const
{
return wxGetWindowText(GetHWND());
-} // end of wxWindowOS2::GetTitle
+} // end of wxWindowOS2::GetLabel
void wxWindowOS2::DoCaptureMouse()
{
::WinSetCapture(HWND_DESKTOP, hWnd);
m_bWinCaptured = true;
}
-} // end of wxWindowOS2::GetTitle
+} // end of wxWindowOS2::DoCaptureMouse
void wxWindowOS2::DoReleaseMouse()
{
hPS = ::WinGetPS(GetHwnd());
- l = rString.Length();
+ l = rString.length();
if (l > 0L)
{
pStr = (PCH)rString.c_str();
//
// In world coordinates.
//
- bRc = ::GpiQueryTextBox( hPS
- ,l
- ,pStr
- ,TXTBOX_COUNT // return maximum information
- ,avPoint // array of coordinates points
- );
+ bRc = ::GpiQueryTextBox( hPS,
+ l,
+ pStr,
+ TXTBOX_COUNT,// return maximum information
+ avPoint // array of coordinates points
+ );
if (bRc)
{
vPtMin.x = avPoint[0].x;
// ---------------------------------------------------------------------------
//
#if wxUSE_MENUS_NATIVE
-bool wxWindowOS2::DoPopupMenu( wxMenu* pMenu,
- int nX,
- int nY )
+bool wxWindowOS2::DoPopupMenu( wxMenu* pMenu, int nX, int nY )
{
HWND hWndOwner = GetHwnd();
HWND hWndParent = GetHwnd();
switch(pSwp->fl)
{
case SWP_MAXIMIZE:
-#if !(defined(__WATCOMC__) && __WATCOMC__ < 1240 )
-// Open Watcom 1.3 had incomplete headers
-// that's reported and should be fixed for OW 1.4
::WinGetMaxPosition(GetHwnd(), pSwp);
m_maxWidth = pSwp->cx;
m_maxHeight = pSwp->cy;
-#endif
break;
case SWP_MINIMIZE:
-#if !(defined(__WATCOMC__) && __WATCOMC__ < 1240 )
-// Open Watcom 1.3 had incomplete headers
-// that's reported and should be fixed for OW 1.4
::WinGetMinPosition(GetHwnd(), pSwp, &vPoint);
m_minWidth = pSwp->cx;
m_minHeight = pSwp->cy;
-#else
- wxUnusedVar(vPoint);
-#endif
break;
default:
// ---------------------------------------------------------------------------
// mouse events
// ---------------------------------------------------------------------------
-//TODO!!! check against MSW
+//TODO: check against MSW
void wxWindowOS2::InitMouseEvent(
wxMouseEvent& rEvent
, int nX
wxWindow* wxFindWindowAtPoint(const wxPoint& rPt)
{
- POINTL vPt2;
+ POINTL vPt2;
vPt2.x = rPt.x;
vPt2.y = rPt.y;
- HWND hWndHit = ::WinWindowFromPoint(HWND_DESKTOP, &vPt2, FALSE);
- wxWindow* pWin = wxFindWinFromHandle((WXHWND)hWndHit) ;
- HWND hWnd = hWndHit;
+ HWND hWndHit = ::WinWindowFromPoint(HWND_DESKTOP, &vPt2, FALSE);
+ wxWindow* pWin = wxFindWinFromHandle((WXHWND)hWndHit) ;
+ HWND hWnd = hWndHit;
//
// Try to find a window with a wxWindow associated with it