]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/frame.cpp
Use "GBK" as alternative name for CP936 encoding.
[wxWidgets.git] / src / msw / frame.cpp
index 40babb6805eb27a3027c0c1a60e3f61192a0f4da..65b40d01f5bd777431913e0128efe6f8be15ac43 100644 (file)
@@ -432,8 +432,12 @@ void wxFrame::InternalSetMenuBar()
 // Responds to colour changes, and passes event on to children.
 void wxFrame::OnSysColourChanged(wxSysColourChangedEvent& event)
 {
-    SetOwnBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE));
-    Refresh();
+    // Don't override the colour explicitly set by the user, if any.
+    if ( !UseBgCol() )
+    {
+        SetOwnBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE));
+        Refresh();
+    }
 
 #if wxUSE_STATUSBAR
     if ( m_frameStatusBar )
@@ -854,7 +858,7 @@ bool
 wxFrame::DoSendMenuOpenCloseEvent(wxEventType evtType, wxMenu* menu, bool popup)
 {
     wxMenuEvent event(evtType, popup ? wxID_ANY : 0, menu);
-    event.SetEventObject(this);
+    event.SetEventObject(menu);
 
     return HandleWindowEvent(event);
 }