From a761531233566bca0bca43569ebd9b650e676c3d Mon Sep 17 00:00:00 2001 From: lx-s Date: Wed, 12 Nov 2025 07:34:04 +0100 Subject: [PATCH] Fixed Add Wifi Dialog not enabling Save-Button #48 Also: - Changed project settings - Added updated manifest --- WinMute/Settings_WifiDlg.cpp | 7 ++----- WinMute/WinMute.vcxproj | 4 ++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/WinMute/Settings_WifiDlg.cpp b/WinMute/Settings_WifiDlg.cpp index 0b43e34..28e25c1 100644 --- a/WinMute/Settings_WifiDlg.cpp +++ b/WinMute/Settings_WifiDlg.cpp @@ -85,12 +85,9 @@ INT_PTR CALLBACK Settings_WifiAddDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPA case WM_COMMAND: if (LOWORD(wParam) == IDC_WIFI_NAME) { HWND hSsid = GetDlgItem(hDlg, IDC_WIFI_NAME); - if (HIWORD(wParam) == CBN_EDITUPDATE) { + if (HIWORD(wParam) == EN_UPDATE) { const int textLen = Edit_GetTextLength(hSsid); EnableWindow(GetDlgItem(hDlg, IDOK), textLen > 0); - } else if (HIWORD(wParam) == CBN_SELCHANGE) { - const auto curSelIdx = SendMessage(hSsid, CB_GETCURSEL, 0, 0); - EnableWindow(GetDlgItem(hDlg, IDOK), curSelIdx != CB_ERR); } } else if (LOWORD(wParam) == IDOK) { HWND hSsid = GetDlgItem(hDlg, IDC_WIFI_NAME); @@ -200,7 +197,7 @@ INT_PTR CALLBACK Settings_WifiDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM } Button_Enable(GetDlgItem(hDlg, IDC_WIFI_REMOVEALL), ListBox_GetCount(hList) > 0); - + if (!IsWlanAvailable()) { // Set defaults Button_SetCheck(GetDlgItem(hDlg, IDC_ENABLE_WIFI_MUTE), BST_UNCHECKED); diff --git a/WinMute/WinMute.vcxproj b/WinMute/WinMute.vcxproj index 107b5c5..e72e5ce 100644 --- a/WinMute/WinMute.vcxproj +++ b/WinMute/WinMute.vcxproj @@ -112,7 +112,7 @@ WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) true stdcpp20 - true + false Caret Use common.h @@ -166,7 +166,7 @@ _DEBUG;_WINDOWS;%(PreprocessorDefinitions) true stdcpp20 - true + false Caret Use common.h -- 2.43.0