From cc2755e60aeeb61d0550bbd3797b2f2289ed88a6 Mon Sep 17 00:00:00 2001 From: Takamichi Horikawa Date: Sat, 1 Apr 2017 14:54:34 +0900 Subject: win32: change oscilloscope view line width to 2px --- win32/oscilloview.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'win32') diff --git a/win32/oscilloview.c b/win32/oscilloview.c index 9759cc1..1478614 100644 --- a/win32/oscilloview.c +++ b/win32/oscilloview.c @@ -23,11 +23,13 @@ static struct { ATOM oscilloview_class; struct oscillodata oscillodata[LIBOPNA_OSCILLO_TRACK_COUNT]; UINT mmtimer; + HPEN whitepen; } g; static void on_destroy(HWND hwnd) { g.oscilloview = 0; timeKillEvent(g.mmtimer); + DeleteObject(g.whitepen); } static void CALLBACK mmtimer_cb(UINT timerid, UINT msg, @@ -37,6 +39,7 @@ static void CALLBACK mmtimer_cb(UINT timerid, UINT msg, } static bool on_create(HWND hwnd, const CREATESTRUCT *cs) { + g.whitepen = CreatePen(PS_SOLID, 2, RGB(255, 255, 255)); ShowWindow(hwnd, SW_SHOW); //SetTimer(hwnd, TIMER_UPDATE, 16, 0); g.mmtimer = timeSetEvent(16, 16, mmtimer_cb, 0, TIME_PERIODIC); @@ -66,7 +69,7 @@ static void on_paint(HWND hwnd) { SelectObject(mdc, bitmap); FillRect(mdc, &cr, GetStockObject(BLACK_BRUSH)); - SelectObject(mdc, GetStockObject(WHITE_PEN)); + SelectObject(mdc, g.whitepen); int width = cr.right / 3; int height = cr.bottom / 3; for (int x = 0; x < 3; x++) { -- cgit v1.2.3