如何在C ++中添加显示对话框 [英] how to add show the dialog box in c++

查看:179
本文介绍了如何在C ++中添加显示对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我在vc 6.0中创建了Windows服务.
我添加了对话框. (插入->资源)
我添加头文件.现在它没有给出任何编译错误.
服务功能调用之前,我需要启动该对话框.
怎么做.
任何使用服务exe添加mfc的示例.



i created the windows service in vc 6.0.
i added the dialog box . (Insert -> Resource)
i add the header files. now it not giving any compilation error.
i need to launch that dialog-box before service function calls.
how to do that.
any examples to add mfc with service exe.

推荐答案

糟糕的主意. Windows Services的机制并非旨在显示任何UI:应该在没有用户登录时起作用,因此该在哪里显示给谁看?有想法吗?

但是,您可以创建一个单独的UI应用程序,该应用程序通过某种IPC(可以称为管道,套接字等)与您的服务进行通信.

—SA
Bad idea. The mechanism of Windows Services is not designed to show any UI: it is supposed to work when no users are logged in, so where to show it, to whom? Got the thought?

However, you can create a separate UI application communicating with your service via some kind of IPC (could be named pipes, sockets, etc.)

—SA


这篇关于如何在C ++中添加显示对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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