I am unable to get WM_SIZE command if i use this method (or WM_KEYUP with same return 0
in end):
case WM_KEYDOWN: {
keys[wParam] = 1;
return 0;
}
But it gives me WM_SIZE command when i use this:
case WM_KEYDOWN: {
keys[wParam] = 1;
break;
}
Could someone explain why is this happening?
在没有看到整个代码的情况下,我的猜测是return
语句阻止WM_KEYDOWN
消息被传递给默认的消息处理程序,例如DefWindowProc()
,因此窗口实际上不会处理键击并采取它需要生成的任何操作WM_KEYUP
和WM_SIZE
消息。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.