TAppEventsOnMessage (C++)
Description
This example requires that a TApplicationEvents and a TListBox are on the form. Select the TApplicationEvents, double-click the OnMessage event, and add the following code to the handler. OnMessage is triggered when the application receives a Windows message.
Code
void __fastcall TAppEventForm::ApplicationEventsMessage(tagMSG &Msg,
bool &Handled)
{
lbOnMessage->Items->Add("X:=" + IntToStr(int(Msg.pt.x)) + "|Y:=" + IntToStr(int(Msg.pt.y)));
}