|
// Header에 포함시키시고용..
private: // User declarations
void __fastcall AppMessage(tagMSG &Msg, bool &Handled);
// Cpp에다가 포함시키시면.... 되겠죠
void __fastcall TForm1::FormCreate(TObject *Sender)
{
Application->OnMessage = AppMessage;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::AppMessage(tagMSG &Msg, bool &Handled)
{
if(Msg.message == WM_MOUSEMOVE){
POINT p;
GetCursorPos(&p);
if(PtInRect(&(Memo1->ClientRect),Memo1->ScreenToClient(p))){
if ( !Memo2->Visible )
Memo2->Visible = true;
}else{
if ( Memo2->Visible )
Memo2->Visible = false;
}
Handled = true;
}
}
어디서 퍼온것입니다.
^_^;;; 좋은 하루 되시길..
|