can i change the HBITMAP structure for be transparent?
because the gif's files are show me a black background color.
cambalinho
74
Practically a Posting Shark
Recommended Answers
Jump to PostSo you want to draw the "foreground" of the bitmap but let the background be transparent, so the image appears to be drawn on your window rather than within a black square? If so, you need to mask the bitmap. Take a look at
Jump to PostThe first thing you need to do is select the
HBITMAP
into aMemoryDC
. Then you cna use theAlphaBlend
function to draw it to theWindowDC
.If the
MemoryDC
is NOT compatible with theWindowDC
, this will fail! In that case, you can …
Jump to PostEverytime you do
GetDC
, you are leaking a DC. You NEED toReleaseDC
.Even if you do
DC = GetDC(NULL)
you need to doReleaseDC(NULL, DC);
. If you doDC = GetDC(hwnd)
you need to doReleaseDC(hwnd, DC);
.In the above code, you don't …
All 11 Replies
SalmiSoft
102
Junior Poster
cambalinho
74
Practically a Posting Shark
triumphost
120
Posting Whiz
cambalinho
74
Practically a Posting Shark
triumphost
120
Posting Whiz
cambalinho
74
Practically a Posting Shark
cambalinho
74
Practically a Posting Shark
cambalinho
74
Practically a Posting Shark
triumphost
120
Posting Whiz
cambalinho
74
Practically a Posting Shark
triumphost
120
Posting Whiz
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.