[Dev-C++] Painting transparent areas
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: DXFX <vin...@ed...> - 2001-12-24 11:37:23
|
Thanks, Anyway: > Windows 95/98: TransparentBlt contains a memory leak that can exhaust system resources. To draw a transparent bitmap using BitBlt, see Knowledge Base article Q79212. Does this mean that the function does not free up resources after it uses it? Is there any other way? I have a Win98 machine(still finding considerations to upgrade to WinXP) and I am running low on resources(Which is why I haven't upgraded my OS). As much as possible, I want my programs(specially the ones that draw things on the desktop) use not so many resources. That would prove to be a challenge to me though... Anyway... Im in the process of upgrading my compiler(and of course, I couldn't make the code to work... but Im looking forward to). I've also been studying one solution that I think might do the trick, however, I'll have to sacrifice speed for that... I've been thinking to make a function that draws a bitmap, similar to BitBlt, but with an exception - It would scan the bitmap, byte-by-byte. If the byte isn't the color for transparency, it draws it do the screen... if it is, then it doesnt draw it(It also means I'll have to scan for an interval of three... scanning each R,G,B values. That is, if it is 24-bit color bitmap). However, that also means it will have to spend time scanning the bytes of the bitmap then draw them byte-by-byte on the screen. I'll be looking on that Article(Knowledge Base article Q79212) to see if I could understand it. For now... Anyone got any bright Ideas? DXfX __________________________________ www.edsamail.com |