Catch message in C++

0
//interface private in Pascal 
procedure CMDialogKey(Var Msg: TWMKey) ; 
message CM_DIALOGKEY; 

Jak w C++ Buldierze zadeklarowac takie nadpisanie funkcji zawierajajacej wiadomosc?</cpp>

0

dowiedziałem sie już, ze ciało funkcji ma wyglądać tak:

void __fastcall TForm1::CMDialogKey( Messages::TWMKey &Message ) 
{ 
TForm::Dispatch( (void*)&Message ); 
//VK_UP 
//VK_RIGHT 
// VK_DOWN 
if( Message.CharCode == VK_LEFT ) 
{ 
//...
}

Ale jak i gdzie to zadeklarować w pliku nagłówkowym, by działało?
Dzieki za wszelką pomoc

0
<cpp> class TForm1 : public TForm { __published: // IDE-managed Components TImage *Image1; TLabel *Label1; TMemo *Memo1; TEdit *Edit1; TEdit *Edit2; TEdit *Edit3; TEdit *Edit4; TEdit *Edit5; TEdit *Edit6; TEdit *Edit7; TStaticText *StaticText1; TStaticText *StaticText2; TStaticText *StaticText3; TStaticText *StaticText4; TStaticText *StaticText5; TEdit *Edit8; TButton *Button1; TLabel *Label2; TEdit *konsolaa; TImage *Image2; TEdit *Edit9; TButton *Button2; TBitBtn *BitBtn1; TBitBtn *BitBtn2; TTimer *Timer1; TTimer *Timer2; TImage *win; void __fastcall FormCreate(TObject *Sender); void __fastcall Button1Click(TObject *Sender); void __fastcall Button2Click(TObject *Sender); void __fastcall BitBtn1Click(TObject *Sender); void __fastcall BitBtn2Click(TObject *Sender); void __fastcall Timer1Timer(TObject *Sender); void __fastcall Timer2Timer(TObject *Sender); void __fastcall CMDialogKey( Messages::TWMKey &Message )

private: // User declarations
public: // User declarations
__fastcall TForm7(TComponent* Owner);
};
<cpp>

wydaje mi się , że plik nagłówkowy powinien wyglądć mniej więcej tak

1 użytkowników online, w tym zalogowanych: 0, gości: 1