Re: David: Win32Lib
Brian Broker wrote:
> Let me know if you'd like to take a look at the
> code (changes to 'createDIB' and 'packScanLine').
Sure, I'm interested - especially since it's already coded.
> What should I use to free the memory my DIB
> handle is pointing at?
The DIB should be tracked as a resource; that's what:
trackObject( -1, ForProgram, hDIB )
is supposed to do. The -1 is used because there is no parent for the object.
ForProgram indicates that the resource is supposed to last for the entire
program, as opposed to ForPaint, which is destroyed at the end of the next
onPaint event.
You should be able to destroy the DIB with:
deleteObject( handle )
which ultimately calls the Win32 function DeleteObject to do the dirty work.
Did this answer the right question?
Just a note - XPM support is now native in the next release of Win32Lib, but
it shouldn't be too hard to integrate your code in. The main change was to
make the transparent color a global variable.
-- David Cuny
|
Not Categorized, Please Help
|
|