bool wxFrame::MSWOnPaint(void)
{
-#if WXDEBUG > 1
- wxDebugMsg("wxFrameWnd::OnPaint %d\n", handle);
-#endif
RECT rect;
if (GetUpdateRect((HWND) GetHWND(), &rect, FALSE))
{
if (m_iconized)
{
HICON the_icon;
- if (m_icon.Ok())
- the_icon = (HICON) m_icon.GetHICON();
- if (the_icon == 0)
+ if (m_icon.Ok())
+ the_icon = (HICON) m_icon.GetHICON();
+ else
the_icon = (HICON) m_defaultIcon;
PAINTSTRUCT ps;
void wxFrame::MSWOnSize(int x, int y, WXUINT id)
{
-#if WXDEBUG > 1
- wxDebugMsg("wxFrameWnd::OnSize %d\n", m_hWnd);
-#endif
switch (id)
{
case SIZENORMAL:
bool wxFrame::MSWOnClose(void)
{
-#if WXDEBUG > 1
- wxDebugMsg("wxFrameWnd::OnClose %d\n", handle);
-#endif
return Close();
}
bool wxFrame::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control)
{
-#if WXDEBUG > 1
- wxDebugMsg("wxFrameWnd::OnCommand %d\n", handle);
-#endif
if (cmd == 0 || cmd == 1 ) // Can be either a menu command or an accelerator.
{
// In case it's e.g. a toolbar.
if (!child->IsKindOf(CLASSINFO(wxFrame)) &&
!child->IsKindOf(CLASSINFO(wxDialog)))
{
-#if WXDEBUG > 1
- wxDebugMsg("wxFrame::OnActivate: about to set the child's focus.\n");
-#endif
child->SetFocus();
return;
}
return pt;
}
+void wxFrame::ScreenToClient(int *x, int *y) const
+{
+ wxWindow::ScreenToClient(x, y);
+
+ // We may be faking the client origin.
+ // So a window that's really at (0, 30) may appear
+ // (to wxWin apps) to be at (0, 0).
+ wxPoint pt(GetClientAreaOrigin());
+ *x -= pt.x;
+ *y -= pt.y;
+}
+
+void wxFrame::ClientToScreen(int *x, int *y) const
+{
+ // We may be faking the client origin.
+ // So a window that's really at (0, 30) may appear
+ // (to wxWin apps) to be at (0, 0).
+ wxPoint pt1(GetClientAreaOrigin());
+ *x += pt1.x;
+ *y += pt1.y;
+
+ wxWindow::ClientToScreen(x, y);
+}
+
wxToolBar* wxFrame::CreateToolBar(long style, wxWindowID id, const wxString& name)
{
wxCHECK_MSG( m_frameToolBar == NULL, FALSE,
// propagate our state change to all child frames
void wxFrame::IconizeChildFrames(bool bIconize)
{
- wxWindow *child = NULL;
for ( wxNode *node = GetChildren()->First(); node; node = node->Next() ) {
wxWindow *win = (wxWindow *)node->Data();
if ( win->IsKindOf(CLASSINFO(wxFrame)) ) {