#include <ole2.h>
#include <shellapi.h>
#include <commctrl.h>
-#if !defined(__HANDHELDPC__) && ((_WIN32_WCE < 400) || defined(__POCKETPC__) || defined(__SMARTPHONE__))
+#if defined(WINCE_WITHOUT_COMMANDBAR)
#include <aygshell.h>
#endif
#include "wx/msw/wince/missing.h"
{
// 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));
#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;
if (!SHCreateMenuBar(&mbi))
{
wxFAIL_MSG( _T("SHCreateMenuBar failed") );
- return FALSE;
+ return false;
}
SetHWND((WXHWND) mbi.hwndMB);
{
wxLogLastError(wxT("TB_DELETEBUTTON"));
- return FALSE;
+ return false;
}
}
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++ )
wxLogDebug(wxT("TB_DELETEBUTTON failed"));
}
}
-#endif
+#endif // 0
// add the buttons and separators
// ------------------------------
// 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() )
wxZeroMemory(button);
- bool isRadio = FALSE;
+ bool isRadio = false;
switch ( tool->GetStyle() )
{
case wxTOOL_STYLE_CONTROL:
button.iBitmap = winceId;
}
else
- processedThis = FALSE;
+ processedThis = false;
if ( tool->IsEnabled() )
button.fsState |= TBSTATE_ENABLED;
delete [] buttons;
#if 0
+
+ const bool isVertical = HasFlag(wxTB_VERTICAL);
+
// Deal with the controls finally
// ------------------------------
SetRows(m_nButtons);
}
}
-#endif
+#endif // 0
- return TRUE;
+ return true;
}
// ----------------------------------------------------------------------------
wxToolBarToolBase *tool = FindById(id);
if ( !tool )
- return FALSE;
+ return false;
return HandleTooltipNotify(code, lParam, tool->GetShortHelp());
#else
- return FALSE;
+ wxUnusedVar(lParam);
+ return false;
#endif
}
}
}
-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);