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. ATL / WTL / STL
  4. Toolbar with trucolor bitmap buttons

Toolbar with trucolor bitmap buttons

Scheduled Pinned Locked Moved ATL / WTL / STL
c++graphicshelptutorialquestion
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.
  • M Offline
    M Offline
    Mandalay
    wrote on last edited by
    #1

    Actualy i have an error when toolbar.bmp have 256 or grater colors. WTL aplication just asserts on loading bitmap. how to create toolbar with "more colors", not with 16 color !? ---------------------------- never stop coding.

    M 1 Reply Last reply
    0
    • M Mandalay

      Actualy i have an error when toolbar.bmp have 256 or grater colors. WTL aplication just asserts on loading bitmap. how to create toolbar with "more colors", not with 16 color !? ---------------------------- never stop coding.

      M Offline
      M Offline
      Mandalay
      wrote on last edited by
      #2

      i do it only with editing atlframe.h i changed some code, if we are not in WIN_CE block [code] /* ATLASSERT(false); TBADDBITMAP tbab = { 0 }; tbab.hInst = hInst; tbab.nID = nResourceID; ::SendMessage(hWnd, TB_ADDBITMAP, nBmp, (LPARAM)&tbab); */ HBITMAP hBmp = LoadBitmap( hInst, MAKEINTRESOURCE(nResourceID) ); HIMAGELIST hImageList = ImageList_Create( pData->wWidth, pData->wWidth, ILC_COLOR32, pData->wItemCount, 0 ); ImageList_Add( hImageList, hBmp, (HBITMAP)NULL ); ::SendMessage(hWnd, TB_SETIMAGELIST, 0, (LPARAM)hImageList); [/code] ==================== maybe there is some other way ? :) ---------------------------- never stop coding.

      T 1 Reply Last reply
      0
      • M Mandalay

        i do it only with editing atlframe.h i changed some code, if we are not in WIN_CE block [code] /* ATLASSERT(false); TBADDBITMAP tbab = { 0 }; tbab.hInst = hInst; tbab.nID = nResourceID; ::SendMessage(hWnd, TB_ADDBITMAP, nBmp, (LPARAM)&tbab); */ HBITMAP hBmp = LoadBitmap( hInst, MAKEINTRESOURCE(nResourceID) ); HIMAGELIST hImageList = ImageList_Create( pData->wWidth, pData->wWidth, ILC_COLOR32, pData->wItemCount, 0 ); ImageList_Add( hImageList, hBmp, (HBITMAP)NULL ); ::SendMessage(hWnd, TB_SETIMAGELIST, 0, (LPARAM)hImageList); [/code] ==================== maybe there is some other way ? :) ---------------------------- never stop coding.

        T Offline
        T Offline
        Tom J 0
        wrote on last edited by
        #3

        Yes, I did it quite the same way;-)

        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