diff options
Diffstat (limited to 'src/core/stdmsg')
-rw-r--r-- | src/core/stdmsg/src/msgdialog.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index d552a0ae64..7c87170fcc 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -734,8 +734,6 @@ LRESULT CMsgDialog::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam) HRGN region = NULL;
if (wParam == NULLREGION) {
region = CreateRectRgn(rect.left, rect.top, rect.right, rect.bottom);
- HRGN region2 = CreateRectRgn(rect.left + 1, rect.top + 1, rect.right - 1, rect.bottom - 1);
- CombineRgn(region, region, (HRGN)region2, RGN_DIFF);
}
else {
HRGN copy = CreateRectRgn(0, 0, 0, 0);
@@ -744,6 +742,12 @@ LRESULT CMsgDialog::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam) else
DeleteObject(copy);
}
+
+ if (region) {
+ HRGN region2 = CreateRectRgn(rect.left + 1, rect.top + 1, rect.right - 1, rect.bottom - 1);
+ CombineRgn(region, region, region2, RGN_DIFF);
+ DeleteObject(region2);
+ }
if (HDC hdc = GetDCEx(m_message.GetHwnd(), region, DCX_WINDOW | DCX_CACHE | DCX_INTERSECTRGN | DCX_LOCKWINDOWUPDATE)) {
HPEN pen = CreatePen(PS_INSIDEFRAME, 1, RGB(0, 220, 0));
@@ -755,9 +759,9 @@ LRESULT CMsgDialog::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam) ReleaseDC(m_message.GetHwnd(), hdc);
DeleteObject(pen);
}
-
- if (region)
+ else if (region)
DeleteObject(region);
+
return 0;
}
break;
|