Hi,
how can i get the position of a button on my dialog? im basically trying to find out when the mouse is over a particular button.
i tried this, but it didnt work:
CPoint ptCursor;
CRect rtButton;
CButton* cmdRecord = (CButton *)GetDlgItem(IDC_RECORD);
GetCursorPos(&ptCursor);
cmdRecord->GetClientRect(&rtButton);
if (rtButton.PtInRect(ptCursor))
{
// Etc...
}
Thanks
how can i get the position of a button on my dialog? im basically trying to find out when the mouse is over a particular button.
i tried this, but it didnt work:
CPoint ptCursor;
CRect rtButton;
CButton* cmdRecord = (CButton *)GetDlgItem(IDC_RECORD);
GetCursorPos(&ptCursor);
cmdRecord->GetClientRect(&rtButton);
if (rtButton.PtInRect(ptCursor))
{
// Etc...
}
Thanks