RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
Messages.TMessage Record

TMessage represents a Windows message.

Pascal
TMessage = packed record
  Msg: Cardinal;
  case Integer of
    0: (WParam: Longint;
        LParam: Longint;
        Result: Longint;);
    1: (WParamLo: Word;
        WParamHi: Word;
        LParamLo: Word;
        LParamHi: Word;
        ResultLo: Word;
        ResultHi: Word;);
end;
C++
struct TMessage {
  unsigned Msg;
  Longint WParam;
  Longint LParam;
  Longint Result;
  Word WParamLo;
  Word WParamHi;
  Word LParamLo;
  Word LParamHi;
  Word ResultLo;
  Word ResultHi;
};

Messages

The TMessage type represents a Windows message in WndProc and other methods. 

The Msg field represents the Windows Message code. 

The WParam field represents the WParam of the message. To access the low and high words of this field, use the WParamLo and WParamHi fields instead. 

The LParam field represents the LParam of the message. To access the low and high words of this field, use the LParamLo and LParamHi fields instead. 

The Result field holds the return value. To access the low and high words of this field, use the ResultLo and ResultHi fields instead. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!