How to get size and position of window caption buttons (minimise, restore, close)(如何获取窗口标题按钮的大小和位置(最小化、恢复、关闭))
问题描述
是否有 API 调用来确定窗口标题按钮的大小和位置?我正在尝试将 vista 样式的标题按钮绘制到所有者绘制的窗口上.我正在处理 c/c++/mfc.
有人有绘制关闭按钮的代码示例吗?
我找到了获取vista中按钮位置所需的函数:
Is there an API call to determine the size and position of window caption buttons? I'm trying to draw vista-style caption buttons onto an owner drawn window. I'm dealing with c/c++/mfc.
Edit: Does anyone have a code example to draw the close button?
I've found the function required to get the position of the buttons in vista: WM_GETTITLEBARINFOEX
This link also shows the system metrics required to get all the spacing correct (shame it's not a full dialog picture though). This works perfectly in Vista, and mostly in XP (in XP there is slightly too much of a gap between the buttons).
这篇关于如何获取窗口标题按钮的大小和位置(最小化、恢复、关闭)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何获取窗口标题按钮的大小和位置(最小化、恢复、关闭)
基础教程推荐
- 随机插入/删除的综合向量与链表基准 2022-01-01
- C++:获取传递给函数的多维数组的行大小 2021-01-01
- 如何更改 SysDateTimePick32 或 CDateTimeCtrl 的背景颜色? 2022-01-01
- c++ STL设置差异 2022-01-01
- 将不可复制的闭包对象传递给 std::function 参数 2021-01-01
- 如何部分禁用 cmake C/C++ 自定义编译器检查 2021-01-01
- 如何在 C++ 中正确使用命名空间? 2022-01-01
- 为什么我们不能使用“虚拟继承"?在 COM 中? 2022-01-01
- 提升 ASIO 流缓冲 2021-01-01
- 与 CAS 的原子交换(使用 gcc 同步内置函数) 2022-01-01
