AdjustWindowRect documentation
AdjustWindowRect documentation
本文关键字:documentation AdjustWindowRect 更新时间:2023-10-16
MSDN 库将 AdjustWindowRect 的 dwStyle 参数记录为:
要计算其所需大小的窗口的窗口样式。请注意,您不能 指定WS_OVERLAPPED样式。
我还没有找到任何解释。他们所说的"不能"是什么意思,为什么我不能这样做?
WS_OVERLAPPED
样式定义为零:
#define WS_OVERLAPPED 0x00000000L
AdjustWindowRect()
正在检查提供的样式标志并相应地修改 RECT:
// ...
if( dwStyle & WS_BORDER ) {
const int cx = GetSystemMetrics(SM_CXBORDER);
const int cy = GetSystemMetrics(SM_CYBORDER);
lpRect->top -= cy;
lpRect->left -= cx;
lpRect->right += cx;
lpRect->bottom += cy;
}
// ...
因此,将 dwStyle 参数设置为 0
的AdjustWindowRect()
不会更改 lpRect,因此不能使用WS_OVERLAPPED
。
如果要计算顶级框架的大小,可以改用WS_OVERLAPPEDWINDOW
或WS_CAPTION|WS_THICKFRAME
。
相关文章:
- AdjustWindowRect documentation
- Attaching Documentation in Visual Studio (à la Eclipse)
- libmorph API documentation
- 从doxygen的"File documentation"列表中排除"README.md"
- Documentation for PyCFunction_New / PyCFunction_NewEx
- Android NDK: gnustl_static library documentation?
- unixODBC C++ documentation...?
- setenv, and getenv documentation
- boost asio async_read documentation
- 如何将 Doxygen 的 "Documentation at other places" 功能与专门的模板类一起使用?