#include "wx/log.h"
#include "wx/intl.h"
#include "wx/frame.h"
+ #include "wx/control.h"
#endif //WX_PRECOMP
#include "wx/os2/private.h"
wxWindowList wxModelessWindows;
// the name of the default wxWindows class
-extern const wxChar* wxCanvasClassName;
-extern const wxChar* wxFrameClassName;
+extern void wxAssociateWinWithHandle( HWND hWnd
+ ,wxWindowOS2* pWin
+ );
// ============================================================================
// wxTopLevelWindowMSW implementation
}
HWND hWndDlg;
- HWND hWndParent;
+ HWND hWndOwner;
if (pParent)
- hWndParent = GetHwndOf(pParent);
+ hWndOwner = GetHwndOf(pParent);
else
- hWndParent = HWND_DESKTOP;
+ hWndOwner = HWND_DESKTOP;
- hWndDlg = ::WinLoadDlg( hWndParent
- ,hWndParent
+ hWndDlg = ::WinLoadDlg( HWND_DESKTOP
+ ,hWndOwner
,(PFNWP)wxDlgProc
,NULL
,(ULONG)ulDlgTemplate
,nHeight
,SWP_MOVE | SWP_SIZE | SWP_ZORDER | SWP_SHOW
);
- if (!rsTitle.IsNull())
- {
- ::WinSetWindowText(GetHwnd(), rsTitle.c_str());
- }
SubclassWin(m_hWnd);
return TRUE;
} // end of wxTopLevelWindowOS2::CreateDialog
wxAssociateWinWithHandle(m_hWnd, this);
wxAssociateWinWithHandle(m_hFrame, this);
- m_backgroundColour.Set(wxString("GREY"));
+ m_backgroundColour.Set(wxString("MEDIUM GREY"));
LONG lColor = (LONG)m_backgroundColour.GetPixel();
wxLogError("Error sizing frame. Error: %s\n", sError);
return FALSE;
}
+ lStyle = ::WinQueryWindowULong( m_hWnd
+ ,QWL_STYLE
+ );
+ lStyle |= WS_CLIPCHILDREN;
+ ::WinSetWindowULong( m_hWnd
+ ,QWL_STYLE
+ ,lStyle
+ );
return TRUE;
} // end of wxTopLevelWindowOS2::CreateFrame
::WinQueryWindowPos(GetHwnd(), &m_vSwpClient);
} // end of wxTopLevelWindowOS2::AlterChildPos
+void wxTopLevelWindowOS2::UpdateInternalSize(
+ wxWindow* pChild
+, int nHeight
+)
+{
+ pChild->MoveChildren(m_vSwpClient.cy - nHeight);
+ ::WinQueryWindowPos(GetHwnd(), &m_vSwpClient);
+} // end of wxTopLevelWindowOS2::UpdateInternalSize
+
// ----------------------------------------------------------------------------
// wxTopLevelWindowOS2 client size
// ----------------------------------------------------------------------------
int nShowCmd
)
{
- ::WinShowWindow(m_hFrame, (BOOL)nShowCmd);
+ ::WinShowWindow(m_hFrame, (BOOL)(nShowCmd & SWP_SHOW));
m_bIconized = nShowCmd == SWP_MINIMIZE;
} // end of wxTopLevelWindowOS2::DoShowWindow
{
if (m_bMaximizeOnShow)
{
- nShowCmd = SWP_SHOW;
+ nShowCmd = SWP_MAXIMIZE;
m_bMaximizeOnShow = FALSE;
}
else
{
- nShowCmd = SWP_HIDE;
+ nShowCmd = SWP_SHOW;
}
}
else // hide