问题
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
来源:https://stackoverflow.com/questions/17965373/create-a-window-in-a-visual-studio-2012-console-application