TMessage is not TMsg!
TMessage is defined in Unit Messages and should not be mixed up with TMsg (Windows.pas) in the following case:
type
TForm1 = class(TForm)
public
procedure XY(var Msg : TMessage); message WM_TEST;
end;
…
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.
[Update]
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.
One Response
andrei
17|May|2008 1Great !
You’re doing a good job !
Leave a reply
You must be logged in to post a comment.