Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2003-11

some things wrong with LM_PAINT

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Darek Mazur

HI

I have big problems with paintings
I investigate hole road of messages,and this is my notice:

Procedure TWinControl.Repaint;
//  CNSendMessage(LM_PAINT, Self, nil); --> not call WMpaint
  // Invalidate;  --> why remove
I change to:
  Invalidate;
  perform(LM_PAINT,0,0);

and all works better

Function TWin32Object.IntSendMessage3(LM_Message: Integer; Sender: TObject;
Data: Pointer): Integer;
section for LM_PAINT is absent

And one ask:
why are two function if tWinControl:
Repaint and Redraw

redraw is absent in Delphi

Darek

Reply by email

Micha Nelissen
to Darek Mazur
Darek Mazur wrote
Function TWin32Object.IntSendMessage3(LM_Message: Integer; Sender: TObject; Data: Pointer): Integer; section for LM_PAINT is absent

LM_PAINT messages are sent from the interface to the LCL, not vice versa. Call Invalidate to repaint a control.

HTH,

Micha.

Reply by email

Darek Mazur
to Darek Mazur: HI I have big problems with paintings I investigate hole road of messages,and this is my…
Darek Mazur wrote: > Function TWin32Object.IntSendMessage3(LM_Message: Integer; Sender:
TObject;
Show quoted text 6 lines
> Data: Pointer): Integer; > section for LM_PAINT is absent LM_PAINT messages are sent from the interface to the LCL, not vice versa. Call Invalidate to repaint a control.

I do this , but thats not work

If You have right, that what for is :

Procedure TWinControl.Repaint;
Begin
....
CNSendMessage(LM_PAINT, Self, nil); --> LCL send LM_Paint to interface, ^ this is empty call
....
end;

In windows if You call Invalidate after that must call WMPaint and Repaint should do this,
I think that in Repaint is bug

PS. I know that Redraw is to CHILD, and I think Repaint is for whole object REDRAW uses invalidate and update, REPAINT may use the same

Darek

Reply by email