https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d74d4e0395f0940563c76…
commit d74d4e0395f0940563c76d253947505265428d9c
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Sat Nov 25 22:47:46 2023 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Sat Nov 25 22:47:46 2023 +0900
[NETCFGX] Fix TCP/IP alternate radiobutton behaviour (#6039)
Based on KRosUser's netaltconf_fix.patch.
CORE-19336
---
dll/win32/netcfgx/tcpipconf_notify.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/dll/win32/netcfgx/tcpipconf_notify.c b/dll/win32/netcfgx/tcpipconf_notify.c
index cc64370e856..e6db3ae9a1d 100644
--- a/dll/win32/netcfgx/tcpipconf_notify.c
+++ b/dll/win32/netcfgx/tcpipconf_notify.c
@@ -2223,7 +2223,7 @@ TcpipAltConfDlg(
{
TcpipConfNotifyImpl *This;
LPPROPSHEETPAGE page;
- BOOL bEnabled;
+ BOOL bNoDHCP;
switch (uMsg)
{
@@ -2245,19 +2245,19 @@ TcpipAltConfDlg(
{
if (HIWORD(wParam) == BN_CLICKED)
{
- bEnabled = (IsDlgButtonChecked(hwndDlg, IDC_USEDHCP) ==
BST_CHECKED);
- if (bEnabled)
+ bNoDHCP = (IsDlgButtonChecked(hwndDlg, IDC_NODHCP) ==
BST_CHECKED);
+ if (bNoDHCP)
{
SendDlgItemMessageW(hwndDlg, IDC_IPADDR, IPM_CLEARADDRESS, 0,
0);
SendDlgItemMessageW(hwndDlg, IDC_SUBNETMASK,
IPM_CLEARADDRESS, 0, 0);
SendDlgItemMessageW(hwndDlg, IDC_DEFGATEWAY,
IPM_CLEARADDRESS, 0, 0);
}
- EnableWindow(GetDlgItem(hwndDlg, IDC_IPADDR), bEnabled);
- EnableWindow(GetDlgItem(hwndDlg, IDC_SUBNETMASK), bEnabled);
- EnableWindow(GetDlgItem(hwndDlg, IDC_DEFGATEWAY), bEnabled);
- EnableWindow(GetDlgItem(hwndDlg, IDC_DNS1), bEnabled);
- EnableWindow(GetDlgItem(hwndDlg, IDC_DNS2), bEnabled);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_IPADDR), bNoDHCP);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_SUBNETMASK), bNoDHCP);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_DEFGATEWAY), bNoDHCP);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_DNS1), bNoDHCP);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_DNS2), bNoDHCP);
PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
}