将焦点转移到其他MFC应用程序 [英] Getting Focus to other MFC Application

查看:64
本文介绍了将焦点转移到其他MFC应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我在MFC中有一个与计费应用程序集成的项目.我们有两个单独的MFC窗口:
1)一个用于计费应用程序.和其他
2)项目.

最初我们使用项目窗口登录,然后使用项目窗口开始交易.交易之后,我们需要单击Billing Application上的按钮,但是焦点仍然在项目窗口上.如何将focus/KeyPressEvent设置为计费应用程序?

谢谢,
ksh

Hi,

I have a project in MFC which is integrated with a billing application.We have two seperate MFC window:
1)One for Billing App. and other for
2)the project.

Initially we log in with the project window.then we start transaction with the project window.after transaction we need to click a button on Billing Application,but the focus is still on the project window.How can we set the focus/KeyPressEvent to the Billing App?

Thanks,
ksh

推荐答案

鉴于我了解到您没有开票"窗口的代码...

我会找到您要激活的窗口( http://msdn.microsoft.com/en-us/library/windows/desktop/ms633499(v=vs.85).aspx [ http://msdn.microsoft .com/en-us/library/windows/desktop/ms633499(v = vs.85).aspx [
Given the fact that I understand that you don''t have the code of the Billing window...

I would find the window you want to activate (http://msdn.microsoft.com/en-us/library/windows/desktop/ms633499(v=vs.85).aspx[^]) and then use the returned HWND to call ShowWindow and show it again in the state you want: http://msdn.microsoft.com/en-us/library/windows/desktop/ms633499(v=vs.85).aspx[^].

Hope this helps.


这篇关于将焦点转移到其他MFC应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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