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

    1. <small id='NzUaj'></small><noframes id='NzUaj'>

      <tfoot id='NzUaj'></tfoot>

        如何在 Windows 应用程序中截取屏幕截图?

        时间:2023-08-02
        • <tfoot id='EcJsz'></tfoot>
        • <legend id='EcJsz'><style id='EcJsz'><dir id='EcJsz'><q id='EcJsz'></q></dir></style></legend>

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

                  <tbody id='EcJsz'></tbody>
                <i id='EcJsz'><tr id='EcJsz'><dt id='EcJsz'><q id='EcJsz'><span id='EcJsz'><b id='EcJsz'><form id='EcJsz'><ins id='EcJsz'></ins><ul id='EcJsz'></ul><sub id='EcJsz'></sub></form><legend id='EcJsz'></legend><bdo id='EcJsz'><pre id='EcJsz'><center id='EcJsz'></center></pre></bdo></b><th id='EcJsz'></th></span></q></dt></tr></i><div id='EcJsz'><tfoot id='EcJsz'></tfoot><dl id='EcJsz'><fieldset id='EcJsz'></fieldset></dl></div>
                  <bdo id='EcJsz'></bdo><ul id='EcJsz'></ul>
                  本文介绍了如何在 Windows 应用程序中截取屏幕截图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  如何使用 Win32 截取当前屏幕的屏幕截图?

                  How can I take a screenshot of the current screen using Win32?

                  推荐答案

                  HDC hScreenDC = GetDC(nullptr); // CreateDC("DISPLAY",nullptr,nullptr,nullptr);
                  HDC hMemoryDC = CreateCompatibleDC(hScreenDC);
                  int width = GetDeviceCaps(hScreenDC,HORZRES);
                  int height = GetDeviceCaps(hScreenDC,VERTRES);
                  HBITMAP hBitmap = CreateCompatibleBitmap(hScreenDC,width,height);
                  HBITMAP hOldBitmap = static_cast<HBITMAP>(SelectObject(hMemoryDC,hBitmap));
                  BitBlt(hMemoryDC,0,0,width,height,hScreenDC,0,0,SRCCOPY);
                  hBitmap = static_cast<HBITMAP>(SelectObject(hMemoryDC,hOldBitmap));
                  DeleteDC(hMemoryDC);
                  DeleteDC(hScreenDC);
                  

                  这篇关于如何在 Windows 应用程序中截取屏幕截图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:Windows 服务如何执行 GUI 应用程序? 下一篇:什么是“错"使用 C++ wchar_t 和 wstrings?宽字符有

                  相关文章

                  最新文章

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

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

                    <tfoot id='WhZKl'></tfoot>