如何在多线程应用程序中将消息框置于前台? [英] How to bring messagebox in foreground in multithreaded application?

查看:89
本文介绍了如何在多线程应用程序中将消息框置于前台?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于在多线程应用程序中正在运行后台,因此我不得不将消息框强制设置为前台.请帮助我.

I have to force message box to foreground as it is running background in multithreaded application. pls help me wit this.

推荐答案

过得很愉快

如果您想在窗口的前台显示MessageBox,请使用它:
可能会帮您

无效a(){
HWND h = GetForegroundWindow();
MessageBox(h,_T("Hi"),0,0);
}

void CMyclass :: OnButton1Click(){
a();

}
have a good time

if you mean that you want to show a MessageBox in the foreground of the window, use it :
mabe help you

void a(){
HWND h=GetForegroundWindow();
MessageBox(h,_T("Hi"),0,0);
}

void CMyclass::OnButton1Click(){
a();

}


这篇关于如何在多线程应用程序中将消息框置于前台?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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