b2科目四模拟试题多少题驾考考爆了怎么补救
b2科目四模拟试题多少题 驾考考爆了怎么补救

translatemessage_windows createfile_dispatchmessage

电脑杂谈  发布时间:2017-05-28 09:01:08  来源:网络整理

dispatchmessage_translatemessage_windows createfile

translatemessage

TranslateMessage函数将虚拟键消息转换成字符消息。该字符消息又被发送给对应线程(调用TranslateMessage的线程)的消息队列,当线程再次调用GetMessage函数或PeekMessage函数获取消息的时候被读取。

函数原型:

BOOL TranslateMessage(

const MSG *lpMsg

);

参数说明:

lpMsg:指向由GetMessage或PeekMessage从调用线程消息队列获取的MSG信息结构。

返回:

如果消息被转换(相应的字符消息被发送到调用线程的消息队列),返回将为非零。translatemessage

如果消息是 WM_KEYDOWN, WM_KEYUP, WM_SYSKEYDOWN, 或 WM_SYSKEYUP,返回非零,转换情况将被忽略。

如果消息没有转换(即,相应的字符消息没被发送到调用线程的消息队列中),返回将是零。

translatemessage_windows createfile_dispatchmessage

注意事项:

TranslateMessage函数不修改由参数lpMsg指向的消息结构。

消息WM_KEYDOWN和WM_KEYUP组合产生一个WM_CHAR或WM_DEADCHAR消息。消息WM_SYSKEYDOWN和WM_SYSKEYUP组合产生一个WM_SYSCHAR或 WM_SYSDEADCHAR 消息。

TtanslateMessage函数仅为那些由键盘驱动器映射为ASCII字符的键产生WM_CHAR消息。

如果应用程序由于其它用途而需要处理虚拟键消息,则不应调用TranslateMessage函数。例如,当应用程序的TranslateAccelerator函数返回一个非零时,它就不应该调用TranslateMessage函数。注意,应用程序负责检索和调度输入消息到该对话框,大多数程序使用主循环来完成这一工作。然而,要让用户可以通过键盘来进行控制操作,那么该程序必须调用IsDialogMessage函数。

The TranslateMessage functiontranslates virtual-key messages into character messages. The character messagesare posted to the calling thread's message queue, to be read the next time thethread calls the GetMessage or PeekMessage function.

Syntax

BOOLTranslateMessage(

const MSG*lpMsg

);

Parameters

translatemessage_dispatchmessage_windows createfile

lpMsg

[in]Pointer to an MSGstructure that contains message information retrieved from the calling thread'smessage queue by using theGetMessage orPeekMessage function.

Return Value

If the message istranslated (that is, a character message is posted to the thread's messagequeue), the return value is nonzero.

If the message isWM_KEYDOWN, WM_KEYUP, WM_SYSKEYDOWN, or WM_SYSKEYUP, the return value isnonzero, regardless of the translation.


本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/ruanjian/article-49686-1.html

相关阅读
    发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

    热点图片
    拼命载入中...