aboutsummaryrefslogtreecommitdiff
path: root/WinUtils.h
diff options
context:
space:
mode:
Diffstat (limited to 'WinUtils.h')
-rw-r--r--WinUtils.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/WinUtils.h b/WinUtils.h
index 4498099..68f7058 100644
--- a/WinUtils.h
+++ b/WinUtils.h
@@ -18,6 +18,24 @@ inline BOOL UnadjustWindowRect(
return fRc;
}
+inline BOOL UnadjustWindowRectEx(
+ LPRECT prc,
+ DWORD dwStyle,
+ BOOL fMenu,
+ DWORD dwExStyle)
+{
+ RECT rc;
+ SetRectEmpty(&rc);
+ BOOL fRc = AdjustWindowRectEx(&rc, dwStyle, fMenu, dwExStyle);
+ if (fRc) {
+ prc->left -= rc.left;
+ prc->top -= rc.top;
+ prc->right -= rc.right;
+ prc->bottom -= rc.bottom;
+ }
+ return fRc;
+}
+
inline RECT Rect(POINT p1, POINT p2)
{
return { p1.x, p1.y, p2.x, p2.y };