[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
device » register » CSharpandWindowsForms » J2ME » QbasicFAQ_Errors » BCD_Format » CppVclMouse » Win32 API » TopUsers » DelphiFAQ » CppVclWindowMessage
The example below shows how to trap all window messages:
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
device » register » CSharpandWindowsForms » J2ME » QbasicFAQ_Errors » BCD_Format » CppVclMouse » Win32 API » TopUsers » DelphiFAQ » CppVclWindowMessage
(C++ VCL) Window messages
The VCL blends nicely with window messages.The example below shows how to trap all window messages:
//Place an TApplicationEvents and TRichEdit on the Form
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
Application->OnMessage = ApplicationEvents1->OnMessage;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::ApplicationEvents1Message(tagMSG &Msg,
bool &)
{
if (Msg.message==0) return;
RichEdit1->Lines->Add( IntToStr(Msg.lParam) + '\t' + IntToStr(Msg.wParam));
}
//---------------------------------------------------------------------------
Window messages
Code links
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
