|
밑에서 찾아보시면 되셨을텐뎅..-0-
하여튼 답입니다.
void __fastcall TForm1::AppMessage(tagMSG &Msg, bool &Handled)
{
if(Msg.message == WM_MOUSEMOVE){
POINT p;
GetCursorPos(&p);
if(PtInRect(&(Panel1->ClientRect),Panel1->ScreenToClient(p))){
if ( Panel1->Color == clBtnFace)
Panel1->Color = clRed;
}else{
if ( Panel1->Color == clRed)
Panel1->Color = clBtnFace;
}
Handled = true;
}
}
void __fastcall TForm1::FormCreate(TObject *Sender)
{
Application->OnMessage = AppMessage;
}
|