CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2007
    Posts
    59

    How to create transparent bitmap

    I am trying to create a 16x16 bitmap resource using resource edition and then load this bitmap to a button (property set to bitmap).

    My problem is bitmap has white background by default in the resource editor and this background also appear in the button. I want my drawing only will appear on the button not the button image background.

    If I use ICON then icon background does not appear which is ok for me but I can not select 16x16 icon to the button, it always appear the big icon in the button.

    Either I should be alble to load 16x16 icon loaded to the button or bitmap should be tranparent.
    I tried using opaque option in the image toolbar without any result.

    Can anybody help me to describe how to load bitmap in the button without the bitmap background.

    Or how I can load small icon only in the button?

    Thank you
    I will appreciate your answer.
    Thank you

  2. #2
    Join Date
    Jul 2003
    Posts
    147

    Thumbs up Re: How to create transparent bitmap

    I like to use this button class. It had the options I needed and saved me having to write it myself.

    http://www.codeproject.com/buttonctrl/FooButton.asp

    Good Luck
    "Live only for tomorrow, and you will have a lot of empty yesterdays today."

  3. #3
    Join Date
    Apr 1999
    Posts
    3,585

    Re: How to create transparent bitmap

    If you draw the button yourself, you can use TransparentBlt .
    Gort...Klaatu, Barada Nikto!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured