[lazarus] LCL: WMPaint
Mattias Gaertner
nc-gaertnma at netcologne.de
Mon Jun 30 02:41:40 EDT 2003
On Mon, 30 Jun 2003 07:54:29 +0200
"Micha Nelissen" <mdvpost at hotmail.com> wrote:
> 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.
I applied it.
Although I think, the DC=Unused is a dirty hack. Is there any reason, to not
use a flag in TWinControl?
Mattias
More information about the Lazarus
mailing list