]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/menu.cpp
Fix for the undocumented holes in spiner sizes.
[wxWidgets.git] / src / msw / menu.cpp
index 7071a640daaae2e2b416ee19d42e51c2e9528441..1923ba92f28d5e9853e5887acc963eb0a79e38ab 100644 (file)
@@ -93,6 +93,9 @@ static void SetDefaultMenuItem(HMENU hmenu, UINT id)
     {
         wxLogLastError(wxT("SetMenuItemInfo"));
     }
+#else
+    wxUnusedVar(hmenu);
+    wxUnusedVar(id);
 #endif
 }
 
@@ -135,7 +138,7 @@ template<> void wxCollectionToVariantArray( wxMenuItemList const &theList, wxxVa
 }
 
 wxBEGIN_PROPERTIES_TABLE(wxMenu)
-       wxEVENT_PROPERTY( Select , wxEVT_COMMAND_MENU_SELECTED , wxCommandEvent)
+    wxEVENT_PROPERTY( Select , wxEVT_COMMAND_MENU_SELECTED , wxCommandEvent)
     wxPROPERTY( Title, wxString , SetTitle, GetTitle, wxString(), 0 /*flags*/ , wxT("Helpstring") , wxT("group") )
     wxREADONLY_PROPERTY_FLAGS( MenuStyle , wxMenuStyle , long , GetStyle , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style
     wxPROPERTY_COLLECTION( MenuItems , wxMenuItemList , wxMenuItem* , Append , GetMenuItems , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
@@ -744,12 +747,12 @@ void wxMenuBar::Refresh()
 {
     wxCHECK_RET( IsAttached(), wxT("can't refresh unattached menubar") );
 
-#if defined(WINCE_WITH_COMMANDBAR)
+#if defined(WINCE_WITHOUT_COMMANDBAR)
     if (GetToolBar())
     {
         CommandBar_DrawMenuBar((HWND) GetToolBar()->GetHWND(), 0);
     }
-#elif defined(WINCE_WITHOUT_COMMANDBAR)
+#elif defined(WINCE_WITH_COMMANDBAR)
     if (m_commandBar)
         DrawMenuBar((HWND) m_commandBar);
 #else
@@ -1171,24 +1174,9 @@ void wxMenuBar::Attach(wxFrame *frame)
 {
     wxMenuBarBase::Attach(frame);
 
-#if defined(__WXWINCE__)
+#if defined(WINCE_WITH_COMMANDBAR)
     if (!m_hMenu)
         this->Create();
-#if defined(WINCE_WITHOUT_COMMANDAR)
-
-    // No idea why this was here, but it seems to be obsolete.
-       // Remove after testing with other WinCE combinations - April 2004
-#if 0
-    if (GetToolBar())
-    {
-        HWND hCommandBar = (HWND) GetToolBar()->GetHWND();
-        if (!CommandBar_InsertMenubarEx(hCommandBar, NULL, (LPTSTR) m_hMenu, 0))
-        {
-            wxLogLastError(wxT("CommandBar_InsertMenubarEx"));
-        }
-    }
-#endif
-#else
     if (!m_commandBar)
         m_commandBar = (WXHWND) CommandBar_Create(wxGetInstance(), (HWND) frame->GetHWND(), NewControlId());
     if (m_commandBar)
@@ -1202,16 +1190,13 @@ void wxMenuBar::Attach(wxFrame *frame)
         }
     }
 #endif
-    // PSPC/WFSP
-#endif
-    // __WXWINCE__ && _WIN32_WCE >= 400
 
 #if wxUSE_ACCEL
     RebuildAccelTable();
 #endif // wxUSE_ACCEL
 }
 
-#if defined(WINCE_WITH_COMMANDAR)
+#if defined(WINCE_WITH_COMMANDBAR)
 bool wxMenuBar::AddAdornments(long style)
 {
     if (m_adornmentsAdded || !m_commandBar)