Assuming this is inside your winproc:
if(wParam & MK_SHIFT) { if (wParam & MK_CONTROL && wParam & MK_SHIFT) { //click+Shift+Ctrl } else if(wParam & MK_SHIFT && HIBYTE(GetKeyState(VK_MENU)) & 0x80) { //alt+shift } else { //just shift } }
Shift and click and alt are a bit more complicated, you have to use a different way
Why is that? You will see on the page WM_LBUTTONDOWN that for each sent signal you have the specified parameters. One of them is wparam. It can have different meanings depending on whether any special keys are pressed or not.
And since the wparam of the WM_LBUTTONDOWN signal does not contain information about the alt button, you will need to use the GetKeyState function, which returns a high bit of order 1 if the key is omitted, and something else if it is not.
source share