]> git.saurik.com Git - wxWidgets.git/commitdiff
Small WinCE symbol fixes
authorJulian Smart <julian@anthemion.co.uk>
Sun, 13 Jun 2004 16:11:40 +0000 (16:11 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sun, 13 Jun 2004 16:11:40 +0000 (16:11 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27769 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/menu.cpp

index 7071a640daaae2e2b416ee19d42e51c2e9528441..21fa9db8b639e988f9402811f6a5f441b6288162 100644 (file)
@@ -744,12 +744,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 +1171,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 +1187,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)