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 state to a .ini file?

how to save the toolbar state to a .ini file?

Scheduled Pinned Locked Moved C / C++ / MFC
c++windows-admintutorialquestion
2 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.
  • B Offline
    B Offline
    benben
    wrote on last edited by
    #1

    Hi: In MFC, I could save the toolbar's state to registry by calling function CToolBarCtrl::SaveState, but how to save the toolbar's state to an ini file? Sometimes,I don't want to use registry , Could you give me some idea? Thanks very much! Thanks Benben

    N 1 Reply Last reply
    0
    • B benben

      Hi: In MFC, I could save the toolbar's state to registry by calling function CToolBarCtrl::SaveState, but how to save the toolbar's state to an ini file? Sometimes,I don't want to use registry , Could you give me some idea? Thanks very much! Thanks Benben

      N Offline
      N Offline
      Neelesh K J Jain
      wrote on last edited by
      #2

      You can get the state of each button and save in a vector or list or array and serialize it. For Example, Use GetButtonCount(), to get the total number of buttons on the toolbar and then use GetState() for getting the state of each button and store in a vector and serialize it. Don't forget to rate the replies if it helps you.

      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