]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/frame.cpp
* Deleted all ^M
[wxWidgets.git] / src / msw / frame.cpp
index 55889420fa607c53496d7ac5432b13c3b2fba286..2e00ecfccb9f171eff02016cb35e85e1327d32aa 100644 (file)
@@ -381,7 +381,8 @@ wxStatusBar *wxFrame::OnCreateStatusBar(const int number)
 bool wxFrame::CreateStatusBar(const int number)
 {
   // VZ: calling CreateStatusBar twice is an error - why anyone would do it?
-  wxCHECK_RET( m_frameStatusBar == NULL, FALSE );
+  wxCHECK_MSG( m_frameStatusBar == NULL, FALSE, 
+               "recreating status bar in wxFrame" );
 
   m_frameStatusBar = OnCreateStatusBar(number);
   if ( m_frameStatusBar )
@@ -395,14 +396,14 @@ bool wxFrame::CreateStatusBar(const int number)
 
 void wxFrame::SetStatusText(const wxString& text, const int number)
 {
-  wxCHECK( m_frameStatusBar != NULL );
+  wxCHECK_RET( m_frameStatusBar != NULL, "no statusbar to set text for" );
 
   m_frameStatusBar->SetStatusText(text, number);
 }
 
 void wxFrame::SetStatusWidths(const int n, const int *widths_field)
 {
-  wxCHECK( m_frameStatusBar != NULL );
+  wxCHECK_RET( m_frameStatusBar != NULL, "no statusbar to set widths for" );
 
   m_frameStatusBar->SetStatusWidths(n, widths_field);
   PositionStatusBar();
@@ -551,13 +552,11 @@ void wxFrame::MSWCreate(const int id, wxWindow *parent, const char *wclass, wxWi
   // 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 = WS_POPUP | WS_CLIPCHILDREN ;
-
   DWORD msflags = 0;
   if ((style & wxCAPTION) == wxCAPTION)
-    msflags = WS_OVERLAPPED | WS_CLIPCHILDREN ; // WS_POPUP | WS_CLIPCHILDREN ;
+    msflags = WS_OVERLAPPED;
   else
-    msflags = WS_POPUP | WS_CLIPCHILDREN ;
+    msflags = WS_POPUP;
 
   if (style & wxMINIMIZE_BOX)
     msflags |= WS_MINIMIZEBOX;
@@ -573,6 +572,8 @@ void wxFrame::MSWCreate(const int id, wxWindow *parent, const char *wclass, wxWi
     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
@@ -641,12 +642,9 @@ bool wxFrame::MSWOnPaint(void)
 
       EndPaint((HWND) GetHWND(), &ps);
     }
-
-    if (!m_iconized)
+    else
     {
-//      m_paintHDC = (WXHDC) cdc;
       GetEventHandler()->OldOnPaint();
-//      m_paintHDC = NULL;
     }
     return 0;
   }