VC++ - how to get mouse coordinates
i have some dynamically created CBitmapButtons in my CWizView(ViewArea). I need to capture the MouseMove messages when i move the mouse over this Bitmap Buttons. i am using CWizView::DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam) to capture the mouse events.
here the code
LRESULT CWizView::DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
// TODO: Add your specialized code here and/or call the base //class
if(message == WM_COMMAND)
{
if(LOWORD(wParam) == 4)//to isentify 4th button
{
if(HIWORD(wParam) == BN_CLICKED)
{
AfxMessageBox("CLICKED");
}
}
}
return CScrollView::DefWindowProc(message, wParam, lParam);
}
here BN_CLICKED used to find out the click message, like wise how to capture mouse move message over the dynamiccaly created buttons.
|