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. Toolbar in CDialog

Toolbar in CDialog

Scheduled Pinned Locked Moved C / C++ / MFC
helplearning
3 Posts 2 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.
  • _ Offline
    _ Offline
    _crs_
    wrote on last edited by
    #1

    hello, I have a problem ... I want to create a CDialog ... and add to it a toobar i have tried m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC); m_wndToolBar.LoadToolBar(IDR_MAINFRAME); where m_wndToolBar is a member of my CDialog class and IDR_MAINFRAME is the resource ID for my toolbar and... this code is in OnInitDialog event ... the functions return OK but the toolbar isn't there .... please help ..... thanks !!!!!!

    I 1 Reply Last reply
    0
    • _ _crs_

      hello, I have a problem ... I want to create a CDialog ... and add to it a toobar i have tried m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC); m_wndToolBar.LoadToolBar(IDR_MAINFRAME); where m_wndToolBar is a member of my CDialog class and IDR_MAINFRAME is the resource ID for my toolbar and... this code is in OnInitDialog event ... the functions return OK but the toolbar isn't there .... please help ..... thanks !!!!!!

      I Offline
      I Offline
      iceage
      wrote on last edited by
      #2

      //add a toolbar to the dialog m_toolBar.CreateEx(this, TBSTYLE_FLAT | TBSTYLE_TRANSPARENT , WS_CHILD |WS_VISIBLE | CBRS_FLOATING ); m_toolBar.LoadToolBar(IDR_TOOLBAR); m_toolBar.SetBarStyle(CBRS_ALIGN_TOP | CBRS_TOOLTIPS | CBRS_FLYBY); RepositionBars(AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST, 0);

      _ 1 Reply Last reply
      0
      • I iceage

        //add a toolbar to the dialog m_toolBar.CreateEx(this, TBSTYLE_FLAT | TBSTYLE_TRANSPARENT , WS_CHILD |WS_VISIBLE | CBRS_FLOATING ); m_toolBar.LoadToolBar(IDR_TOOLBAR); m_toolBar.SetBarStyle(CBRS_ALIGN_TOP | CBRS_TOOLTIPS | CBRS_FLYBY); RepositionBars(AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST, 0);

        _ Offline
        _ Offline
        _crs_
        wrote on last edited by
        #3

        thanks !

        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