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. help: Creating toolbar at runtime

help: Creating toolbar at runtime

Scheduled Pinned Locked Moved C / C++ / MFC
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.
  • S Offline
    S Offline
    SP
    wrote on last edited by
    #1

    I want to be able to create a CToolbar control on the fly by reading from a text file. The text file will tell me the number of buttons, the name for each of the button, the bmp file that has the bitmap for each button (or the image id and a bmp file with an image list). I have to be able to read this file and create the toolbar in my SDI MFC app. Can someone, please show me, how I could form the imagelist from these bitmap files? Thanks S:confused:

    T 1 Reply Last reply
    0
    • S SP

      I want to be able to create a CToolbar control on the fly by reading from a text file. The text file will tell me the number of buttons, the name for each of the button, the bmp file that has the bitmap for each button (or the image id and a bmp file with an image list). I have to be able to read this file and create the toolbar in my SDI MFC app. Can someone, please show me, how I could form the imagelist from these bitmap files? Thanks S:confused:

      T Offline
      T Offline
      Tomasz Sowinski
      wrote on last edited by
      #2

      Use ImageList_LoadImage to load image from file into imagelist. There's no MFC wrapper over this function, so you'll also have to use CImageList::operator HIMAGELIST(). Tomasz Sowinski -- http://www.shooltz.com

      S 1 Reply Last reply
      0
      • T Tomasz Sowinski

        Use ImageList_LoadImage to load image from file into imagelist. There's no MFC wrapper over this function, so you'll also have to use CImageList::operator HIMAGELIST(). Tomasz Sowinski -- http://www.shooltz.com

        S Offline
        S Offline
        SP
        wrote on last edited by
        #3

        Thanks .. it worked. :)

        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