Drew the Windows popover background.
This commit is contained in:
parent
8ce9f4d7ff
commit
a499a99d1a
|
@ -78,9 +78,10 @@ LRESULT CALLBACK popoverproc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
height = r.bottom - r.top;
|
height = r.bottom - r.top;
|
||||||
dc = GetWindowDC(hwnd);
|
dc = GetWindowDC(hwnd);
|
||||||
if (dc == NULL) abort();
|
if (dc == NULL) abort();
|
||||||
SetDCBrushColor(dc, RGB(255, 0, 0));
|
|
||||||
region = makePopoverRegion(dc, width, height);
|
region = makePopoverRegion(dc, width, height);
|
||||||
FrameRgn(dc, region, GetStockObject(DC_BRUSH), 1, 1);
|
// TODO use the class brush here
|
||||||
|
FillRgn(dc, region, GetSysColorBrush(COLOR_BTNFACE));
|
||||||
|
FrameRgn(dc, region, GetStockObject(BLACK_PEN), 1, 1);
|
||||||
DeleteObject(region);
|
DeleteObject(region);
|
||||||
ReleaseDC(hwnd, dc);
|
ReleaseDC(hwnd, dc);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -111,15 +112,13 @@ LRESULT CALLBACK popoverproc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
r->top += ARROWHEIGHT;
|
r->top += ARROWHEIGHT;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
case WM_ERASEBKGND:
|
|
||||||
return (LRESULT) GetStockObject(HOLLOW_BRUSH);
|
|
||||||
case WM_PAINT:
|
case WM_PAINT:
|
||||||
dc = BeginPaint(hwnd, &ps);
|
/* dc = BeginPaint(hwnd, &ps);
|
||||||
GetClientRect(hwnd, &r);
|
GetClientRect(hwnd, &r);
|
||||||
FillRect(dc, &r, GetSysColorBrush(COLOR_ACTIVECAPTION));
|
FillRect(dc, &r, GetSysColorBrush(COLOR_ACTIVECAPTION));
|
||||||
FrameRect(dc, &r, GetStockPen(WHITE_PEN));
|
FrameRect(dc, &r, GetStockPen(WHITE_PEN));
|
||||||
EndPaint(hwnd, &ps);
|
EndPaint(hwnd, &ps);
|
||||||
return 0;
|
*/ return 0;
|
||||||
}
|
}
|
||||||
return DefWindowProcW(hwnd, uMsg, wParam, lParam);
|
return DefWindowProcW(hwnd, uMsg, wParam, lParam);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue