在GUI应用程序中打开控制台 [英] Open console inside gui application

查看:77
本文介绍了在GUI应用程序中打开控制台的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建一个C ++程序,并以CMD形式向他打开,以便我可以在该程序内部的CMD中运行一个程序.例如,在这张照片中:

http://i.stack.imgur.com/d6jes.jpg [ http://www.geekpedia.com/tutorial230_Capturing-带有API调用的表单中的应用程序. [

I''m trying to create a program in C++, which open with him, within the form, the CMD, so that I can run a program within the CMD that is inside the program. As an example, in this photo:

http://i.stack.imgur.com/d6jes.jpg[^]

I found some examples, but could not implement them in code, so, I ask your help... To be more precise, I want to create a function in a dll, so I can call this CMD, starting from any language

examples like this: http://www.geekpedia.com/tutorial230_Capturing-Applications-in-a-Form-with-API-Calls.html[^]
But, in this sample, the code is writed in C#, and, i want C++/C, and, if is possible, show de cmd, without the dialog, only the cmd, without the close button, title....

basically an embedding a Console

Thanks (:

推荐答案

在C ++中,您可以像在C#程序中一样使用FindWindowSetParentSetWindowPos API. > 另一种方法是使用AllocConsole API为程序创建控制台.
In C++, you can use the FindWindow, SetParent and SetWindowPos APIs as is used in the C# program.
Another way to do this is to use the AllocConsole API to create a console for the program.


快速搜索出现在
A quick search turned up this article[^].


这篇关于在GUI应用程序中打开控制台的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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