Create a Window in a Visual Studio 2012 console ap

2019-07-18 21:49发布

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条回答
三岁会撩人
2楼-- · 2019-07-18 22:34

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

查看更多
登录 后发表回答