将GUI添加到c ++ win32控制台 [英] Adding GUI to c++ win32 console

查看:336
本文介绍了将GUI添加到c ++ win32控制台的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个现有的C ++ win32控制台应用程序。这个应用程序包含一个主程序,从硬件实时连续处理一些数据,并有一个服务器组件(线程)将数据流式传输到客户端。

I have an existing C++ win32 console app. This application contains a main program that continuously process some data from hardware in real time and has a server component (threaded) to stream the data out to clients.

如果可以为用户创建一个GUI,以便在运行此控制台程序之前输入一些程序参数。 GUI i仅打算显示控制台程序的状态,例如。运行,用户单击开始按钮后不需要用户交互。

I am thinking if it is possible to create a GUI for users to enter some program parameters before running this console program. The GUI i intend to only show the status of the console program, eg. running, no user interaction would be needed after the user clicks a Start button.

任何建议如果这是可能的?谢谢!

Any advise if this is possible? Thanks!

推荐答案

当然,只要创建一个线程窗口消息循环,完成。这可能需要一个单独的线程来描述你的描述,虽然可以设想其他的方式,这取决于你现有的代码的确切细节。

Absolutely, just create a thread with a window message loop and you're done. This will likely require a separate thread for what you describe, although one could conceive other ways, depending on the exact details of your existing code.

匡威:一个GUI应用程序也可以创建一个控制台并输出到它。

The same is true for the converse: a GUI app can also create a console and output to it.

这篇关于将GUI添加到c ++ win32控制台的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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