aboutsummaryrefslogtreecommitdiffhomepage
path: root/win32/ScintillaWin.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'win32/ScintillaWin.cxx')
-rw-r--r--win32/ScintillaWin.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx
index 51d462659..655d99464 100644
--- a/win32/ScintillaWin.cxx
+++ b/win32/ScintillaWin.cxx
@@ -702,8 +702,8 @@ bool BoundsContains(PRectangle rcBounds, HRGN hRgnBounds, PRectangle rcCheck) {
contains = false;
} else if (hRgnBounds) {
// In bounding rectangle so check more accurately using region
- HRGN hRgnCheck = ::CreateRectRgn(static_cast<int>(rcCheck.left), static_cast<int>(rcCheck.top),
- static_cast<int>(rcCheck.right), static_cast<int>(rcCheck.bottom));
+ const RECT rcw = RectFromPRectangle(rcCheck);
+ HRGN hRgnCheck = ::CreateRectRgnIndirect(&rcw);
if (hRgnCheck) {
HRGN hRgnDifference = ::CreateRectRgn(0, 0, 0, 0);
if (hRgnDifference) {