aboutsummaryrefslogtreecommitdiff
path: root/nuklear/demo/gdi
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2018-03-18 18:13:42 +0100
committerHanspeter Portner <dev@open-music-kontrollers.ch>2018-03-18 18:13:42 +0100
commit709f26b0ef1ff56e8a0ac71d463ad42da7bc6eb3 (patch)
tree07d5b0830570eacca5ef9a55a8bce17a024b97a1 /nuklear/demo/gdi
parentc38001dfb3a771b3a3824cd3d042ff55b708b2d9 (diff)
parent1df39f0160a3b985e847784f4d2f8095d7f2eb34 (diff)
downloadsherlock.lv2-709f26b0ef1ff56e8a0ac71d463ad42da7bc6eb3.tar.xz
Merge commit '1df39f0160a3b985e847784f4d2f8095d7f2eb34'
Diffstat (limited to 'nuklear/demo/gdi')
-rw-r--r--nuklear/demo/gdi/nuklear_gdi.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/nuklear/demo/gdi/nuklear_gdi.h b/nuklear/demo/gdi/nuklear_gdi.h
index 932a70a..c875de1 100644
--- a/nuklear/demo/gdi/nuklear_gdi.h
+++ b/nuklear/demo/gdi/nuklear_gdi.h
@@ -179,14 +179,15 @@ nk_gdi_stroke_rect(HDC dc, short x, short y, unsigned short w,
SelectObject(dc, pen);
}
- SetDCBrushColor(dc, OPAQUE);
+ HGDIOBJ br = SelectObject(dc, GetStockObject(NULL_BRUSH));
if (r == 0) {
Rectangle(dc, x, y, x + w, y + h);
} else {
RoundRect(dc, x, y, x + w, y + h, r, r);
}
+ SelectObject(dc, br);
- if (pen) {
+ if (pen) {
SelectObject(dc, GetStockObject(DC_PEN));
DeleteObject(pen);
}
@@ -562,7 +563,7 @@ nk_gdi_handle_event(HWND wnd, UINT msg, WPARAM wparam, LPARAM lparam)
case WM_SIZE:
{
unsigned width = LOWORD(lparam);
- unsigned height = LOWORD(lparam);
+ unsigned height = HIWORD(lparam);
if (width != gdi.width || height != gdi.height)
{
DeleteObject(gdi.bitmap);