Posted by: Christian Wimmer in: Common
TMessage is not TMsg!
TMessage is defined in Unit Messages and should not be mixed up with TMsg (Windows.pas) in the following case:
TForm1 = class(TForm)
procedure XY(var Msg : TMessage); message WM_TEST;
SendMessage(Form1.Handle, WM_TEST, 1,2);
You should abandon all tutorials which use TMsg. You’ll get strange results. TMessage is for VCL and TMsg is for nonVCL programming.
I was told that there is an exception.
TApplication.OnMessage is defined as follow:
You see there is TMsg in a VCL project. Since TMsg is defined in Windows.pas is has nothing to do with the VCL style message record.