How use 32bit bitmap for menus in Win32 app

drjackool 956 Reputation points


Platform: Win32

How set 32bit (alpha channel) bitmap for menus? When I loading the bitmap by Loadbitmap or LoadImage with LR_CREATEDIBSECTION the alpha channel in the bitmap painted as white color and it is not transparent? Is there a way to fix it? Or I have to use my old owner draw menu method!


Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,413 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Castorix31 81,356 Reputation points

    A way is with WIC

    I tested the WICCreate32BitsPerPixelHBITMAP function (from MS) I had posted in this thread :

    with a 32-bit BMP with Alpha channel in a menu item and it is transparent :


    1 person found this answer helpful.
    0 comments No comments

  2. drjackool 956 Reputation points

    Problem solved by using Pre-multiplied alpha channel.

    0 comments No comments