![]() |
| | #1 |
| Registered User Join Date: Jun 2009
Posts: 9
| Draw a semi-transparent icon in winapi. How can I draw a semi transparent icon in winapi with WM_PAINT ? I mean i'm using functions like Code: HICON hIconPic = LoadImage(_hInstance, MAKEINTRESOURCE(IDI_ICON), IMAGE_ICON, 320, 240, LR_LOADTRANSPARENT); HDC dcIconPic = CreateCompatibleDC(0); HICON hSecondIcon = (HICON)SelectObject(dcIconPic, hIconPic); DrawIconEx(ps.hdc, 0, 0, hIconPic, 0, 0, 0, NULL, DI_NORMAL ); Semi-transparency doesn't work ! The semi transparency shown as white color. Can it be implemented somehow easily? |
| diskdisk is offline | |
| | #2 |
| Unregistered User Join Date: Jul 2007
Posts: 982
| I don't think so. The icon alpha channel isn't natively supported in XP and below. You'll have to make your own function for that, or install a library or graphics engine of some kind.
__________________ May the Source be with you. |
| Yarin is offline | |
| | #3 |
| Registered User Join Date: Apr 2007
Posts: 136
| |
| Alex31 is offline | |
| | #4 |
| Registered User Join Date: Jun 2009
Posts: 9
| |
| diskdisk is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| icon draw app | Gordon | Windows Programming | 1 | 04-05-2007 04:24 AM |
| Which is the better way to draw? | g4j31a5 | Game Programming | 16 | 01-22-2007 11:56 PM |
| draw function HELP!!! | sunoflight77 | C++ Programming | 1 | 05-10-2005 11:28 PM |
| Transparent Draw Question | GodLike | Windows Programming | 5 | 05-07-2002 06:56 AM |
| icon in title bar? | Unregistered | Windows Programming | 3 | 12-12-2001 06:43 PM |