|
헤더파일에 이렇게 넣었구요.
MESSAGE void __fastcall OnMouseEnter(TMessage& Message);
MESSAGE void __fastcall OnMouseLeave(TMessage& Message);
__published:
BEGIN_MESSAGE_MAP
VCL_MESSAGE_HANDLER(CM_MOUSEENTER, TMessage, OnMouseEnter);
VCL_MESSAGE_HANDLER(CM_MOUSELEAVE, TMessage, OnMouseLeave);
END_MESSAGE_MAP(TForm);
c++ 에
void __fastcall TForm1::OnMouseEnter(TMessage& Message)
{
Caption = "enter";
}
void __fastcall TForm1::OnMouseLeave(TMessage& Message)
{
Caption = "leave";
}
이렇게 넣었는데.. 이벤트가 엉성하게 일어나요.
Form 밖으로 나가도 이벤트가 발생하지 않는다거나
Form 안으로 들어와도 들어왔다는 이벤트가 발생하지 않네요.
왜 그러지요? 정확한 동작이 않 일어나니 신뢰도가 떨어져요.
|