X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/781a24e82f6c7e460f3dcc925570de4f5fc38f4f..c20889abf85dddecf763d8126141d3168cba08fb:/src/msw/wince/tbarwce.cpp diff --git a/src/msw/wince/tbarwce.cpp b/src/msw/wince/tbarwce.cpp index 4bc4fcfe37..4cb447f393 100644 --- a/src/msw/wince/tbarwce.cpp +++ b/src/msw/wince/tbarwce.cpp @@ -56,7 +56,7 @@ #include #include #include -#if !defined(__HANDHELDPC__) && ((_WIN32_WCE < 400) || defined(__POCKETPC__) || defined(__SMARTPHONE__)) +#if defined(WINCE_WITHOUT_COMMANDBAR) #include #endif #include "wx/msw/wince/missing.h" @@ -226,11 +226,11 @@ bool wxToolBar::Create(wxWindow *parent, { // common initialisation if ( !CreateControl(parent, id, pos, size, style, wxDefaultValidator, name) ) - return FALSE; + return false; // MSW-specific initialisation if ( !MSWCreateToolbar(pos, size, menuBar) ) - return FALSE; + return false; // set up the colors and fonts SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_MENUBAR)); @@ -243,13 +243,13 @@ bool wxToolBar::Create(wxWindow *parent, #define TBSTYLE_NO_DROPDOWN_ARROW 0x0080 #endif -bool wxToolBar::MSWCreateToolbar(const wxPoint& pos, const wxSize& size, wxMenuBar* menuBar) +bool wxToolBar::MSWCreateToolbar(const wxPoint& WXUNUSED(pos), const wxSize& WXUNUSED(size), wxMenuBar* menuBar) { SetMenuBar(menuBar); if (m_menuBar) m_menuBar->SetToolBar(this); -#if !defined(__HANDHELDPC__) && (_WIN32_WCE < 400 || defined(__POCKETPC__) || defined(__SMARTPHONE__)) +#if defined(WINCE_WITHOUT_COMMANDBAR) // Create the menubar. SHMENUBARINFO mbi; @@ -269,7 +269,7 @@ bool wxToolBar::MSWCreateToolbar(const wxPoint& pos, const wxSize& size, wxMenuB if (!SHCreateMenuBar(&mbi)) { wxFAIL_MSG( _T("SHCreateMenuBar failed") ); - return FALSE; + return false; } SetHWND((WXHWND) mbi.hwndMB); @@ -494,7 +494,7 @@ bool wxToolBar::DoDeleteTool(size_t pos, wxToolBarToolBase *tool) { wxLogLastError(wxT("TB_DELETEBUTTON")); - return FALSE; + return false; } } @@ -575,8 +575,6 @@ bool wxToolBar::Realize() return TRUE; } - const bool isVertical = HasFlag(wxTB_VERTICAL); - #if 0 // delete all old buttons, if any for ( size_t pos = 0; pos < m_nButtons; pos++ ) @@ -586,7 +584,7 @@ bool wxToolBar::Realize() wxLogDebug(wxT("TB_DELETEBUTTON failed")); } } -#endif +#endif // 0 // add the buttons and separators // ------------------------------ @@ -600,7 +598,7 @@ bool wxToolBar::Realize() // this array will hold the indices of all controls in the toolbar wxArrayInt controlIds; - bool lastWasRadio = FALSE; + bool lastWasRadio = false; int i = 0; wxToolBarToolsList::Node* node; for ( node = m_tools.GetFirst(); node; node = node->GetNext() ) @@ -613,7 +611,7 @@ bool wxToolBar::Realize() wxZeroMemory(button); - bool isRadio = FALSE; + bool isRadio = false; switch ( tool->GetStyle() ) { case wxTOOL_STYLE_CONTROL: @@ -646,7 +644,7 @@ bool wxToolBar::Realize() button.iBitmap = winceId; } else - processedThis = FALSE; + processedThis = false; if ( tool->IsEnabled() ) button.fsState |= TBSTATE_ENABLED; @@ -702,6 +700,9 @@ bool wxToolBar::Realize() delete [] buttons; #if 0 + + const bool isVertical = HasFlag(wxTB_VERTICAL); + // Deal with the controls finally // ------------------------------ @@ -846,9 +847,9 @@ bool wxToolBar::Realize() SetRows(m_nButtons); } } -#endif +#endif // 0 - return TRUE; + return true; } // ---------------------------------------------------------------------------- @@ -918,11 +919,12 @@ bool wxToolBar::MSWOnNotify(int WXUNUSED(idCtrl), wxToolBarToolBase *tool = FindById(id); if ( !tool ) - return FALSE; + return false; return HandleTooltipNotify(code, lParam, tool->GetShortHelp()); #else - return FALSE; + wxUnusedVar(lParam); + return false; #endif } @@ -1133,7 +1135,7 @@ void wxToolBar::OnMouseEvent(wxMouseEvent& event) } } -void wxToolBar::HandleMouseMove(WXWPARAM wParam, WXLPARAM lParam) +void wxToolBar::HandleMouseMove(WXWPARAM WXUNUSED(wParam), WXLPARAM lParam) { wxCoord x = GET_X_LPARAM(lParam), y = GET_Y_LPARAM(lParam);