有关ASCII码表字符的问题 [英] Question about ASCII code table character

查看:103
本文介绍了有关ASCII码表字符的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我想知道ascii表中的第一个字符.它为NULL,我的问题是,如果我在Visual C ++ 6.0的PreTranslateMessage(MSG * pMsg)函数中使用它,是否意味着没有按下任何键.因为如果我键入VK_SHIFT,该函数会将其接受为Shift键.如果我输入NULL,它将接受它作为非按下键吗?
提前非常感谢.

解决方案

请考虑以下事项:
您坐在自己的房子里,想检查有人敲门的时间.当他们敲门时,您会受到打扰并执行一些操作(例如打开门).现在,您要检查何时有人没有敲门-您将如何处理?


虚拟键不是ASCII值.此处是指向虚拟密钥代码的链接: http://msdn.microsoft .com/en-us/library/dd375731(VS.85).aspx [ 解决方案

Consider this:
You sit in your house and want to check when someone knocks on your door. When they knock you get an interrupt and perform some action (such as opening the door). Now you want to check when someone does not knock on your door - how would you do that?


Virtual keys are not ASCII values. Here''s a link to the codes for virtual keys: http://msdn.microsoft.com/en-us/library/dd375731(VS.85).aspx[^] . As you can see, 0x0 is not even listed as a value, so I can only assume that it is undefined.


You are asking to test if some event has not occurred, which makes little sense. You can test for an event occurring, at which time you perform some action. If the event does not occur then the action is not taken. The message loop can only capture messages that are sent to your application, it cannot signal messages that are not sent.


这篇关于有关ASCII码表字符的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆