MK_CONTROL 與 VK_CONTROL 有什麼區別,用&與用==的區別
阿新 • • 發佈:2019-01-23
What is the difference between MK_CONTROL and VK_CONTROL in Win32 API?
Firstly, I checked the defined values.
MK_CONTROL : 0x0008 VK_CONTROL : 0x11
Secondly, I tested in my simple code like this.
case WM_MOUSEMOVE: if(wParam & MK_CONTROL) // This works here. abort(); if(wParam & VK_CONTROL) // This doesn't work here. abort(); case WM_KEYDOWN: if(wParam & MK_CONTROL) // This doesn't work here. abort(); if(wParam & VK_CONTROL) // This works here. abort(); case WM_LBUTTONDOWN: if(wParam & MK_CONTROL) // This doens't work here. abort(); if(wParam == VK_CONTROL) // This doesn't work here. abort();
Does wParam value depend on the state of mouse device?
What is the difference between MK_.. and VK_.. thing?