]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/app.cpp
Various distrib things,
[wxWidgets.git] / src / msw / app.cpp
index 7eddf6e213acde5268c7471c0d0a1975acaa4f6e..5a67e7a4d6b71c61bde51ab66245b18720a3b71d 100644 (file)
@@ -281,6 +281,9 @@ bool wxApp::Initialize()
 // RegisterWindowClasses
 // ---------------------------------------------------------------------------
 
 // RegisterWindowClasses
 // ---------------------------------------------------------------------------
 
+// TODO we should only register classes really used by the app. For this it
+//      would be enough to just delay the class registration until an attempt
+//      to create a window of this class is made.
 bool wxApp::RegisterWindowClasses()
 {
     WNDCLASS wndclass;
 bool wxApp::RegisterWindowClasses()
 {
     WNDCLASS wndclass;
@@ -301,8 +304,8 @@ bool wxApp::RegisterWindowClasses()
 
     // Register the frame window class.
     wndclass.hbrBackground = (HBRUSH)(COLOR_APPWORKSPACE + 1);
 
     // Register the frame window class.
     wndclass.hbrBackground = (HBRUSH)(COLOR_APPWORKSPACE + 1);
-    wndclass.style         = styleNormal;
     wndclass.lpszClassName = wxFrameClassName;
     wndclass.lpszClassName = wxFrameClassName;
+    wndclass.style         = styleNormal;
 
     if ( !RegisterClass(&wndclass) )
     {
 
     if ( !RegisterClass(&wndclass) )
     {
@@ -324,7 +327,8 @@ bool wxApp::RegisterWindowClasses()
 
     // Register the MDI frame window class.
     wndclass.hbrBackground = (HBRUSH)NULL; // paint MDI frame ourselves
 
     // Register the MDI frame window class.
     wndclass.hbrBackground = (HBRUSH)NULL; // paint MDI frame ourselves
-    wndclass.lpszClassName = wxMDIFrameClassNameNoRedraw;
+    wndclass.lpszClassName = wxMDIFrameClassName;
+    wndclass.style         = styleNormal;
 
     if ( !RegisterClass(&wndclass) )
     {
 
     if ( !RegisterClass(&wndclass) )
     {
@@ -334,7 +338,7 @@ bool wxApp::RegisterWindowClasses()
     }
 
     // "no redraw" MDI frame
     }
 
     // "no redraw" MDI frame
-    wndclass.lpszClassName = wxMDIFrameClassName;
+    wndclass.lpszClassName = wxMDIFrameClassNameNoRedraw;
     wndclass.style         = styleNoRedraw;
 
     if ( !RegisterClass(&wndclass) )
     wndclass.style         = styleNoRedraw;
 
     if ( !RegisterClass(&wndclass) )
@@ -347,6 +351,7 @@ bool wxApp::RegisterWindowClasses()
     // Register the MDI child frame window class.
     wndclass.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
     wndclass.lpszClassName = wxMDIChildFrameClassName;
     // Register the MDI child frame window class.
     wndclass.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
     wndclass.lpszClassName = wxMDIChildFrameClassName;
+    wndclass.style         = styleNormal;
 
     if ( !RegisterClass(&wndclass) )
     {
 
     if ( !RegisterClass(&wndclass) )
     {
@@ -369,6 +374,7 @@ bool wxApp::RegisterWindowClasses()
     // Register the panel window class.
     wndclass.hbrBackground = (HBRUSH) GetStockObject( LTGRAY_BRUSH );
     wndclass.lpszClassName = wxPanelClassName;
     // Register the panel window class.
     wndclass.hbrBackground = (HBRUSH) GetStockObject( LTGRAY_BRUSH );
     wndclass.lpszClassName = wxPanelClassName;
+    wndclass.style         = styleNormal;
 
     if ( !RegisterClass(&wndclass) )
     {
 
     if ( !RegisterClass(&wndclass) )
     {