I want to take a screenshot when to user presses "print screen" or ALT + "print screen". I succeed by listening for up keys:
case WM_KEYUP: {
switch(wParam) {
case VK_SNAPSHOT:
SwapChain::Get()->TakeScreenShot();
default:
return DefWindowProc(hWnd, msg, wParam, lParam);
}
}
case WM_SYSKEYUP: {
switch(wParam) {
case VK_SNAPSHOT:
SwapChain::Get()->TakeScreenShot();
default:
return DefWindowProc(hWnd, msg, wParam, lParam);
}
}
This does not work for down keys for VK_SNAPSHOT. Why is this the case?
↧