按钮怎么不隐藏???????
void CTEXTDLG::OnMouseMove(UINT nFlags, CPoint point) {
// TODO: Add your message handler code here and/or call default
CPoint pt;
CRect rect;
GetCursorPos(&pt);
m_btn1.GetWindowRect(&rect);
//m_btn2.GetWindowRect(&rect2);
if(rect.PtInRect(pt))
{
m_btn1.ShowWindow(SW_HIDE);
m_btn2.ShowWindow(SW_SHOW);
}
else
{
m_btn1.ShowWindow(SW_SHOW);
m_btn2.ShowWindow(SW_HIDE);
}
CDialog::OnMouseMove(nFlags, point);
}
为什么在鼠标放到btn1上的时候该按钮不会隐藏???????