开发者

Keyboard repeat count

开发者 https://www.devze.com 2023-01-18 21:45 出处:网络
Hello i am having trouble utilising the repeat count parameter of the msg WM_KEYDOWN ... using visual c++ 2008

Hello i am having trouble utilising the repeat count parameter of the msg WM_KEYDOWN ... using visual c++ 2008 for some reason or the other the repeat count of the msg does not increment if the key is held for long.... for eg if i use this code::

----------

*TextOut(hdc,cxChar*2*(sizeof(szBuffer)/sizeof(TCHAR)),i*cyChar,szBuffer,wsp开发者_Python百科rintf(szBuffer,"%i",LOWORD(lParam)));*

the output on the screen is always a series of 1s... even if i havent released the key... Please help me out


The repeat count is not cumulative according to MSDN:

The repeat count for the current message. The value is the number of times the keystroke is autorepeated as a result of the user holding down the key. If the keystroke is held long enough, multiple messages are sent. However, the repeat count is not cumulative.

So probably multiple WM_KEYDOWN message is generated.

0

精彩评论

暂无评论...
验证码 换一张
取 消