您的位置:首页 > 其它

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 console