From b9eac743040ce4ffcf395456b36c8974e1e0dac2 Mon Sep 17 00:00:00 2001 From: HomeWorld Date: Wed, 29 May 2013 16:50:21 +0300 Subject: [PATCH] Get rid of a small brain fart. --- NoiseGate/NoiseGate.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/NoiseGate/NoiseGate.cpp b/NoiseGate/NoiseGate.cpp index 2a39c433..dd03e827 100644 --- a/NoiseGate/NoiseGate.cpp +++ b/NoiseGate/NoiseGate.cpp @@ -311,12 +311,13 @@ LRESULT CALLBACK NoiseGateSettings::PBSubclassProc(HWND hWnd, UINT uMsg, WPARAM RECT clRect, eclRect; PAINTSTRUCT ps; PBRANGE pbRange; - int orientation, position; + int position; + bool orientation; float perc; HBRUSH hGreen = CreateSolidBrush(0x32CD32); - orientation = GetWindowLongPtr(hWnd, GWL_STYLE) & PBS_VERTICAL; // false = horizontal, true = vertical + orientation = (GetWindowLongPtr(hWnd, GWL_STYLE) & PBS_VERTICAL) == PBS_VERTICAL; // false = horizontal, true = vertical position = (int)SendMessage(hWnd, PBM_GETPOS, 0, 0); @@ -367,7 +368,7 @@ void NoiseGateSettings::MsgInitDialog() RefreshConfig(); // Volume preview - // Custom drawn progress bar + // Custom drawn progress bar, beware, static member ctrlHwnd = GetDlgItem(hwnd, IDC_CURVOL); SetWindowSubclass(ctrlHwnd, PBSubclassProc, 0, 0);