Jump to content

Combine transparent PNG with bitmap

Recommended Posts

What I want to achieve:

I want to load PNG from file (PNG has transparent background) and create solid background for it (white color) making it HBITMAP and then save it as BMP.

Reason for this is that all converters create black background for PNG while I need white (because I will be using them in ContextMenu).

I hope this is possible using GDI+ library. I have investigated forums and MSDN for two days and haven't found the solution.

Any help will be much appreciated.

Edit (1): Or -> ContextMenu uses bitmap images. How could I use PNG or ICO images that have transparency in context menus. Note - I am using SetMenuItemBitmaps to put images in menu ($MF_BYPOSITION).

Edit (2): I have found one DrawImage in C+/C# Graphics Class. Maybe somebody can translate this?

Edited by iDenoQ
Link to comment
Share on other sites

  • 3 weeks later...

You've missed

You're right, after thorough search of two weeks I have to say that that one is perfect! Thank you.

For me - default context menus - were not good enough, especially on Windows XP that I want to support.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...