From f7762daa92f584c34af1a1dcbe8ff400eb9921a0 Mon Sep 17 00:00:00 2001 From: RadAd Date: Mon, 27 May 2019 12:40:09 +1000 Subject: Support scrollbar --- WinUtils.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'WinUtils.h') 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 }; -- cgit v1.2.3