Shifted things around in the Windows popover to properly build client rect sizes.
This commit is contained in:
parent
a29717405d
commit
05fbbc491e
|
@ -39,10 +39,11 @@ LRESULT CALLBACK popoverproc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
HDC dc;
|
HDC dc;
|
||||||
HRGN region;
|
HRGN region;
|
||||||
POINT pt;
|
POINT pt;
|
||||||
|
RECT r;
|
||||||
|
|
||||||
switch (uMsg) {
|
switch (uMsg) {
|
||||||
case WM_PAINT:
|
case WM_NCPAINT:
|
||||||
dc = BeginPaint(hwnd, &ps);
|
dc = GetDCEx(hwnd, (HRGN) wParam, DCX_WINDOW | DCX_INTERSECTRGN);
|
||||||
if (dc == NULL) abort();
|
if (dc == NULL) abort();
|
||||||
BeginPath(dc);
|
BeginPath(dc);
|
||||||
pt.x = 0;
|
pt.x = 0;
|
||||||
|
@ -68,10 +69,16 @@ LRESULT CALLBACK popoverproc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
region = PathToRegion(dc);
|
region = PathToRegion(dc);
|
||||||
FrameRgn(dc, region, GetStockObject(BLACK_PEN), 1, 1);
|
FrameRgn(dc, region, GetStockObject(BLACK_PEN), 1, 1);
|
||||||
SetWindowRgn(hwnd, region, TRUE);
|
SetWindowRgn(hwnd, region, TRUE);
|
||||||
EndPaint(hwnd, &ps);
|
ReleaseDC(hwnd, dc);
|
||||||
return 0;
|
return 0;
|
||||||
case WM_NCCALCSIZE:
|
case WM_NCCALCSIZE:
|
||||||
break;
|
break;
|
||||||
|
case WM_PAINT:
|
||||||
|
dc = BeginPaint(hwnd, &ps);
|
||||||
|
GetClientRect(hwnd, &r);
|
||||||
|
FillRect(dc, &r, GetSysColorBrush(COLOR_ACTIVECAPTION));
|
||||||
|
EndPaint(hwnd, &ps);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
return DefWindowProcW(hwnd, uMsg, wParam, lParam);
|
return DefWindowProcW(hwnd, uMsg, wParam, lParam);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue