[lazarus] BitButton in Win32

Martin Smat martin.smat at tiscali.cz
Sun Sep 14 08:33:26 EDT 2003


Mattias Gaertner wrote:
> On Fri, 05 Sep 2003 18:37:40 +0200
> Martin Smat <martin.smat at tiscali.cz> wrote:
> 
> 
>>Hi,
>>   I tried to implement the bitmap buttons under win32 interface to show 
>>correctly the image and the button caption (now the caption is not 
>>displayed - it's because the button is defined with flag BS_BITMAP). It 
>>should be defined with flag BS_OWNERDRAW and painted in processing 
>>WM_DRAWITEM message.
> 
> 
> This is win32 specific. Under gtk you don't need to draw it yourself, you
> can simply insert a pixmap into a button. Every used custom draw function in
> the LCL should be avoided to get theme dependent controls.
> Can we delegate the bitmap drawing to the win32 interface?
> 
Under win32 it is possible to insert the pixmap in a simple way too. But 
only when the button is created with the flag BS_BITMAP and in this case 
the button can contain *only* the pixmap, nothing more (text caption).
Can I add drawing the custom button directly into win32 interface (into 
WindowProc add processing WM_DRAWITEM message)?

Martin Smat.






More information about the Lazarus mailing list