Original Post
🔒 Locked
WM_MOUSEMOVE
Advertisement
Is WM_LBUTTONDOWN what you're looking for?
I think i wasn't very clear to explain what i want. sorry.
I need to be able to do the following:
Suppose there is an object on the screen, I click on it with left mouse button, i press the shift key, and while holding left mouse button and shift key together - i move the mouse, so that a clone of this object is created and dragged. So it's all 3 events together: mouse is moving, button is clicked and a key is pressed. WM_MOUSEMOVE can only give you 2 events: moving mouse and pressing shift, or moving mouse and clicking a mouse button, but not all three at the same time. I need all three of them at the same time.
I need to be able to do the following:
Suppose there is an object on the screen, I click on it with left mouse button, i press the shift key, and while holding left mouse button and shift key together - i move the mouse, so that a clone of this object is created and dragged. So it's all 3 events together: mouse is moving, button is clicked and a key is pressed. WM_MOUSEMOVE can only give you 2 events: moving mouse and pressing shift, or moving mouse and clicking a mouse button, but not all three at the same time. I need all three of them at the same time.
Thanks for the hint!
I figured out the problem with the following code
//global variable
bool ShiftLClickDown = false;
LRESULT WINAPI MsgProc(...)
//Buttons DOWN
case WM_LBUTTONDOWN:
{
switch (wParam)
{
case 5: //5 stands for Shift
ShiftLClickDown = true;
break;
//you can add more cases here for CTRL and other buttons
}
break;
}
case WM_MOUSEMOVE:
{
//shift is down + move + lclick
if (ShiftLClickDown)
{
printf("triple event here!\n");
break;
}
....
I figured out the problem with the following code
//global variable
bool ShiftLClickDown = false;
LRESULT WINAPI MsgProc(...)
//Buttons DOWN
case WM_LBUTTONDOWN:
{
switch (wParam)
{
case 5: //5 stands for Shift
ShiftLClickDown = true;
break;
//you can add more cases here for CTRL and other buttons
}
break;
}
case WM_MOUSEMOVE:
{
//shift is down + move + lclick
if (ShiftLClickDown)
{
printf("triple event here!\n");
break;
}
....
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement