Is there a way to create a Window in a C++ Console Application? I have already a console application for creating some data and I want to show them in some graphics, but not inside the console. Is this possible?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You use a function called CreateWindowEx(), See here.
It's rather complex, you need to create a WNDCLASSEX structure and use RegisterClassEx() on it before passing it as a parameter to CreateWindowEx(). You also need to create Message Procedure function.
This article on MSDN runs through it quite nicely