]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/app.cpp
Restored the ability to set the background colour for a toolbar on Windows
[wxWidgets.git] / src / msw / app.cpp
index bcbe186896958c81903345463ae4909ec1e29836..2cf9c66e86c8e539d36afb527091a831a5a124c1 100644 (file)
@@ -100,18 +100,16 @@ extern void wxSetKeyboardHook(bool doIt);
 // NB: all "NoRedraw" classes must have the same names as the "normal" classes
 //     with NR suffix - wxWindow::MSWCreate() supposes this
 #ifdef __WXWINCE__
-      wxChar *wxCanvasClassName;
-      wxChar *wxCanvasClassNameNR;
+WXDLLIMPEXP_CORE       wxChar *wxCanvasClassName;
+WXDLLIMPEXP_CORE       wxChar *wxCanvasClassNameNR;
 #else
-const wxChar *wxCanvasClassName        = wxT("wxWindowClass");
-const wxChar *wxCanvasClassNameNR      = wxT("wxWindowClassNR");
+WXDLLIMPEXP_CORE const wxChar *wxCanvasClassName        = wxT("wxWindowClass");
+WXDLLIMPEXP_CORE const wxChar *wxCanvasClassNameNR      = wxT("wxWindowClassNR");
 #endif
-const wxChar *wxMDIFrameClassName      = wxT("wxMDIFrameClass");
-const wxChar *wxMDIFrameClassNameNoRedraw = wxT("wxMDIFrameClassNR");
-const wxChar *wxMDIChildFrameClassName = wxT("wxMDIChildFrameClass");
-const wxChar *wxMDIChildFrameClassNameNoRedraw = wxT("wxMDIChildFrameClassNR");
-
-HBRUSH wxDisableButtonBrush = (HBRUSH) 0;
+WXDLLIMPEXP_CORE const wxChar *wxMDIFrameClassName      = wxT("wxMDIFrameClass");
+WXDLLIMPEXP_CORE const wxChar *wxMDIFrameClassNameNoRedraw = wxT("wxMDIFrameClassNR");
+WXDLLIMPEXP_CORE const wxChar *wxMDIChildFrameClassName = wxT("wxMDIChildFrameClass");
+WXDLLIMPEXP_CORE const wxChar *wxMDIChildFrameClassNameNoRedraw = wxT("wxMDIChildFrameClassNR");
 
 // ----------------------------------------------------------------------------
 // private functions
@@ -316,29 +314,8 @@ bool wxApp::Initialize(int& argc, wxChar **argv)
 
 #endif // wxUSE_OLE
 
-#if wxUSE_CTL3D
-    if (!Ctl3dRegister(wxhInstance))
-        wxLogError(wxT("Cannot register CTL3D"));
-
-    Ctl3dAutoSubclass(wxhInstance);
-#endif // wxUSE_CTL3D
-
     RegisterWindowClasses();
 
-#if !defined(__WXMICROWIN__) && !defined(__WXWINCE__)
-    // Create the brush for disabling bitmap buttons
-    LOGBRUSH lb;
-    lb.lbStyle = BS_PATTERN;
-    lb.lbColor = 0;
-    lb.lbHatch = (int)LoadBitmap( wxhInstance, wxT("wxDISABLE_BUTTON_BITMAP") );
-    if ( lb.lbHatch )
-    {
-        wxDisableButtonBrush = ::CreateBrushIndirect( &lb );
-        ::DeleteObject( (HGDIOBJ)lb.lbHatch );
-    }
-    //else: wxWidgets resources are probably not linked in
-#endif // !__WXMICROWIN__ && !__WXWINCE__
-
 #if wxUSE_PENWINDOWS
     wxRegisterPenWin();
 #endif
@@ -376,8 +353,8 @@ bool wxApp::RegisterWindowClasses()
     wndclass.hInstance     = wxhInstance;
     wndclass.hCursor       = ::LoadCursor((HINSTANCE)NULL, IDC_ARROW);
 
-    // Register the frame window class.
-    wndclass.hbrBackground = (HBRUSH)(COLOR_APPWORKSPACE + 1);
+    // register the class for all normal windows
+    wndclass.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
     wndclass.lpszClassName = wxCanvasClassName;
     wndclass.style         = styleNormal;
 
@@ -512,9 +489,6 @@ void wxApp::CleanUp()
     wxCleanUpPenWin();
 #endif
 
-    if ( wxDisableButtonBrush )
-        ::DeleteObject( wxDisableButtonBrush );
-
 #if wxUSE_OLE
 #ifdef __WXWINCE__
     ::CoUninitialize();
@@ -529,10 +503,6 @@ void wxApp::CleanUp()
     // unregister the classes now
     UnregisterWindowClasses();
 
-#if wxUSE_CTL3D
-    Ctl3dUnregister(wxhInstance);
-#endif
-
     delete wxWinHandleHash;
     wxWinHandleHash = NULL;