-/*
- * Frame window
- *
- */
-
-bool wxFrame::MSWCreate(int id, wxWindow *parent, const wxChar *wclass, wxWindow *wx_win, const wxChar *title,
- int x, int y, int width, int height, long style)
-
-{
- m_defaultIcon = (WXHICON) (wxSTD_FRAME_ICON ? wxSTD_FRAME_ICON : wxDEFAULT_FRAME_ICON);
-
- // If child windows aren't properly drawn initially, WS_CLIPCHILDREN
- // could be the culprit. But without it, you can get a lot of flicker.
-
- DWORD msflags = 0;
- if ((style & wxCAPTION) == wxCAPTION)
- msflags = WS_OVERLAPPED;
- else
- msflags = WS_POPUP;
-
- if (style & wxMINIMIZE_BOX)
- msflags |= WS_MINIMIZEBOX;
- if (style & wxMAXIMIZE_BOX)
- msflags |= WS_MAXIMIZEBOX;
- if (style & wxTHICK_FRAME)
- msflags |= WS_THICKFRAME;
- if (style & wxSYSTEM_MENU)
- msflags |= WS_SYSMENU;
- if ((style & wxMINIMIZE) || (style & wxICONIZE))
- msflags |= WS_MINIMIZE;
- if (style & wxMAXIMIZE)
- msflags |= WS_MAXIMIZE;
- if (style & wxCAPTION)
- msflags |= WS_CAPTION;
- if (style & wxCLIP_CHILDREN)
- msflags |= WS_CLIPCHILDREN;
-
- // Keep this in wxFrame because it saves recoding this function
- // in wxTinyFrame
-#if wxUSE_ITSY_BITSY
- if (style & wxTINY_CAPTION_VERT)
- msflags |= IBS_VERTCAPTION;
- if (style & wxTINY_CAPTION_HORIZ)
- msflags |= IBS_HORZCAPTION;
-#else
- if (style & wxTINY_CAPTION_VERT)
- msflags |= WS_CAPTION;
- if (style & wxTINY_CAPTION_HORIZ)
- msflags |= WS_CAPTION;
-#endif
- if ((style & wxTHICK_FRAME) == 0)
- msflags |= WS_BORDER;
-
- WXDWORD extendedStyle = MakeExtendedStyle(style);
-
-#if !defined(__WIN16__) && !defined(__SC__)
- if (style & wxFRAME_TOOL_WINDOW)
- extendedStyle |= WS_EX_TOOLWINDOW;
-#endif
-
- if (style & wxSTAY_ON_TOP)
- extendedStyle |= WS_EX_TOPMOST;
-
- m_iconized = FALSE;
- if ( !wxWindow::MSWCreate(id, parent, wclass, wx_win, title, x, y, width, height,
- msflags, NULL, extendedStyle) )
- return FALSE;
-
- // Seems to be necessary if we use WS_POPUP
- // style instead of WS_OVERLAPPED
- if (width > -1 && height > -1)
- ::PostMessage(GetHwnd(), WM_SIZE, SIZE_RESTORED, MAKELPARAM(width, height));
-
- return TRUE;
-}
-
-// Default resizing behaviour - if only ONE subwindow, resize to client
-// rectangle size
-void wxFrame::OnSize(wxSizeEvent& event)