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. HICON to HBITMAP?

HICON to HBITMAP?

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

    I need a HBITMAP to add a bitmap to a toolbar and menu. I can get an HICON from the .exe's that contain the images, but I'm not sure if there is a simple way to get an HBITMAP from the HICON without going through the whole bitblt process. Any idea if there is a fairly simple way to do this? Thank you, Dave

    D 1 Reply Last reply
    0
    • D Dave_

      I need a HBITMAP to add a bitmap to a toolbar and menu. I can get an HICON from the .exe's that contain the images, but I'm not sure if there is a simple way to get an HBITMAP from the HICON without going through the whole bitblt process. Any idea if there is a fairly simple way to do this? Thank you, Dave

      D Offline
      D Offline
      Dominik Reichl
      wrote on last edited by
      #2

      I am not sure, but perhaps you should have a look at the GetIconInfo Windows API function. This function gives you an ICONINFO struct which contains HBITMAP handles to the color and the mask bitmap. If you use GetIconInfo you have to delete the handles to the two newly created bitmaps yourself. Read MSDN for more. -Dominik


      _outp(0x64, 0xAD); and __asm mov al, 0xAD __asm out 0x64, al do the same... but what do they do?? ;)

      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