Dynamically drawn canvas->no bitmap handle update !
Original Reporter info from Mantis: >8<
-
Reporter name: Bug Import
Original Reporter info from Mantis: >8<
- Reporter name: Bug Import
Description:
[WIN32 - 2004-12-19 snapshot]
Here's my problem :
- I'm drawing stuff on the TCanvas of a TImage (using line, textOut, and so on...)
- I'd like to capture the image and save it (since saving it with Lazarus causes it to crash <.<) using a DLL made with VC++. Thus I need the bitmap handle.
- When loading a BMP file in the TImage at design-time, it works perfectly (my DLL saves the image in a file).
- Now I try this with an empty image (no picture loaded at design-time). At runtime, I draw stuff on it (lines, text...). When calling the DLL I realize the TBitmap's handle doesn't even exist !!! (img.picture.bitmap.HandleAllocated returns FALSE, even if I have manually created the TBitmap before drawing on it)
As a side effect, when I draw (runtime) on a pre-loaded (design-time) picture, I only get the picture (i.e. without the lines & text drawn on it) when retrieving the handle.
I hope this will help solving the well-known image refreshing problem on WIN32 as well ^^
Additional information:
Imported information
--------------------
Name: Zeugma
Mail: zeugma440 (at) hotmail.com
Mantis conversion info:
- Mantis ID: 514