Sign in Join

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

Mailing lists / lazarus / 2003-11

patch for LM_PAINT

2 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

in win32object.inc
I've added section for LM_PAINT

Function TWin32Object.IntSendMessage3(LM_Message: Integer; Sender: TObject;
Data: Pointer): Integer;

before LM_REDRAW and after LM_TB_BUTTONCOUNT:

LM_TB_BUTTONCOUNT:
        Begin
          If Sender Is TToolbar Then
            Result := SendMessage(Handle, TB_BUTTONCOUNT, 0, 0)
          Else
            Result := -1;
        End;
   // start new
        LM_PAINT :
        begin
          if sender is tControl then
          tControl(sender).perform(LM_PAINT,0,0);
        end;
//<---------stop new
   LM_REDRAW:
        Begin
          Assert(False, Format('Trace:[TWin32Object.IntSendMessage3] %S -->
Redraw', [Sender.ClassName]));

and now Repaint works the same like in Delphi

Darek

Reply by email

Micha Nelissen
to Darek Mazur
Darek Mazur wrote 6 lines
in win32object.inc I've added section for LM_PAINT Function TWin32Object.IntSendMessage3(LM_Message: Integer; Sender: TObject; Data: Pointer): Integer;

[snip]

and now Repaint works the same like in Delphi

What bug has been fixed? IIRC correctly, you shouldn't have to do this. Only win32callback.inc may call Perform or Dispatch on a LCL control.

Micha.

Reply by email