From 1fcf473f34aff2febaa8b3bb70e5895422ec0db3 Mon Sep 17 00:00:00 2001 From: Bill Farmer Date: Thu, 16 Apr 2020 22:01:30 +0100 Subject: [PATCH] Update scope --- LMS/windows/LMS.cpp | 2 + SLMS/windows/SLMS.cpp | 42 ++++------------- Scope/windows/Scope.cpp | 96 +++++++++++++++++++-------------------- SigGen/windows/SigGen.cpp | 48 ++++++++++---------- 4 files changed, 83 insertions(+), 105 deletions(-) diff --git a/LMS/windows/LMS.cpp b/LMS/windows/LMS.cpp index cda4c7c..03704ec 100644 --- a/LMS/windows/LMS.cpp +++ b/LMS/windows/LMS.cpp @@ -302,6 +302,8 @@ BOOL DrawItem(WPARAM wParam, LPARAM lParam) return DrawMeter(hdc, rect); break; } + + return false; } // Draw spectrum diff --git a/SLMS/windows/SLMS.cpp b/SLMS/windows/SLMS.cpp index 86191d7..7c7e6bb 100644 --- a/SLMS/windows/SLMS.cpp +++ b/SLMS/windows/SLMS.cpp @@ -33,7 +33,7 @@ int WINAPI WinMain(HINSTANCE hInstance, // Check for a previous instance of this app if (!hPrevInstance) if (!RegisterMainClass(hInstance)) - return FALSE; + return false; // Save the application-instance handle. hInst = hInstance; @@ -60,7 +60,7 @@ int WINAPI WinMain(HINSTANCE hInstance, // If the main window cannot be created, terminate // the application. if (!window.hwnd) - return FALSE; + return false; // Show the window and send a WM_PAINT message to the window // procedure. @@ -278,47 +278,39 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, break; // Colour static text - case WM_CTLCOLORSTATIC: return (LRESULT)GetSysColorBrush(COLOR_WINDOW); break; // Draw item - case WM_DRAWITEM: return DrawItem(wParam, lParam); break; // Disable menus by capturing this message - case WM_INITMENU: break; // Capture system character key to stop pop up menus and other // nonsense - case WM_SYSCHAR: break; // Char pressed - case WM_CHAR: CharPressed(wParam, lParam); break; // Key pressed - case WM_KEYDOWN: KeyDown(wParam, lParam); break; // Buttons - case WM_COMMAND: switch (LOWORD(wParam)) { // Quit - case QUIT_ID: Gdiplus::GdiplusShutdown(token); waveInStop(audio.hwi); @@ -329,7 +321,6 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, break; // Notify - case WM_NOTIFY: switch (((LPNMHDR)lParam)->code) { @@ -346,7 +337,6 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, break; // Process other messages. - case WM_DESTROY: Gdiplus::GdiplusShutdown(token); waveInStop(audio.hwi); @@ -355,7 +345,6 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, break; // Everything else - default: return DefWindowProc(hWnd, uMsg, wParam, lParam); } @@ -364,12 +353,10 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, } // Register class - BOOL RegisterKnobClass(HINSTANCE hinst) { // Fill in the window class structure with parameters // that describe the main window. - WNDCLASS wc = {0, KnobProc, 0, 0, hinst, @@ -377,12 +364,10 @@ BOOL RegisterKnobClass(HINSTANCE hinst) NULL, NULL, KNOBCLASS}; // Register the window class. - return RegisterClass(&wc); } // Draw item - BOOL DrawItem(WPARAM wParam, LPARAM lParam) { LPDRAWITEMSTRUCT lpdi = (LPDRAWITEMSTRUCT)lParam; @@ -395,33 +380,30 @@ BOOL DrawItem(WPARAM wParam, LPARAM lParam) switch (wParam) { // Scale - case SCALE_ID: return DrawScale(hdc, rect); break; // Spectrum - case SPECTRUM_ID: return DrawSpectrum(hdc, rect); break; // Display - case DISPLAY_ID: return DrawDisplay(hdc, rect); break; // Meter - case METER_ID: return DrawMeter(hdc, rect); break; } + + return false; } // Knob procedure - LRESULT CALLBACK KnobProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { @@ -432,7 +414,6 @@ LRESULT CALLBACK KnobProc(HWND hWnd, UINT uMsg, switch (uMsg) { // Paint - case WM_PAINT: hdc = BeginPaint(hWnd, &ps); GetClientRect(hWnd, &rect); @@ -441,25 +422,21 @@ LRESULT CALLBACK KnobProc(HWND hWnd, UINT uMsg, break; // Char pressed - case WM_CHAR: CharPressed(wParam, lParam); break; // Key pressed - case WM_KEYDOWN: KeyDown(wParam, lParam); break; // Mouse move - case WM_MOUSEMOVE: MouseMove(hWnd, wParam, lParam); break; // Everything else - default: return DefWindowProc(hWnd, uMsg, wParam, lParam); } @@ -468,7 +445,6 @@ LRESULT CALLBACK KnobProc(HWND hWnd, UINT uMsg, } // Draw Scale - BOOL DrawScale(HDC hdc, RECT rect) { static HBITMAP bitmap; @@ -479,7 +455,7 @@ BOOL DrawScale(HDC hdc, RECT rect) static LOGFONT lf = {0, 0, 0, 0, FW_NORMAL, - FALSE, FALSE, FALSE, + false, false, false, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, @@ -734,7 +710,7 @@ BOOL DrawDisplay(HDC hdc, RECT rect) static LOGFONT lf = {0, 0, 0, 0, FW_BOLD, - FALSE, FALSE, FALSE, + false, false, false, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, @@ -816,7 +792,7 @@ BOOL DrawMeter(HDC hdc, RECT rect) static LOGFONT lf = {0, 0, 0, 0, FW_NORMAL, - FALSE, FALSE, FALSE, + false, false, false, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, @@ -1170,7 +1146,7 @@ void MouseMove(HWND hwnd, WPARAM wParam, LPARAM lParam) // Button not down else if (move) - move = FALSE; + move = false; } // Update frequency @@ -1186,7 +1162,7 @@ void UpdateFrequency() InvalidateRgn(display.hwnd, NULL, true); InvalidateRgn(scale.hwnd, NULL, true); - InvalidateRgn(knob.hwnd, NULL, TRUE); + InvalidateRgn(knob.hwnd, NULL, true); } // Tooltip show diff --git a/Scope/windows/Scope.cpp b/Scope/windows/Scope.cpp index 414f22a..dd35c5c 100644 --- a/Scope/windows/Scope.cpp +++ b/Scope/windows/Scope.cpp @@ -33,7 +33,7 @@ int WINAPI WinMain(HINSTANCE hInstance, // Check for a previous instance of this app if (!hPrevInstance) if (!RegisterMainClass(hInstance)) - return FALSE; + return false; // Save the application-instance handle. hInst = hInstance; @@ -61,7 +61,7 @@ int WINAPI WinMain(HINSTANCE hInstance, // If the main window cannot be created, terminate // the application. if (!window.hwnd) - return FALSE; + return false; // Show the window and send a WM_PAINT message to the window // procedure. @@ -262,7 +262,7 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, // Trigger case TRIGGER_ID: - scope.trigger = TRUE; + scope.trigger = true; break; // Timebase @@ -277,7 +277,7 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, // Clear case CLEAR_ID: - scope.clear = TRUE; + scope.clear = true; break; // Left @@ -291,7 +291,7 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, xscale.start = 0; scope.start = xscale.start / scale; - InvalidateRgn(xscale.hwnd, NULL, TRUE); + InvalidateRgn(xscale.hwnd, NULL, true); } break; @@ -310,7 +310,7 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, scope.start = xscale.start / scale; } - InvalidateRgn(xscale.hwnd, NULL, TRUE); + InvalidateRgn(xscale.hwnd, NULL, true); } break; @@ -320,8 +320,8 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, scope.index = 0; xscale.start = 0; yscale.index = 0; - InvalidateRgn(xscale.hwnd, NULL, TRUE); - InvalidateRgn(yscale.hwnd, NULL, TRUE); + InvalidateRgn(xscale.hwnd, NULL, true); + InvalidateRgn(yscale.hwnd, NULL, true); break; // End @@ -338,7 +338,7 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, xscale.start -= xscale.step; scope.start = xscale.start / scale; - InvalidateRgn(xscale.hwnd, NULL, TRUE); + InvalidateRgn(xscale.hwnd, NULL, true); } break; @@ -346,20 +346,20 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, case RESET_ID: scope.index = 0; scope.start = 0; - scope.bright = FALSE; - scope.single = FALSE; - // scope.polarity = FALSE; - scope.storage = FALSE; + scope.bright = false; + scope.single = false; + // scope.polarity = false; + scope.storage = false; yscale.index = 0; - InvalidateRgn(xscale.hwnd, NULL, TRUE); + InvalidateRgn(xscale.hwnd, NULL, true); yscale.index = 0; - InvalidateRgn(yscale.hwnd, NULL, TRUE); + InvalidateRgn(yscale.hwnd, NULL, true); - SendMessage(toolbar.hwnd, TB_CHECKBUTTON, BRIGHT_ID, FALSE); - SendMessage(toolbar.hwnd, TB_CHECKBUTTON, SINGLE_ID, FALSE); - SendMessage(toolbar.hwnd, TB_CHECKBUTTON, STORAGE_ID, FALSE); + SendMessage(toolbar.hwnd, TB_CHECKBUTTON, BRIGHT_ID, false); + SendMessage(toolbar.hwnd, TB_CHECKBUTTON, SINGLE_ID, false); + SendMessage(toolbar.hwnd, TB_CHECKBUTTON, STORAGE_ID, false); break; // Scope @@ -458,8 +458,8 @@ BOOL CALLBACK EnumChildProc(HWND hWnd, LPARAM lParam) // X scale, resize it case XSCALE_ID: MoveWindow(hWnd, status.rect.left, status.rect.top - SCALE_HEIGHT, - status.rect.right, SCALE_HEIGHT, FALSE); - InvalidateRgn(hWnd, NULL, TRUE); + status.rect.right, SCALE_HEIGHT, false); + InvalidateRgn(hWnd, NULL, true); GetWindowRect(hWnd, &xscale.rect); MapWindowPoints(NULL, (HWND)lParam, (POINT *)&xscale.rect, 2); break; @@ -467,8 +467,8 @@ BOOL CALLBACK EnumChildProc(HWND hWnd, LPARAM lParam) // Y scale, resize it case YSCALE_ID: MoveWindow(hWnd, toolbar.rect.left, toolbar.rect.bottom, - SCALE_WIDTH, xscale.rect.top - toolbar.rect.bottom, FALSE); - InvalidateRgn(hWnd, NULL, TRUE); + SCALE_WIDTH, xscale.rect.top - toolbar.rect.bottom, false); + InvalidateRgn(hWnd, NULL, true); GetWindowRect(hWnd, &yscale.rect); MapWindowPoints(NULL, (HWND)lParam, (POINT *)&yscale.rect, 2); break; @@ -477,12 +477,12 @@ BOOL CALLBACK EnumChildProc(HWND hWnd, LPARAM lParam) case SCOPE_ID: MoveWindow(hWnd, yscale.rect.right, toolbar.rect.bottom, toolbar.rect.right - yscale.rect.right, - xscale.rect.top - toolbar.rect.bottom, FALSE); - InvalidateRgn(hWnd, NULL, TRUE); + xscale.rect.top - toolbar.rect.bottom, false); + InvalidateRgn(hWnd, NULL, true); break; } - return TRUE; + return true; } // Add toolbar bitmap @@ -525,7 +525,7 @@ BOOL AddToolbarBitmap(HWND control, LPCTSTR name) SendMessage(control, TB_ADDBITMAP, 14, (LPARAM)&bitmap); - return TRUE; + return true; } BOOL AddToolbarButtons(HWND control) @@ -565,7 +565,7 @@ BOOL AddToolbarButtons(HWND control) SendMessage(control, TB_ADDBUTTONS, Length(buttons), (LPARAM)&buttons); - return TRUE; + return true; } // Window resizing @@ -587,7 +587,7 @@ BOOL WindowResizing(HWND hWnd, WPARAM wParam, LPARAM lParam) if (rectp->bottom - rectp->top > MAX_HEIGHT) rectp->bottom = rectp->top + MAX_HEIGHT; - return TRUE; + return true; } // Display timebase menu @@ -620,7 +620,7 @@ BOOL DisplayTimebaseMenu(HWND hWnd, WPARAM wParam, LPARAM lParam) rect.left, rect.bottom, 0, hWnd, NULL); - return TRUE; + return true; } // Scope clicked @@ -633,7 +633,7 @@ BOOL ScopeClicked(WPARAM wParam, LPARAM lParam) scope.index = point.x; - return TRUE; + return true; } // Y scale clicked @@ -645,9 +645,9 @@ BOOL YScaleClicked(WPARAM wParam, LPARAM lParam) MapWindowPoints(HWND_DESKTOP, (HWND)lParam, &point, 1); yscale.index = point.y - yscale.height / 2;; - InvalidateRgn(yscale.hwnd, NULL, TRUE); + InvalidateRgn(yscale.hwnd, NULL, true); - return TRUE; + return true; } // Key pressed @@ -678,7 +678,7 @@ void KeyDown(WPARAM wParam, LPARAM lParam) if (--yscale.index <= -height / 2) yscale.index = 0; - InvalidateRgn(yscale.hwnd, NULL, TRUE); + InvalidateRgn(yscale.hwnd, NULL, true); break; // Down @@ -686,7 +686,7 @@ void KeyDown(WPARAM wParam, LPARAM lParam) if (++yscale.index >= height / 2) yscale.index = 0; - InvalidateRgn(yscale.hwnd, NULL, TRUE); + InvalidateRgn(yscale.hwnd, NULL, true); break; default: @@ -721,7 +721,7 @@ BOOL DrawItem(WPARAM wParam, LPARAM lParam) break; } - return FALSE; + return false; } // Draw X scale @@ -737,7 +737,7 @@ BOOL DrawXScale(HDC hdc, RECT rect) static LOGFONT lf = {0, 0, 0, 0, FW_BOLD, - FALSE, FALSE, FALSE, + false, false, false, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, @@ -803,7 +803,7 @@ BOOL DrawXScale(HDC hdc, RECT rect) } } - return TRUE; + return true; } // Draw Y scale @@ -854,7 +854,7 @@ BOOL DrawYScale(HDC hdc, RECT rect) Polygon(hdc, points, Length(points)); } - return TRUE; + return true; } // Draw scope @@ -884,7 +884,7 @@ BOOL DrawScope(HDC hdc, RECT rect) static LOGFONT lf = {0, 0, 0, 0, FW_BOLD, - FALSE, FALSE, FALSE, + false, false, false, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, @@ -957,7 +957,7 @@ BOOL DrawScope(HDC hdc, RECT rect) LineTo(hgdc, width, height / 2 - i); } - scope.clear = TRUE; + scope.clear = true; } // Don't attempt the trace until there's a buffer @@ -967,7 +967,7 @@ BOOL DrawScope(HDC hdc, RECT rect) BitBlt(hdc, rect.left, rect.top, width, height, hgdc, 0, 0, SRCCOPY); - return TRUE; + return true; } // Erase background @@ -977,7 +977,7 @@ BOOL DrawScope(HDC hdc, RECT rect) BitBlt(hbdc, rect.left, rect.top, width, height, hgdc, 0, 0, SRCCOPY); - scope.clear = FALSE; + scope.clear = false; } // Calculate scale etc @@ -1096,7 +1096,7 @@ BOOL DrawScope(HDC hdc, RECT rect) BitBlt(hdc, rect.left, rect.top, width, height, hbdc, 0, 0, SRCCOPY); - return TRUE; + return true; } // Audio thread @@ -1108,7 +1108,7 @@ DWORD WINAPI AudioThread(LPVOID lpParameter) xscale.step = 500 * xscale.scale; // Update display - InvalidateRgn(xscale.hwnd, NULL, TRUE); + InvalidateRgn(xscale.hwnd, NULL, true); UpdateStatus(); @@ -1297,7 +1297,7 @@ void WaveInData(WPARAM wParam, LPARAM lParam) // Reset trigger if (scope.single && scope.trigger) - scope.trigger = FALSE; + scope.trigger = false; // FIRST: First chunk of data case FIRST: @@ -1363,13 +1363,13 @@ void WaveInData(WPARAM wParam, LPARAM lParam) xscale.start = 0; // Update display - InvalidateRgn(xscale.hwnd, NULL, TRUE); + InvalidateRgn(xscale.hwnd, NULL, true); UpdateStatus(); } // Update display - InvalidateRgn(scope.hwnd, NULL, TRUE); + InvalidateRgn(scope.hwnd, NULL, true); } // Update status @@ -1397,5 +1397,5 @@ BOOL UpdateStatus() // Update status SendMessage(status.hwnd, SB_SETTEXT, 0, (LPARAM)s); - return TRUE; + return true; } diff --git a/SigGen/windows/SigGen.cpp b/SigGen/windows/SigGen.cpp index 8d99bd8..acd9cc9 100644 --- a/SigGen/windows/SigGen.cpp +++ b/SigGen/windows/SigGen.cpp @@ -34,7 +34,7 @@ int WINAPI WinMain(HINSTANCE hInstance, // Check for a previous instance of this app if (!hPrevInstance) if (!RegisterMainClass(hInstance)) - return FALSE; + return false; // Save the application-instance handle. hInst = hInstance; @@ -61,7 +61,7 @@ int WINAPI WinMain(HINSTANCE hInstance, // If the main window cannot be created, terminate // the application. if (!window.hwnd) - return FALSE; + return false; // Show the window and send a WM_PAINT message to the window // procedure. @@ -218,11 +218,11 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT uMsg, GetWindowRect(fine.hwnd, &fine.rect); MapWindowPoints(NULL, hWnd, (POINT *)&fine.rect, 2); - SendMessage(fine.hwnd, TBM_SETRANGE, TRUE, + SendMessage(fine.hwnd, TBM_SETRANGE, true, MAKELONG(FINE_MIN, FINE_MAX)); SendMessage(fine.hwnd, TBM_SETTICFREQ, FINE_STEP, 0); SendMessage(fine.hwnd, TBM_SETPAGESIZE, 0, FINE_STEP); - SendMessage(fine.hwnd, TBM_SETPOS, TRUE, FINE_REF); + SendMessage(fine.hwnd, TBM_SETPOS, true, FINE_REF); // Add slider to tooltip tooltip.info.uId = (UINT_PTR)fine.hwnd; @@ -243,11 +243,11 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT uMsg, GetWindowRect(level.hwnd, &level.rect); MapWindowPoints(NULL, hWnd, (POINT *)&level.rect, 2); - SendMessage(level.hwnd, TBM_SETRANGE, TRUE, + SendMessage(level.hwnd, TBM_SETRANGE, true, MAKELONG(LEVEL_MIN, LEVEL_MAX)); SendMessage(level.hwnd, TBM_SETTICFREQ, FINE_STEP, 0); SendMessage(level.hwnd, TBM_SETPAGESIZE, 0, LEVEL_STEP); - SendMessage(level.hwnd, TBM_SETPOS, TRUE, LEVEL_REF); + SendMessage(level.hwnd, TBM_SETPOS, true, LEVEL_REF); // Add slider to tooltip tooltip.info.uId = (UINT_PTR)level.hwnd; @@ -551,7 +551,7 @@ BOOL DrawItem(WPARAM wParam, LPARAM lParam) break; } - return FALSE; + return false; } // Draw Scale @@ -565,7 +565,7 @@ BOOL DrawScale(HDC hdc, RECT rect, UINT state) static LOGFONT lf = {0, 0, 0, 0, FW_NORMAL, - FALSE, FALSE, FALSE, + false, false, false, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, @@ -659,7 +659,7 @@ BOOL DrawScale(HDC hdc, RECT rect, UINT state) BitBlt(hdc, rect.left, rect.top, width, height, hbdc, 0, 0, SRCCOPY); - return TRUE; + return true; } // Draw Display @@ -672,7 +672,7 @@ BOOL DrawDisplay(HDC hdc, RECT rect, UINT state) static LOGFONT lf = {0, 0, 0, 0, FW_BOLD, - FALSE, FALSE, FALSE, + false, false, false, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, @@ -705,7 +705,7 @@ BOOL DrawDisplay(HDC hdc, RECT rect, UINT state) sprintf(text, "%+6.2lfdB ", display.decibels); TextOut(hdc, x, y, text, strlen(text)); - return TRUE; + return true; } // Draw Knob @@ -782,7 +782,7 @@ BOOL DrawKnob(HDC hdc, RECT rect, UINT state) BitBlt(hdc, rect.left, rect.top, width, height, hbdc, 0, 0, SRCCOPY); - return TRUE; + return true; } // Char pressed @@ -821,25 +821,25 @@ VOID KeyDown(WPARAM wParam, LPARAM lParam) // Up, increase fine frequency (sliders are backwards) case VK_UP: value = SendMessage(fine.hwnd, TBM_GETPOS, 0, 0); - SendMessage(fine.hwnd, TBM_SETPOS, TRUE, --value); + SendMessage(fine.hwnd, TBM_SETPOS, true, --value); break; // Down, decrease fine frequency case VK_DOWN: value = SendMessage(fine.hwnd, TBM_GETPOS, 0, 0); - SendMessage(fine.hwnd, TBM_SETPOS, TRUE, ++value); + SendMessage(fine.hwnd, TBM_SETPOS, true, ++value); break; // Page up, increase level (sliders are backwards) case VK_PRIOR: value = SendMessage(level.hwnd, TBM_GETPOS, 0, 0); - SendMessage(level.hwnd, TBM_SETPOS, TRUE, --value); + SendMessage(level.hwnd, TBM_SETPOS, true, --value); break; // Page down, decrease level case VK_NEXT: value = SendMessage(level.hwnd, TBM_GETPOS, 0, 0); - SendMessage(level.hwnd, TBM_SETPOS, TRUE, ++value); + SendMessage(level.hwnd, TBM_SETPOS, true, ++value); break; default: @@ -888,7 +888,7 @@ VOID MouseMove(HWND hwnd, WPARAM wParam, LPARAM lParam) // First point if (!move) - move = TRUE; + move = true; // More points else @@ -927,7 +927,7 @@ VOID MouseMove(HWND hwnd, WPARAM wParam, LPARAM lParam) // Button not down else if (move) - move = FALSE; + move = false; } // Slider change @@ -945,12 +945,12 @@ BOOL SliderChange(WPARAM wParam, LPARAM lParam) break; default: - return FALSE; + return false; } // Update UpdateValues(); - return TRUE; + return true; } // Display exact @@ -1127,7 +1127,7 @@ VOID ExactFrequency(WPARAM wParam, LPARAM lParam) if (knob.value > FREQ_MAX) knob.value = FREQ_MAX; scale.value = knob.value; - SendMessage(fine.hwnd, TBM_SETPOS, TRUE, FINE_REF); + SendMessage(fine.hwnd, TBM_SETPOS, true, FINE_REF); UpdateValues(); } @@ -1149,9 +1149,9 @@ VOID UpdateValues() if (display.decibels < -80.0) display.decibels = -80.0; - InvalidateRgn(display.hwnd, NULL, TRUE); - InvalidateRgn(scale.hwnd, NULL, TRUE); - InvalidateRgn(knob.hwnd, NULL, TRUE); + InvalidateRgn(display.hwnd, NULL, true); + InvalidateRgn(scale.hwnd, NULL, true); + InvalidateRgn(knob.hwnd, NULL, true); } // Tooltip show