Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. CToolbar

CToolbar

Scheduled Pinned Locked Moved C / C++ / MFC
help
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    si_69
    wrote on last edited by
    #1

    Hi i am using a toolbar in a PropertyPage as part of a wizard This works fine the first time, but if i access the wizard again, and that particular page then the toolbar fails to load Can anyone help im using the below code

    if(!m_toolBar3.CreateEx(this, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_TOOLTIPS |CBRS_FLYBY | TBBS_BUTTON) || !m_toolBar3.LoadToolBar(IDR_TOOLBAR1))
    AfxMessageBox("failed");

    		// a small gap between buttons	
    m\_toolBar3.SetButtonInfo(m\_toolBar3.CommandToIndex(ID\_FILE\_SAVE)+1,ID\_SEPARATOR,TBBS\_SEPARATOR,5);
    m\_toolBar3.SetButtonInfo(m\_toolBar3.CommandToIndex(ID\_EDIT\_DELETE)+1,ID\_SEPARATOR,TBBS\_SEPARATOR,5);
    m\_toolBar3.SetButtonInfo(m\_toolBar3.CommandToIndex(ID\_EDIT\_UNDO)+1,ID\_SEPARATOR,TBBS\_SEPARATOR,5);
    m\_toolBar3.SetButtonInfo(m\_toolBar3.CommandToIndex(ID\_APP\_ABOUT)+1,ID\_SEPARATOR,TBBS\_SEPARATOR,5);
    m\_toolBar3.SetButtonInfo(m\_toolBar3.CommandToIndex(ID\_COLOUR)+1,ID\_SEPARATOR,TBBS\_SEPARATOR,5);
    m\_toolBar3.SetButtonStyle(m\_toolBar3.CommandToIndex(ID\_BOLD),TBBS\_CHECKBOX);
    m\_toolBar3.SetButtonStyle(m\_toolBar3.CommandToIndex(ID\_UNDERLINE),TBBS\_CHECKBOX);
    m\_toolBar3.SetButtonStyle(m\_toolBar3.CommandToIndex(ID\_ITALIC),TBBS\_CHECKBOX);
    m\_toolBar3.SetButtonStyle(m\_toolBar3.CommandToIndex(ID\_PARAGRAPH\_LEFT),TBBS\_CHECKGROUP);
    m\_toolBar3.SetButtonStyle(m\_toolBar3.CommandToIndex(ID\_PARAGRAPH\_CENTER),TBBS\_CHECKGROUP);
    m\_toolBar3.SetButtonStyle(m\_toolBar3.CommandToIndex(ID\_PARAGRAPH\_RIGHT),TBBS\_CHECKGROUP);
    m\_toolBar3.SetButtonStyle(m\_toolBar3.CommandToIndex(ID\_PARAGRAPH\_BULLETED),TBBS\_CHECKBOX);
    
        RepositionBars(AFX\_IDW\_CONTROLBAR\_FIRST, AFX\_IDW\_CONTROLBAR\_LAST,0);
    m\_toolBar3.MoveWindow( 18, 134,450, 30, 1 );
    

    thanks Simon

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups