diff options
author | Takamichi Horikawa <takamichiho@gmail.com> | 2017-04-01 14:54:34 +0900 |
---|---|---|
committer | Takamichi Horikawa <takamichiho@gmail.com> | 2017-04-01 14:54:34 +0900 |
commit | cc2755e60aeeb61d0550bbd3797b2f2289ed88a6 (patch) | |
tree | fccfe2048b457ea008edf95d8fa8cf995535e936 /win32 | |
parent | 24225349831278c23c6dfc4515e071f4b27b2c41 (diff) |
win32: change oscilloscope view line width to 2px
Diffstat (limited to 'win32')
-rw-r--r-- | win32/oscilloview.c | 5 |
1 files changed, 4 insertions, 1 deletions
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++) { |