MFC中创建console窗口
2013-09-04 13:54
169 查看
HANDLE m_hConsoleOutput = NULL; if (!m_hConsoleOutput) { AllocConsole(); m_hConsoleOutput = GetStdHandle(STD_OUTPUT_HANDLE); char str[512] = "start Console Log...\n"; WriteConsole(m_hConsoleOutput, str, strlen(str), NULL, NULL); } if (m_hConsoleOutput) { char str[512] = "destroy console...\n"; WriteConsole(m_hConsoleOutput, str, strlen(str), NULL, NULL); CloseHandle(m_hConsoleOutput); FreeConsole(); }
相关文章推荐
- MFC 窗口的创建
- 利用MFC 在运行中动态创建新窗口
- 使用MFC创建悬浮窗口
- 在MFC,Win32程序中向控制台(Console)窗口输出调试信息
- MFC应用程序消息处理及其窗口创建和销毁过程函数调用顺序
- 最简单的MFC窗口创建_框架
- MFC的GUI窗口使用Console输出函数printf
- MFC控件的不创建窗口也允许激活的选项查探
- MFC 模态窗口和非模态窗口的创建
- MFC窗口创建、销毁消息流程
- MFC应用程序创建窗口的过程
- MFC中使用线程创建窗口的问题
- 用最短的MFC代码创建一个窗口
- MFC动态创建窗口
- vc++窗口的创建过程(MFC消息机制的经典文章)
- MFC的GUI窗口使用Console输出函数printf
- MFC的GUI窗口使用Console输出函数printf
- 在MFC的窗口创建之后修改窗口的标题
- MFC创建悬浮窗口
- MFC中创建并弹出子窗口