[lazarus] LCL: WMPaint

Micha Nelissen mdvpost at hotmail.com
Mon Jun 30 01:32:25 EDT 2003


Mattias Gaertner wrote:
> On Sun, 29 Jun 2003 17:34:40 +0200
> "Micha Nelissen" <mdvpost at hotmail.com> wrote:
>
>> Micha Nelissen wrote:
>>> Hi,
>>>
>>> 2) The WM_ERASEBKGND really needs to be implemented, otherwise it
>>> will be black on windows. Delphi has:
>>>
>>>   if not FDoubleBuffered or
>>>     (TMessage(Message).wParam = TMessage(Message).lParam) then
>>>     FillRect(Message.DC, ClientRect, FBrush.Handle);
>>>   Message.Result := 1;
>>
>> I have attached a patch that works on windows. These last two
>> patches fix the TPromptDialog bug I mentioned earlier. In addition
>> to the erase background implementation I also added color convertion
>> routines for the font selection. I am unsure whether the interface
>> will accept the special clBlack and such, a real RGB value is better.
>
> The ColorToRGB calls were deleted with reason. System colors are theme
> dependent. For example clBackground can be anything (simple color,
> image, gradient fill, ...) and it changes, when the user changes the
> theme. So, the clWindowText must be sent to the interface, not the
> current color. It is up to the interface to convert it.

Of course, could have known that.

Could you apply to the other part then? I have reattached the part that was
important.

Regards,

Micha.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: bin00043.bin
Type: application/octet-stream
Size: 983 bytes
Desc: "erase_background.patch"
Url : http://localhost/pipermail/lazarus/attachments/20030630/27ec64eb/bin00043.bin


More information about the Lazarus mailing list