CMainFrame::CMainFrame() { // Set the Resource IDs for the toolbar buttons AddToolBarButton( 0 ); // Separator AddToolBarButton( IDM_BOLD ); AddToolBarButton( IDM_ITALIC); AddToolBarButton( IDM_UNDERLINE); }
CMainFrame::CMainFrame() : m_PenColor(RGB(0,0,0)) { // Set the Resource IDs for the toolbar buttons AddToolBarButton( 0 ); // Separator AddToolBarButton( IDM_RED ); AddToolBarButton( IDM_BLUE ); AddToolBarButton( IDM_GREEN ); AddToolBarButton( IDM_BLACK ); }
wxToolBar *MakeToolBar() { wxToolBar *tb = new wxToolBar(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTB_NODIVIDER); AddToolBarButton(tb, "Help", wxART_HELP_BOOK); tb->AddSeparator( ); AddToolBarButton(tb, "Open", wxART_FILE_OPEN); tb->AddSeparator( ); AddToolBarButton(tb, "Up", wxART_GO_DIR_UP); AddToolBarButton(tb, "Execute", wxART_EXECUTABLE_FILE); tb->Realize( ); return tb; }
void CMainFrame::SetupToolBar() { // Define our toolbar AddToolBarButton( IDM_FILE_NEW ); AddToolBarButton( IDM_FILE_OPEN ); AddToolBarButton( IDM_FILE_SAVE ); AddToolBarButton( 0 ); // Separator AddToolBarButton( IDM_EDIT_CUT, FALSE ); AddToolBarButton( IDM_EDIT_COPY, FALSE ); AddToolBarButton( IDM_EDIT_PASTE, FALSE ); AddToolBarButton( IDM_FILE_PRINT ); AddToolBarButton( 0 ); // Separator AddToolBarButton( IDM_PEN_COLOR ); AddToolBarButton( 0 ); // Separator AddToolBarButton( IDM_HELP_ABOUT ); }
void CMainFrame::SetupToolBar() { // Define our toolbar data AddToolBarButton( IDM_FILE_NEW , FALSE, _T("New") ); AddToolBarButton( IDM_FILE_OPEN , FALSE, _T("Open") ); AddToolBarButton( IDM_FILE_SAVE , FALSE, _T("Save") ); AddToolBarButton( 0 ); // Separator AddToolBarButton( IDM_EDIT_CUT , FALSE, _T("Cut") ); AddToolBarButton( IDM_EDIT_COPY , FALSE, _T("Copy") ); AddToolBarButton( IDM_EDIT_PASTE, FALSE, _T("Paste") ); AddToolBarButton( IDM_FILE_PRINT, FALSE, _T("Print") ); AddToolBarButton( 0 ); // Separator AddToolBarButton( IDM_VIEWMENU, TRUE, _T("View Menu")); AddToolBarButton( 0 ); // Separator AddToolBarButton( IDM_HELP_ABOUT, TRUE, _T("About") ); // Use larger buttons SetToolBarImages(RGB(192,192,192), IDB_TOOLBAR_NORM, IDB_TOOLBAR_HOT, IDB_TOOLBAR_DIS); // Configure the ViewMenu button to bring up a menu // Setting this style requires comctl32.dll version 4.72 or later if (GetComCtlVersion() >= 472) { CToolBar& TB = GetToolBar(); TB.SetButtonStyle(IDM_VIEWMENU, BTNS_WHOLEDROPDOWN); } }
void CMainFrame::SetupToolBar() { // Define the resource IDs for the toolbar AddToolBarButton( IDM_FILE_NEW ); AddToolBarButton( IDM_FILE_OPEN ); AddToolBarButton( IDM_FILE_SAVE ); AddToolBarButton( 0 ); // Separator AddToolBarButton( IDM_EDIT_CUT ); AddToolBarButton( IDM_EDIT_COPY ); AddToolBarButton( IDM_EDIT_PASTE ); AddToolBarButton( 0 ); // Separator AddToolBarButton( IDM_FILE_PRINT ); AddToolBarButton( 0 ); // Separator AddToolBarButton( IDM_HELP_ABOUT ); }
void CMainFrame::SetupToolBar() { // Set the Resource IDs for the toolbar buttons AddToolBarButton(IDM_FILE_NEW); AddToolBarButton(IDM_FILE_OPEN); AddToolBarButton(IDM_FILE_SAVE); AddToolBarButton(0); // Separator AddToolBarButton(IDM_EDIT_CUT, FALSE); // disabled button AddToolBarButton(IDM_EDIT_COPY, FALSE); // disabled button AddToolBarButton(IDM_EDIT_PASTE, FALSE); // disabled button AddToolBarButton(0); // Separator AddToolBarButton(IDM_FILE_PRINT); AddToolBarButton(0); // Separator AddToolBarButton(IDM_HELP_ABOUT); }
void CMainFrame::SetupToolBar() { // Set the Resource IDs for the first toolbar buttons AddToolBarButton( IDM_FILE_NEW ); AddToolBarButton( IDM_FILE_OPEN ); AddToolBarButton( 0 ); // Separator AddToolBarButton( IDM_FILE_SAVE ); AddToolBarButton( 0 ); // Separator AddToolBarButton( IDM_EDIT_CUT ); AddToolBarButton( IDM_EDIT_COPY ); AddToolBarButton( IDM_EDIT_PASTE ); AddToolBarButton( 0 ); // Separator AddToolBarButton( IDM_FILE_PRINT ); AddToolBarButton( 0 ); // Separator AddToolBarButton( IDM_HELP_ABOUT ); // Set the three image lists for the first toolbar SetToolBarImages(RGB(255, 0, 255), IDB_TOOLBAR_NORM, IDB_TOOLBAR_HOT, IDB_TOOLBAR_DIS); // Add the two other toolbars if we can use rebars (Need Win95 and IE 4 or better) if (IsReBarSupported()) { // Add the Arrows toolbar AddToolBarBand(&m_Arrows, 0, IDC_ARROWS); m_Arrows.AddButton(IDM_ARROW_LEFT); m_Arrows.AddButton(IDM_ARROW_RIGHT); // Add the Cards toolbar AddToolBarBand(&m_Cards, 0, IDB_CARDS); m_Cards.AddButton(IDM_CARD_CLUB); m_Cards.AddButton(IDM_CARD_DIAMOND); m_Cards.AddButton(IDM_CARD_HEART); m_Cards.AddButton(IDM_CARD_SPADE); // Set the button images SetTBImageList(&m_Arrows, &m_ArrowImages, IDB_ARROWS, RGB(255,0,255)); SetTBImageList(&m_Cards, &m_CardImages, IDB_CARDS, RGB(255,0,255)); } AddCombo(); }
void CMainFrame::SetupToolBar() { // Set the Resource IDs for the toolbar buttons AddToolBarButton(IDM_FILE_NEW); AddToolBarButton(IDM_FILE_OPEN); AddToolBarButton(IDM_FILE_SAVE); AddToolBarButton(0); // Separator AddToolBarButton(IDM_EDIT_CUT); AddToolBarButton(IDM_EDIT_COPY); AddToolBarButton(IDM_EDIT_PASTE); AddToolBarButton(0); // Separator AddToolBarButton(IDM_FILE_PRINT); AddToolBarButton(0); // Separator AddToolBarButton(IDM_PEN_RED); AddToolBarButton(IDM_PEN_BLUE); AddToolBarButton(IDM_PEN_GREEN); AddToolBarButton(IDM_PEN_BLACK); AddToolBarButton(IDM_HELP_ABOUT); }
void CMainFrame::SetupToolBar() { // Define our toolbar. Used when there isn't a ribbon. AddToolBarButton( IDM_FILE_NEW ); AddToolBarButton( IDM_FILE_OPEN ); AddToolBarButton( IDM_FILE_SAVE ); AddToolBarButton( 0 ); // Separator AddToolBarButton( IDM_EDIT_CUT, FALSE ); AddToolBarButton( IDM_EDIT_COPY, FALSE ); AddToolBarButton( IDM_EDIT_PASTE, FALSE ); AddToolBarButton( IDM_FILE_PRINT ); AddToolBarButton( 0 ); // Separator AddToolBarButton( IDM_PEN_RED ); AddToolBarButton( IDM_PEN_BLUE ); AddToolBarButton( IDM_PEN_GREEN ); AddToolBarButton( IDM_PEN_BLACK ); AddToolBarButton( 0 ); // Separator AddToolBarButton( IDM_HELP_ABOUT ); }
void CMainFrame::SetupToolBar() { // Set the Resource IDs for the toolbar buttons AddToolBarButton(IDM_FILE_NEW); AddToolBarButton(IDM_FILE_OPEN, FALSE); AddToolBarButton(IDM_FILE_SAVE, FALSE); AddToolBarButton(0); // Separator AddToolBarButton(IDM_EDIT_CUT, FALSE); AddToolBarButton(IDM_EDIT_COPY, FALSE); AddToolBarButton(IDM_EDIT_PASTE, FALSE); AddToolBarButton(0); // Separator AddToolBarButton(IDM_FILE_PRINT, FALSE); AddToolBarButton(0); // Separator AddToolBarButton(IDM_HELP_ABOUT); // Remove the checkmark for container tabs at top ::CheckMenuItem(GetFrameMenu(), IDM_CONTAINER_TOP, MF_UNCHECKED); // Add some extra icons for menu items AddMenuIcon(IDM_FILE_NEWSIMPLE, (HICON)LoadImage(GetApp()->GetResourceHandle(), MAKEINTRESOURCE(IDI_SIMPLE), IMAGE_ICON, 0, 0, LR_SHARED)); AddMenuIcon(IDM_FILE_NEWRECT, (HICON)LoadImage(GetApp()->GetResourceHandle(), MAKEINTRESOURCE(IDI_RECT), IMAGE_ICON, 0, 0, LR_SHARED)); AddMenuIcon(IDM_FILE_NEWTEXT, (HICON)LoadImage(GetApp()->GetResourceHandle(), MAKEINTRESOURCE(IDI_TEXT), IMAGE_ICON, 0, 0, LR_SHARED)); AddMenuIcon(IDM_FILE_NEWLIST, (HICON)LoadImage(GetApp()->GetResourceHandle(), MAKEINTRESOURCE(IDI_FILEVIEW), IMAGE_ICON, 0, 0, LR_SHARED)); AddMenuIcon(IDM_FILE_NEWTREE, (HICON)LoadImage(GetApp()->GetResourceHandle(), MAKEINTRESOURCE(IDI_CLASSVIEW), IMAGE_ICON, 0, 0, LR_SHARED)); }