• <bdo id='YOf4i'></bdo><ul id='YOf4i'></ul>
    <legend id='YOf4i'><style id='YOf4i'><dir id='YOf4i'><q id='YOf4i'></q></dir></style></legend>

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

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

    <tfoot id='YOf4i'></tfoot>

      如何检查窗口是否“始终在顶部"?

      时间:2023-08-01
        <i id='QzLcN'><tr id='QzLcN'><dt id='QzLcN'><q id='QzLcN'><span id='QzLcN'><b id='QzLcN'><form id='QzLcN'><ins id='QzLcN'></ins><ul id='QzLcN'></ul><sub id='QzLcN'></sub></form><legend id='QzLcN'></legend><bdo id='QzLcN'><pre id='QzLcN'><center id='QzLcN'></center></pre></bdo></b><th id='QzLcN'></th></span></q></dt></tr></i><div id='QzLcN'><tfoot id='QzLcN'></tfoot><dl id='QzLcN'><fieldset id='QzLcN'></fieldset></dl></div>

          <bdo id='QzLcN'></bdo><ul id='QzLcN'></ul>
            <tbody id='QzLcN'></tbody>

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

            • <legend id='QzLcN'><style id='QzLcN'><dir id='QzLcN'><q id='QzLcN'></q></dir></style></legend>
              1. <tfoot id='QzLcN'></tfoot>
                本文介绍了如何检查窗口是否“始终在顶部"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                在我有用的热键程序中,我有一个全局热键,它通过调用

                In my useful hotkeys program, i have a global hotkey which sets your current foreground window to be Topmost/Not topmost by calling

                SetWindowPos(hwnd, HWND_TOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
                SetWindowPos(hwnd, HWND_NOTOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
                

                目前我必须有两个单独的热键,Win+Z 将窗口设置为 TOPMOST 和 Win+X 将窗口设置为 NOTOPMOST.

                at the moment i have to have two separate hotkeys, Win+Z to set window to TOPMOST anjd Win+X to set window to NOTOPMOST.

                我在 MSDN 中找不到可以让您检查 windows z 顺序的函数.我希望有类似 GetWindowOrder 的东西,但没有.我也试过像这样检查 windows ex 标志:

                I can't find a function in MSDN which lets you check the windows z order.. i was hoping for something like GetWindowOrder, but there isn't. I also tried checking the windows ex flags like so:

                dwExStyles & WS_EX_TOPMOST
                

                但似乎标志从未改变,它只是告诉窗口在第一次创建时将自己设置为最顶层.

                but it seems that flag isn't never changed, it just tells the window to set itself topmost when its first created.

                有没有检查这个的功能?

                Is there a function to check this?

                推荐答案

                我认为你可以这样做:

                DWORD dwExStyle = ::GetWindowLong(m_hWnd, GWL_EXSTYLE);
                
                if ((dwExStyle & WS_EX_TOPMOST) != 0)
                {
                    // do stuff
                }
                

                这是 MSDN 链接 - http://msdn.microsoft.com/en-us/library/ms633584(VS.85).aspx

                Here's the MSDN link - http://msdn.microsoft.com/en-us/library/ms633584(VS.85).aspx

                这里是扩展样式的 MSDN 链接 - http://msdn.microsoft.com/en-us/library/ff700543(v=VS.85).aspx - topmost 目前被列为待定":)

                And here's the MSDN link to the extended styles - http://msdn.microsoft.com/en-us/library/ff700543(v=VS.85).aspx - topmost is currently listed as "TBD" :)

                这篇关于如何检查窗口是否“始终在顶部"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:Visual Studio 2013:CL.exe 退出,代码为 -1073741515 下一篇:C++:在 Windows 上使用 C++ 读写 BMP 文件的最简单方法

                相关文章

                最新文章

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

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

                <legend id='y8nmH'><style id='y8nmH'><dir id='y8nmH'><q id='y8nmH'></q></dir></style></legend>

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