Moving mouse over the buttons.
-
Hi. Well.. I am developing a little game and a have this trouble. I want to make the window scroll by clicking and draging. It already works and works fine. But... My map is made of buttons and when i try to move the window by clicking and draging at the buttons positions main window doesn't recive ON_WM_MOUSEMOVE signal. So how can i make my application to generate ON_WM_MOUSEMOVE when i am clicking buttons? Tnx for help.
-
Hi. Well.. I am developing a little game and a have this trouble. I want to make the window scroll by clicking and draging. It already works and works fine. But... My map is made of buttons and when i try to move the window by clicking and draging at the buttons positions main window doesn't recive ON_WM_MOUSEMOVE signal. So how can i make my application to generate ON_WM_MOUSEMOVE when i am clicking buttons? Tnx for help.
When the left mouse button is pressed on a button, the expected behavior is a button click. Do you not want that behavior? Is the button not click-able? If yes, then how do you want it to scroll?
«_Superman_» I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++) -
When the left mouse button is pressed on a button, the expected behavior is a button click. Do you not want that behavior? Is the button not click-able? If yes, then how do you want it to scroll?
«_Superman_» I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++)Well. Button is clickable, but i want that my main window recive message wm_mousemove instead of button. I solved it a little while ago with
void MPictureBox::OnMouseMove(UINT nFlags, CPoint point)
{
CRect pRect;
CPoint cp;
GetCursorPos(&cp);
this->GetParent()->ScreenToClient(&cp);
LPARAM lParam = ((cp.y) << 16) + cp.x;
this->GetParent()->PostMessageA(WM_MOUSEMOVE,nFlags,lParam);}
But anyway thanks =)