获取非客户端“关闭"的 hWnd按钮 [x] (win32) [英] Get the hWnd of the non-client "close" button [x] (win32)
问题描述
我的应用需要显示一个指向右上角
角[x]
按钮的信息气球,指示必须通过单击指向的
按钮关闭窗口[x]
按钮.
My app needs to display an info balloon pointing to the upper-right
corner [x]
button indicating the window has to be closed by clicking the pointed [x]
button.
出于这个原因,我需要获取 [x]
按钮 hWnd
或者如果知道它的(未记录的)资源 ID.你们知道如何用普通的 win32 做到这一点吗?
for this reason I need to get the [x]
button hWnd
or if known its (undocumented) resource Id. Do you guys know how to do this with plain win32?
我尝试过其他处理非客户端元素指标的替代方法,但它们都给出了不一致的结果(考虑我的应用从 W2K
运行到 W8
)
I have tried other alternatives dealing with non-client element metrics but they all gave unconsistent results (consider my app runs from W2K
to W8
)
谢谢
推荐答案
那里的关闭按钮没有窗口,也没有单独的HWND
.相反,它与可能的其他元素一起被底层 WindowProc
绘制为非客户区的一部分.
The close button there is not a window, and it does not have a separate HWND
. Instead, it is painted along with possibly other elements by underlying WindowProc
as a part of non-client area.
这篇关于获取非客户端“关闭"的 hWnd按钮 [x] (win32)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!