在让应用程序响应键盘的同时暂停一个例程中的代码执行 [英] pause the execution of code in one routine while letting the app respond to keyboard

查看:60
本文介绍了在让应用程序响应键盘的同时暂停一个例程中的代码执行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Sleep(100)并且工作正常。


但是,如果我的应用程序继续接收和处理会更好

键盘消息。


如何让应用程序

响应键盘输入,在一个例程中暂停执行代码?

谢谢

I''m using Sleep(100) and that works OK.

However, it would be better if my app continued to receive and process
keyboard messages.

How can I pause the execution of code in one routine while letting the app
respond to keyboard input?
Thanks

推荐答案

"弗兰克" < fr *** @ a-znet.com写信息

新闻:em ************* @ TK2MSFTNGP06.phx.gbl ...
" Frank" <fr***@a-znet.comwrote in message
news:em*************@TK2MSFTNGP06.phx.gbl...

我正在使用Sleep(100)并且运行正常。


但是,如果我的应用程序继续使用它会更好接收和处理

键盘消息。


如何在一个例行程序中暂停执行代码,同时让应用程序

响应键盘输入?
I''m using Sleep(100) and that works OK.

However, it would be better if my app continued to receive and process
keyboard messages.

How can I pause the execution of code in one routine while letting the app
respond to keyboard input?



是否需要在托管或本机应用程序中执行此操作?


问候,


Is it in a managed or native application that you need to do that?

Regards,
Will


Native

" William DePalo [MVP VC ++]" < wi *********** @ mvps.orgwrote in message

news:%2 **************** @ TK2MSFTNGP03 .phx.gbl ...
Native
"William DePalo [MVP VC++]" <wi***********@mvps.orgwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...

>"弗兰克" < fr *** @ a-znet.com写了留言
新闻:em ************* @ TK2MSFTNGP06.phx.gbl ...
>" Frank" <fr***@a-znet.comwrote in message
news:em*************@TK2MSFTNGP06.phx.gbl...

>我正在使用Sleep(100)并且运行正常。

但是,如果我的应用程序继续接收和处理
键盘消息。

如何让
应用程序响应键盘输入,在一个例程中暂停执行代码?
>I''m using Sleep(100) and that works OK.

However, it would be better if my app continued to receive and process
keyboard messages.

How can I pause the execution of code in one routine while letting the
app respond to keyboard input?



是否需要在托管或本机应用程序中执行此操作?


问候,



Is it in a managed or native application that you need to do that?

Regards,
Will



这是本机代码。

我正在循环并在循环内会工作

或者在睡觉时收到信息 - 无论哪种方式都可以

..

..

..

睡觉(100)

允许键盘消息

..

..

..


" William DePalo [MVP VC ++]" < wi *********** @ mvps.orgwrote in message

news:%2 **************** @ TK2MSFTNGP03 .phx.gbl ...
This is native code.
I''m looping and within the loop this would work
Or receive the messages while sleeping - either way would be OK
..
..
..
sleep(100)
allow key board messages
..
..
..

"William DePalo [MVP VC++]" <wi***********@mvps.orgwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...

>"弗兰克" < fr *** @ a-znet.com写了留言
新闻:em ************* @ TK2MSFTNGP06.phx.gbl ...
>" Frank" <fr***@a-znet.comwrote in message
news:em*************@TK2MSFTNGP06.phx.gbl...

>我正在使用Sleep(100)并且运行正常。

但是,如果我的应用程序继续接收和处理
键盘消息。

如何让
应用程序响应键盘输入,在一个例程中暂停执行代码?
>I''m using Sleep(100) and that works OK.

However, it would be better if my app continued to receive and process
keyboard messages.

How can I pause the execution of code in one routine while letting the
app respond to keyboard input?



是否需要在托管或本机应用程序中执行此操作?


问候,



Is it in a managed or native application that you need to do that?

Regards,
Will



这篇关于在让应用程序响应键盘的同时暂停一个例程中的代码执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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