Thread: how to display transparence picture in dialog?

  1. #1
    Registered User
    Join Date
    Jul 2002
    Posts
    9

    how to display transparence picture in dialog?

    Hi!

    I have a logo that has a black background. I want to display all black parts of the bitmap as transparence ones.

    Donīt come up with DirectX and DD_SetColorKey() !

    Do you have tipps? Everyone knows that for example the gray is different of each windows version. So to fill the black part with a gray is not the solution!

    I insert the picture into a the dialog with the help of the resource editor of VC++ 6.0

    Thanks for replies!

  2. #2
    Registered User
    Join Date
    Jul 2002
    Posts
    273
    On WM_PAINT you can draw directly on the dialog window. Do you know how to do tranparency? I'll give a hint.

    create a "mask" version of your bitmap

    use a memory dc for both your mask and your bitmap

    through a series of BitBlts with flags OTHER THAN SRCCOPY you should be able to pull off transparency.

  3. #3
    Registered User
    Join Date
    Jul 2002
    Posts
    9
    WM_PAINT is clear

    but i neaver worked with masked!!

    If i had to blit it with blt() maybe i will get it !!!

    How about SetColorKey? with Blt() howīs the name of the function? thanks!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Display Color dialog
    By Cherry65 in forum Windows Programming
    Replies: 4
    Last Post: 02-17-2009, 11:41 AM
  2. Display text in a Dialog Box
    By Dark_Phoenix in forum Windows Programming
    Replies: 9
    Last Post: 01-02-2009, 06:30 AM
  3. Display Dialog Box Then Execute
    By stickman in forum C++ Programming
    Replies: 17
    Last Post: 05-10-2006, 11:02 AM
  4. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM
  5. Displaying a picture on a dialog
    By CodeMonkey in forum Windows Programming
    Replies: 2
    Last Post: 02-14-2002, 11:14 AM