-
Mouse Messages
I'm trying to find out wether the control button while a mouse click is down, I'll show you one way I tried. I'm using Standard API
Code:
case WM_LBUTTONDOWN:
if(wParam == MK_CONTROL)
{
hdc = GetDC(hwnd);
TextOut(hdc, 30, 30, "Mouse with Control", strlen("Mouse with Control"));
ReleaseDC(hwnd,hdc);
}
break;
I've tried switch statements, google, etc.
I'd appreciate any help, Thanks.
-
wParam in this instance is a bit mask and will contain MK_CONTROL and MK_LBUTTON thus testing to see if wParam is equal to MK_CONTROL will fail. You need to test to see if wParam has MK_CONTROL set...
Code:
if(wParam == MK_CONTROL)
... should be...
Code:
if(wParam & MK_CONTROL)
-