<bdo id='IzhFE'></bdo><ul id='IzhFE'></ul>

<small id='IzhFE'></small><noframes id='IzhFE'>

<legend id='IzhFE'><style id='IzhFE'><dir id='IzhFE'><q id='IzhFE'></q></dir></style></legend><tfoot id='IzhFE'></tfoot>

    <i id='IzhFE'><tr id='IzhFE'><dt id='IzhFE'><q id='IzhFE'><span id='IzhFE'><b id='IzhFE'><form id='IzhFE'><ins id='IzhFE'></ins><ul id='IzhFE'></ul><sub id='IzhFE'></sub></form><legend id='IzhFE'></legend><bdo id='IzhFE'><pre id='IzhFE'><center id='IzhFE'></center></pre></bdo></b><th id='IzhFE'></th></span></q></dt></tr></i><div id='IzhFE'><tfoot id='IzhFE'></tfoot><dl id='IzhFE'><fieldset id='IzhFE'></fieldset></dl></div>

    1. 如何打印到 Win32 应用程序中的调试输出窗口?

      时间:2023-08-02
            <tbody id='azX51'></tbody>

          1. <i id='azX51'><tr id='azX51'><dt id='azX51'><q id='azX51'><span id='azX51'><b id='azX51'><form id='azX51'><ins id='azX51'></ins><ul id='azX51'></ul><sub id='azX51'></sub></form><legend id='azX51'></legend><bdo id='azX51'><pre id='azX51'><center id='azX51'></center></pre></bdo></b><th id='azX51'></th></span></q></dt></tr></i><div id='azX51'><tfoot id='azX51'></tfoot><dl id='azX51'><fieldset id='azX51'></fieldset></dl></div>

            <small id='azX51'></small><noframes id='azX51'>

          2. <legend id='azX51'><style id='azX51'><dir id='azX51'><q id='azX51'></q></dir></style></legend>
              • <bdo id='azX51'></bdo><ul id='azX51'></ul>

                <tfoot id='azX51'></tfoot>

                本文介绍了如何打印到 Win32 应用程序中的调试输出窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                我有一个已加载到 Visual Studio 2005 中的 win32 项目.我希望能够将内容打印到 Visual Studio 输出窗口,但我终生无法弄清楚如何.我试过 'printf' 和 'cout <<'但我的消息顽固地没有打印出来.

                I've got a win32 project that I've loaded into Visual Studio 2005. I'd like to be able to print things to the Visual Studio output window, but I can't for the life of me work out how. I've tried 'printf' and 'cout <<' but my messages stay stubbornly unprinted.

                是否有某种特殊的方式可以打印到 Visual Studio 输出窗口?

                Is there some sort of special way to print to the Visual Studio output window?

                推荐答案

                您可以使用 OutputDebugString.OutputDebugString 是一个宏,根据您的构建选项映射到 OutputDebugStringA(char const*)OutputDebugStringW(wchar_t const*).在后一种情况下,您必须为该函数提供一个宽字符串.要创建宽字符文字,您可以使用 L 前缀:

                You can use OutputDebugString. OutputDebugString is a macro that depending on your build options either maps to OutputDebugStringA(char const*) or OutputDebugStringW(wchar_t const*). In the later case you will have to supply a wide character string to the function. To create a wide character literal you can use the L prefix:

                OutputDebugStringW(L"My output string.");
                

                通常,您会像这样将宏版本与 _T 宏一起使用:

                Normally you will use the macro version together with the _T macro like this:

                OutputDebugString(_T("My output string."));
                

                如果您的项目配置为为 UNICODE 构建,它将扩展为:

                If you project is configured to build for UNICODE it will expand into:

                OutputDebugStringW(L"My output string.");
                

                如果您不是为 UNICODE 构建,它将扩展为:

                If you are not building for UNICODE it will expand into:

                OutputDebugStringA("My output string.");
                

                这篇关于如何打印到 Win32 应用程序中的调试输出窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:Win32 编程隐藏控制台窗口 下一篇:SendInput() 不等于在 C++ 键盘上手动按键?

                相关文章

                最新文章

                  <i id='c7jsE'><tr id='c7jsE'><dt id='c7jsE'><q id='c7jsE'><span id='c7jsE'><b id='c7jsE'><form id='c7jsE'><ins id='c7jsE'></ins><ul id='c7jsE'></ul><sub id='c7jsE'></sub></form><legend id='c7jsE'></legend><bdo id='c7jsE'><pre id='c7jsE'><center id='c7jsE'></center></pre></bdo></b><th id='c7jsE'></th></span></q></dt></tr></i><div id='c7jsE'><tfoot id='c7jsE'></tfoot><dl id='c7jsE'><fieldset id='c7jsE'></fieldset></dl></div>
                  • <bdo id='c7jsE'></bdo><ul id='c7jsE'></ul>

                    <legend id='c7jsE'><style id='c7jsE'><dir id='c7jsE'><q id='c7jsE'></q></dir></style></legend>
                  1. <tfoot id='c7jsE'></tfoot>
                  2. <small id='c7jsE'></small><noframes id='c7jsE'>