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. How to save the toolbar settings and selection

How to save the toolbar settings and selection

Scheduled Pinned Locked Moved C / C++ / MFC
c++helptutorial
3 Posts 3 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.
  • V Offline
    V Offline
    Veeresh Hiremath
    wrote on last edited by
    #1

    Hi all, I have an mdi application ,and here i have about 11 toolbars .All these toolbar are created a variable of CToolBar and then using the CreateEx() in the mainframe.cpp file,loaded all the toolbar . Now i have a menu called "Toolbar" in my application which selects/checks the toolbar WS_VISIBLE and checks/unchecks the toolbar .So when i check ,say any one toolbar,it shows at first instance,and if i uncheck ,it hides. Now i want to save these settings, so that once i close the application and opens it again,i get only the toolbar shown which are selected initially before the application closes. "In short,I want to display next time,only the toolbar which are checked . Please get me out of these problem(;

    G L 2 Replies Last reply
    0
    • V Veeresh Hiremath

      Hi all, I have an mdi application ,and here i have about 11 toolbars .All these toolbar are created a variable of CToolBar and then using the CreateEx() in the mainframe.cpp file,loaded all the toolbar . Now i have a menu called "Toolbar" in my application which selects/checks the toolbar WS_VISIBLE and checks/unchecks the toolbar .So when i check ,say any one toolbar,it shows at first instance,and if i uncheck ,it hides. Now i want to save these settings, so that once i close the application and opens it again,i get only the toolbar shown which are selected initially before the application closes. "In short,I want to display next time,only the toolbar which are checked . Please get me out of these problem(;

      G Offline
      G Offline
      grigsoft
      wrote on last edited by
      #2

      CFrameWnd::SaveBarState should do the trick. However keep in mind that this thing fails if you will delete one of toolbars or change ID. Igor Green http://www.grigsoft.com/ - files and folders comparison tools

      1 Reply Last reply
      0
      • V Veeresh Hiremath

        Hi all, I have an mdi application ,and here i have about 11 toolbars .All these toolbar are created a variable of CToolBar and then using the CreateEx() in the mainframe.cpp file,loaded all the toolbar . Now i have a menu called "Toolbar" in my application which selects/checks the toolbar WS_VISIBLE and checks/unchecks the toolbar .So when i check ,say any one toolbar,it shows at first instance,and if i uncheck ,it hides. Now i want to save these settings, so that once i close the application and opens it again,i get only the toolbar shown which are selected initially before the application closes. "In short,I want to display next time,only the toolbar which are checked . Please get me out of these problem(;

        L Offline
        L Offline
        Le Thanh Cong
        wrote on last edited by
        #3

        You can use function GetBarInfo & SetBarInfo ----------------- conglt

        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