aboutsummaryrefslogtreecommitdiff
path: root/WinUtils.h
diff options
context:
space:
mode:
authorRadAd <adamgates84+github@gmail.com>2019-05-27 12:40:09 +1000
committerRadAd <adamgates84+github@gmail.com>2019-05-27 12:40:09 +1000
commitf7762daa92f584c34af1a1dcbe8ff400eb9921a0 (patch)
treecdf9202054c94a8a1c2702e373966966ae2b6c7c /WinUtils.h
parentc8fe70f713e273e14fb998a663e787f320093fae (diff)
downloadRadTerminal-f7762daa92f584c34af1a1dcbe8ff400eb9921a0.tar.gz
RadTerminal-f7762daa92f584c34af1a1dcbe8ff400eb9921a0.zip
Support scrollbar
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 };