https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a95863b1320b3735ab526…
commit a95863b1320b3735ab52669e7c9d615a1b084ec3
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Tue Nov 21 06:16:39 2023 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Tue Nov 21 06:16:39 2023 +0900
[NETCFGX] Half-implement TCP/IP alternate configuration (#6009)
Based on KRosUser's netcfx_alt.patch.
- Remove WS_GROUP flag of IDC_NODHCP control.
- Fix the extent of a groupbox.
- Half-implement TcpipAltConfDlg function.
CORE-19331
---
dll/win32/netcfgx/lang/bg-BG.rc | 4 +-
dll/win32/netcfgx/lang/cs-CZ.rc | 4 +-
dll/win32/netcfgx/lang/da-DK.rc | 4 +-
dll/win32/netcfgx/lang/de-DE.rc | 4 +-
dll/win32/netcfgx/lang/el-GR.rc | 4 +-
dll/win32/netcfgx/lang/en-US.rc | 4 +-
dll/win32/netcfgx/lang/es-ES.rc | 4 +-
dll/win32/netcfgx/lang/fr-FR.rc | 6 +-
dll/win32/netcfgx/lang/he-IL.rc | 4 +-
dll/win32/netcfgx/lang/hu-HU.rc | 4 +-
dll/win32/netcfgx/lang/id-ID.rc | 4 +-
dll/win32/netcfgx/lang/it-IT.rc | 4 +-
dll/win32/netcfgx/lang/ja-JP.rc | 4 +-
dll/win32/netcfgx/lang/nl-NL.rc | 4 +-
dll/win32/netcfgx/lang/no-NO.rc | 4 +-
dll/win32/netcfgx/lang/pl-PL.rc | 4 +-
dll/win32/netcfgx/lang/pt-PT.rc | 4 +-
dll/win32/netcfgx/lang/ro-RO.rc | 4 +-
dll/win32/netcfgx/lang/ru-RU.rc | 4 +-
dll/win32/netcfgx/lang/sk-SK.rc | 4 +-
dll/win32/netcfgx/lang/sq-AL.rc | 4 +-
dll/win32/netcfgx/lang/sv-SE.rc | 4 +-
dll/win32/netcfgx/lang/tr-TR.rc | 4 +-
dll/win32/netcfgx/lang/uk-UA.rc | 4 +-
dll/win32/netcfgx/lang/zh-CN.rc | 4 +-
dll/win32/netcfgx/lang/zh-HK.rc | 4 +-
dll/win32/netcfgx/lang/zh-TW.rc | 4 +-
dll/win32/netcfgx/tcpipconf_notify.c | 170 +++++++++++++++++++++++++++++------
28 files changed, 199 insertions(+), 81 deletions(-)
diff --git a/dll/win32/netcfgx/lang/bg-BG.rc b/dll/win32/netcfgx/lang/bg-BG.rc
index 82ec4f5af78..65e25083d54 100644
--- a/dll/win32/netcfgx/lang/bg-BG.rc
+++ b/dll/win32/netcfgx/lang/bg-BG.rc
@@ -32,8 +32,8 @@ FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Ако компютърът се използва в повече от една мрежа, въведете заместващи IP
настройки отдолу", -1, 9, 9, 220, 20
CONTROL "&Автоматични лични IP адреси", IDC_USEDHCP,
"BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 40, 210, 12
- GROUPBOX "", -1, 9, 55, 228, 80, BS_GROUPBOX
- CONTROL "На&строено от потребителя", IDC_NODHCP, "BUTTON",
BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 55, 70, 12
+ GROUPBOX "", -1, 9, 55, 228, 125, BS_GROUPBOX
+ CONTROL "На&строено от потребителя", IDC_NODHCP, "BUTTON",
BS_AUTORADIOBUTTON, 14, 55, 70, 12
LTEXT "Адрес за IP:", -1, 14, 75, 135, 8
CONTROL "", IDC_IPADDR, "SysIPAddress32", WS_TABSTOP, 144, 75,
85, 12
LTEXT "Под&мрежова маска:", -1, 14, 95, 135, 8
diff --git a/dll/win32/netcfgx/lang/cs-CZ.rc b/dll/win32/netcfgx/lang/cs-CZ.rc
index da3d3f4aebe..e3de3d634ee 100644
--- a/dll/win32/netcfgx/lang/cs-CZ.rc
+++ b/dll/win32/netcfgx/lang/cs-CZ.rc
@@ -35,8 +35,8 @@ FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Pokud je tento počítač používán ve více než jedné síti, lze zadat
alternativní nastavení níže", -1, 9, 9, 220, 20
CONTROL "Au&tomatická privátní IP adresa", IDC_USEDHCP,
"BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 40, 210, 12
- GROUPBOX "", -1, 9, 55, 228, 80, BS_GROUPBOX
- CONTROL "&Uživatelské nastavení", IDC_NODHCP, "BUTTON",
BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 55, 70, 12
+ GROUPBOX "", -1, 9, 55, 228, 125, BS_GROUPBOX
+ CONTROL "&Uživatelské nastavení", IDC_NODHCP, "BUTTON",
BS_AUTORADIOBUTTON, 14, 55, 70, 12
LTEXT "&IP adresa:", -1, 14, 75, 135, 8
CONTROL "", IDC_IPADDR, "SysIPAddress32", WS_TABSTOP, 144, 75,
85, 12
LTEXT "&Maska podsítě:", -1, 14, 95, 135, 8
diff --git a/dll/win32/netcfgx/lang/da-DK.rc b/dll/win32/netcfgx/lang/da-DK.rc
index f344cb24bb5..7f1eb05fea9 100644
--- a/dll/win32/netcfgx/lang/da-DK.rc
+++ b/dll/win32/netcfgx/lang/da-DK.rc
@@ -32,8 +32,8 @@ FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "If this computer is used on more than one network, enter the alternate IP
settings below", -1, 9, 9, 220, 20
CONTROL "Au&tomatic private IP address", IDC_USEDHCP,
"BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 40, 210, 12
- GROUPBOX "", -1, 9, 55, 228, 80, BS_GROUPBOX
- CONTROL "U&ser configured", IDC_NODHCP, "BUTTON",
BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 55, 70, 12
+ GROUPBOX "", -1, 9, 55, 228, 125, BS_GROUPBOX
+ CONTROL "U&ser configured", IDC_NODHCP, "BUTTON",
BS_AUTORADIOBUTTON, 14, 55, 70, 12
LTEXT "&IP address:", -1, 14, 75, 135, 8
CONTROL "", IDC_IPADDR, "SysIPAddress32", WS_TABSTOP, 144, 75,
85, 12
LTEXT "S&ubnet mask:", -1, 14, 95, 135, 8
diff --git a/dll/win32/netcfgx/lang/de-DE.rc b/dll/win32/netcfgx/lang/de-DE.rc
index c3c4af4c9c9..a848d8dadba 100644
--- a/dll/win32/netcfgx/lang/de-DE.rc
+++ b/dll/win32/netcfgx/lang/de-DE.rc
@@ -32,8 +32,8 @@ FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Geben Sie alternative IP-Einstellungen an, falls dieser Computer in
mehreren Netzwerken verwendet wird.", -1, 9, 9, 220, 20
CONTROL "Au&tomatisch zugewiesene, private IP-Adresse", IDC_USEDHCP,
"BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 40, 210, 12
- GROUPBOX "", -1, 9, 55, 228, 80, BS_GROUPBOX
- CONTROL "B&enutzerdefiniert", IDC_NODHCP, "BUTTON",
BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 55, 70, 12
+ GROUPBOX "", -1, 9, 55, 228, 125, BS_GROUPBOX
+ CONTROL "B&enutzerdefiniert", IDC_NODHCP, "BUTTON",
BS_AUTORADIOBUTTON, 14, 55, 70, 12
LTEXT "&IP-Adresse:", -1, 14, 75, 135, 8
CONTROL "", IDC_IPADDR, "SysIPAddress32", WS_TABSTOP, 144, 75,
85, 12
LTEXT "S&ubnetzmaske:", -1, 14, 95, 135, 8
diff --git a/dll/win32/netcfgx/lang/el-GR.rc b/dll/win32/netcfgx/lang/el-GR.rc
index 5ca96fd1e84..791bcb4f3c7 100644
--- a/dll/win32/netcfgx/lang/el-GR.rc
+++ b/dll/win32/netcfgx/lang/el-GR.rc
@@ -32,8 +32,8 @@ FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "If this computer is used on more than one network, enter the alternate IP
settings below", -1, 9, 9, 220, 20
CONTROL "Au&tomatic private IP address", IDC_USEDHCP,
"BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 40, 210, 12
- GROUPBOX "", -1, 9, 55, 228, 80, BS_GROUPBOX
- CONTROL "U&ser configured", IDC_NODHCP, "BUTTON",
BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 55, 70, 12
+ GROUPBOX "", -1, 9, 55, 228, 125, BS_GROUPBOX
+ CONTROL "U&ser configured", IDC_NODHCP, "BUTTON",
BS_AUTORADIOBUTTON, 14, 55, 70, 12
LTEXT "&IP address:", -1, 14, 75, 135, 8
CONTROL "", IDC_IPADDR, "SysIPAddress32", WS_TABSTOP, 144, 75,
85, 12
LTEXT "S&ubnet mask:", -1, 14, 95, 135, 8
diff --git a/dll/win32/netcfgx/lang/en-US.rc b/dll/win32/netcfgx/lang/en-US.rc
index 80583ce62f4..b2533c81dbe 100644
--- a/dll/win32/netcfgx/lang/en-US.rc
+++ b/dll/win32/netcfgx/lang/en-US.rc
@@ -32,8 +32,8 @@ FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "If this computer is used on more than one network, enter the alternate IP
settings below", -1, 9, 9, 220, 20
CONTROL "Au&tomatic private IP address", IDC_USEDHCP,
"BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 40, 210, 12
- GROUPBOX "", -1, 9, 55, 228, 80, BS_GROUPBOX
- CONTROL "U&ser configured", IDC_NODHCP, "BUTTON",
BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 55, 70, 12
+ GROUPBOX "", -1, 9, 55, 228, 125, BS_GROUPBOX
+ CONTROL "U&ser configured", IDC_NODHCP, "BUTTON",
BS_AUTORADIOBUTTON, 14, 55, 70, 12
LTEXT "&IP address:", -1, 14, 75, 135, 8
CONTROL "", IDC_IPADDR, "SysIPAddress32", WS_TABSTOP, 144, 75,
85, 12
LTEXT "S&ubnet mask:", -1, 14, 95, 135, 8
diff --git a/dll/win32/netcfgx/lang/es-ES.rc b/dll/win32/netcfgx/lang/es-ES.rc
index 7ba13586b57..957f0a9e246 100644
--- a/dll/win32/netcfgx/lang/es-ES.rc
+++ b/dll/win32/netcfgx/lang/es-ES.rc
@@ -40,8 +40,8 @@ FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Escriba a continuación la configuración IP alternativa si este equipo se
utiliza en más de una red.", -1, 9, 9, 220, 20
CONTROL "&Dirección IP privada automática", IDC_USEDHCP,
"BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 40, 210, 12
- GROUPBOX "", -1, 9, 55, 228, 130, BS_GROUPBOX
- CONTROL "Configurada por el u&suario:", IDC_NODHCP, "BUTTON",
BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 55, 100, 12
+ GROUPBOX "", -1, 9, 55, 228, 125, BS_GROUPBOX
+ CONTROL "Configurada por el u&suario:", IDC_NODHCP, "BUTTON",
BS_AUTORADIOBUTTON, 14, 55, 100, 12
LTEXT "Dire&cción IP:", -1, 14, 75, 135, 8
CONTROL "", IDC_IPADDR, "SysIPAddress32", WS_TABSTOP, 140, 75,
85, 12
LTEXT "Máscara de s&ubred:", -1, 14, 95, 135, 8
diff --git a/dll/win32/netcfgx/lang/fr-FR.rc b/dll/win32/netcfgx/lang/fr-FR.rc
index 26f88406c9a..4725ee8c40d 100644
--- a/dll/win32/netcfgx/lang/fr-FR.rc
+++ b/dll/win32/netcfgx/lang/fr-FR.rc
@@ -31,9 +31,9 @@ CAPTION "Configuration alternative"
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Si cet ordinateur est utilisé sur plusieurs réseaux, entrez les
paramètres alternatifs IP ci-dessous", -1, 9, 9, 220, 20
- CONTROL "Adresse IP privée au&tomatique", IDC_USEDHCP,
"BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 40, 210, 12
- GROUPBOX "", -1, 9, 55, 228, 80, BS_GROUPBOX
- CONTROL "Utili&sateur configuré", IDC_NODHCP, "BUTTON",
BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 55, 70, 12
+ CONTROL "Obtenir automatiquement l'adresse IP", IDC_USEDHCP,
"BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 43, 210, 12
+ GROUPBOX "", -1, 9, 55, 228, 125, BS_GROUPBOX
+ CONTROL "&Utiliser l'adresse IP suivante :", IDC_NODHCP,
"BUTTON", BS_AUTORADIOBUTTON, 14, 59, 120, 12
LTEXT "Adresse &IP :", -1, 14, 75, 135, 8
CONTROL "", IDC_IPADDR, "SysIPAddress32", WS_TABSTOP, 144, 75,
85, 12
LTEXT "Masque de so&us-réseau :", -1, 14, 95, 135, 8
diff --git a/dll/win32/netcfgx/lang/he-IL.rc b/dll/win32/netcfgx/lang/he-IL.rc
index 73f291c967a..ea4651fee7d 100644
--- a/dll/win32/netcfgx/lang/he-IL.rc
+++ b/dll/win32/netcfgx/lang/he-IL.rc
@@ -32,8 +32,8 @@ FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "If this computer is used on more than one network, enter the alternate IP
settings below", -1, 9, 9, 220, 20
CONTROL "כתובת IP פרטית אוטומטית", IDC_USEDHCP, "BUTTON",
BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 40, 210, 12
- GROUPBOX "", -1, 9, 55, 228, 80, BS_GROUPBOX
- CONTROL "הגדרת משתמש", IDC_NODHCP, "BUTTON", BS_AUTORADIOBUTTON |
WS_GROUP | WS_TABSTOP, 14, 55, 70, 12
+ GROUPBOX "", -1, 9, 55, 228, 125, BS_GROUPBOX
+ CONTROL "הגדרת משתמש", IDC_NODHCP, "BUTTON", BS_AUTORADIOBUTTON,
14, 55, 70, 12
LTEXT "כתובת IP:", -1, 14, 75, 135, 8
CONTROL "", IDC_IPADDR, "SysIPAddress32", WS_TABSTOP, 144, 75,
85, 12
LTEXT "מסכת רשת משנה:", -1, 14, 95, 135, 8
diff --git a/dll/win32/netcfgx/lang/hu-HU.rc b/dll/win32/netcfgx/lang/hu-HU.rc
index 556a5149167..128ca3ea63e 100644
--- a/dll/win32/netcfgx/lang/hu-HU.rc
+++ b/dll/win32/netcfgx/lang/hu-HU.rc
@@ -32,8 +32,8 @@ FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "If this computer is used on more than one network, enter the alternate IP
settings below", -1, 9, 9, 220, 20
CONTROL "Au&tomatic private IP address", IDC_USEDHCP,
"BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 40, 210, 12
- GROUPBOX "", -1, 9, 55, 228, 80, BS_GROUPBOX
- CONTROL "U&ser configured", IDC_NODHCP, "BUTTON",
BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 55, 70, 12
+ GROUPBOX "", -1, 9, 55, 228, 125, BS_GROUPBOX
+ CONTROL "U&ser configured", IDC_NODHCP, "BUTTON",
BS_AUTORADIOBUTTON, 14, 55, 70, 12
LTEXT "&IP address:", -1, 14, 75, 135, 8
CONTROL "", IDC_IPADDR, "SysIPAddress32", WS_TABSTOP, 144, 75,
85, 12
LTEXT "S&ubnet mask:", -1, 14, 95, 135, 8
diff --git a/dll/win32/netcfgx/lang/id-ID.rc b/dll/win32/netcfgx/lang/id-ID.rc
index c52912ccc13..681ca31aa52 100644
--- a/dll/win32/netcfgx/lang/id-ID.rc
+++ b/dll/win32/netcfgx/lang/id-ID.rc
@@ -32,8 +32,8 @@ FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "If this computer is used on more than one network, enter the alternate IP
settings below", -1, 9, 9, 220, 20
CONTROL "Au&tomatic private IP address", IDC_USEDHCP,
"BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 40, 210, 12
- GROUPBOX "", -1, 9, 55, 228, 80, BS_GROUPBOX
- CONTROL "U&ser configured", IDC_NODHCP, "BUTTON",
BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 55, 70, 12
+ GROUPBOX "", -1, 9, 55, 228, 125, BS_GROUPBOX
+ CONTROL "U&ser configured", IDC_NODHCP, "BUTTON",
BS_AUTORADIOBUTTON, 14, 55, 70, 12
LTEXT "&IP address:", -1, 14, 75, 135, 8
CONTROL "", IDC_IPADDR, "SysIPAddress32", WS_TABSTOP, 144, 75,
85, 12
LTEXT "S&ubnet mask:", -1, 14, 95, 135, 8
diff --git a/dll/win32/netcfgx/lang/it-IT.rc b/dll/win32/netcfgx/lang/it-IT.rc
index f43133b7ed8..4e127e80a79 100644
--- a/dll/win32/netcfgx/lang/it-IT.rc
+++ b/dll/win32/netcfgx/lang/it-IT.rc
@@ -32,8 +32,8 @@ FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Se questo computer viene utilizzato in più di una rete indicare di
seguito le configurazioni di rete alternative", -1, 9, 9, 220, 20
CONTROL "Indirizzo IP privato &automatico", IDC_USEDHCP,
"BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 40, 210, 12
- GROUPBOX "", -1, 9, 55, 228, 80, BS_GROUPBOX
- CONTROL "Configurato dall'&utente", IDC_NODHCP, "BUTTON",
BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 55, 70, 12
+ GROUPBOX "", -1, 9, 55, 228, 125, BS_GROUPBOX
+ CONTROL "Configurato dall'&utente", IDC_NODHCP, "BUTTON",
BS_AUTORADIOBUTTON, 14, 55, 70, 12
LTEXT "&Indirizzo IP:", -1, 14, 75, 135, 8
CONTROL "", IDC_IPADDR, "SysIPAddress32", WS_TABSTOP, 144, 75,
85, 12
LTEXT "S&ubnet mask:", -1, 14, 95, 135, 8
diff --git a/dll/win32/netcfgx/lang/ja-JP.rc b/dll/win32/netcfgx/lang/ja-JP.rc
index 542f0d826f8..df5a08d0e3a 100644
--- a/dll/win32/netcfgx/lang/ja-JP.rc
+++ b/dll/win32/netcfgx/lang/ja-JP.rc
@@ -32,8 +32,8 @@ FONT 9, "MS UI Gothic"
BEGIN
LTEXT "If this computer is used on more than one network, enter the alternate IP
settings below", -1, 9, 9, 220, 20
CONTROL "Au&tomatic private IP address", IDC_USEDHCP,
"BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 40, 210, 12
- GROUPBOX "", -1, 9, 55, 228, 80, BS_GROUPBOX
- CONTROL "U&ser configured", IDC_NODHCP, "BUTTON",
BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 55, 70, 12
+ GROUPBOX "", -1, 9, 55, 228, 125, BS_GROUPBOX
+ CONTROL "U&ser configured", IDC_NODHCP, "BUTTON",
BS_AUTORADIOBUTTON, 14, 55, 70, 12
LTEXT "&IP address:", -1, 14, 75, 135, 8
CONTROL "", IDC_IPADDR, "SysIPAddress32", WS_TABSTOP, 144, 75,
85, 12
LTEXT "S&ubnet mask:", -1, 14, 95, 135, 8
diff --git a/dll/win32/netcfgx/lang/nl-NL.rc b/dll/win32/netcfgx/lang/nl-NL.rc
index 06815c66cdb..28d53a940d7 100644
--- a/dll/win32/netcfgx/lang/nl-NL.rc
+++ b/dll/win32/netcfgx/lang/nl-NL.rc
@@ -32,8 +32,8 @@ FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "If this computer is used on more than one network, enter the alternate IP
settings below", -1, 9, 9, 220, 20
CONTROL "Au&tomatic private IP address", IDC_USEDHCP,
"BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 40, 210, 12
- GROUPBOX "", -1, 9, 55, 228, 80, BS_GROUPBOX
- CONTROL "U&ser configured", IDC_NODHCP, "BUTTON",
BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 55, 70, 12
+ GROUPBOX "", -1, 9, 55, 228, 125, BS_GROUPBOX
+ CONTROL "U&ser configured", IDC_NODHCP, "BUTTON",
BS_AUTORADIOBUTTON, 14, 55, 70, 12
LTEXT "&IP address:", -1, 14, 75, 135, 8
CONTROL "", IDC_IPADDR, "SysIPAddress32", WS_TABSTOP, 144, 75,
85, 12
LTEXT "S&ubnet mask:", -1, 14, 95, 135, 8
diff --git a/dll/win32/netcfgx/lang/no-NO.rc b/dll/win32/netcfgx/lang/no-NO.rc
index 68d5cb42543..373e6007231 100644
--- a/dll/win32/netcfgx/lang/no-NO.rc
+++ b/dll/win32/netcfgx/lang/no-NO.rc
@@ -32,8 +32,8 @@ FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Hvis denne datamaskinen bruker mere en et nettverk, sett inn et
alternativt IP adresse i innstilling under", -1, 9, 9, 220, 20
CONTROL "Au&tomatisk privat IP addresse", IDC_USEDHCP,
"BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 40, 210, 12
- GROUPBOX "", -1, 9, 55, 228, 80, BS_GROUPBOX
- CONTROL "B&ruker konfigurert", IDC_NODHCP, "BUTTON",
BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 55, 70, 12
+ GROUPBOX "", -1, 9, 55, 228, 125, BS_GROUPBOX
+ CONTROL "B&ruker konfigurert", IDC_NODHCP, "BUTTON",
BS_AUTORADIOBUTTON, 14, 55, 70, 12
LTEXT "&IP addresse:", -1, 14, 75, 135, 8
CONTROL "", IDC_IPADDR, "SysIPAddress32", WS_TABSTOP, 144, 75,
85, 12
LTEXT "S&ubnet maske:", -1, 14, 95, 135, 8
diff --git a/dll/win32/netcfgx/lang/pl-PL.rc b/dll/win32/netcfgx/lang/pl-PL.rc
index f45e266524b..c169edebe92 100644
--- a/dll/win32/netcfgx/lang/pl-PL.rc
+++ b/dll/win32/netcfgx/lang/pl-PL.rc
@@ -34,8 +34,8 @@ FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Jeśli ten komputer jest używany w więcej niż jednej sieci, wprowadź
poniżej alternatywne ustawienia protokołu IP", -1, 9, 9, 220, 20
CONTROL "Au&tomatyczny prywatny adres IP", IDC_USEDHCP,
"BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 40, 210, 12
- GROUPBOX "", -1, 9, 55, 228, 80, BS_GROUPBOX
- CONTROL "&Ustawienia konfigurowane przez użytkownika", IDC_NODHCP,
"BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 55, 210, 12
+ GROUPBOX "", -1, 9, 55, 228, 125, BS_GROUPBOX
+ CONTROL "&Ustawienia konfigurowane przez użytkownika", IDC_NODHCP,
"BUTTON", BS_AUTORADIOBUTTON, 14, 55, 210, 12
LTEXT "Adres &IP:", -1, 14, 75, 135, 8
CONTROL "", IDC_IPADDR, "SysIPAddress32", WS_TABSTOP, 144, 75,
85, 12
LTEXT "&Maska podsieci:", -1, 14, 95, 135, 8
diff --git a/dll/win32/netcfgx/lang/pt-PT.rc b/dll/win32/netcfgx/lang/pt-PT.rc
index 52e1c1a8ade..f13e3315d02 100644
--- a/dll/win32/netcfgx/lang/pt-PT.rc
+++ b/dll/win32/netcfgx/lang/pt-PT.rc
@@ -34,8 +34,8 @@ FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Se este computador for usado em mais de uma rede, insira as configurações
de IP alternativas abaixo.", -1, 9, 9, 220, 20
CONTROL "IP privado &automático", IDC_USEDHCP, "BUTTON",
BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 40, 210, 12
- GROUPBOX "", -1, 9, 55, 228, 80, BS_GROUPBOX
- CONTROL "&Config. do utilizador", IDC_NODHCP, "BUTTON",
BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 55, 70, 12
+ GROUPBOX "", -1, 9, 55, 228, 125, BS_GROUPBOX
+ CONTROL "&Config. do utilizador", IDC_NODHCP, "BUTTON",
BS_AUTORADIOBUTTON, 14, 55, 70, 12
LTEXT "Endereço &IP:", -1, 14, 75, 135, 8
CONTROL "", IDC_IPADDR, "SysIPAddress32", WS_TABSTOP, 144, 75,
85, 12
LTEXT "Máscara S&ubnet:", -1, 14, 95, 135, 8
diff --git a/dll/win32/netcfgx/lang/ro-RO.rc b/dll/win32/netcfgx/lang/ro-RO.rc
index fae8a5d2c3f..e5215219b27 100644
--- a/dll/win32/netcfgx/lang/ro-RO.rc
+++ b/dll/win32/netcfgx/lang/ro-RO.rc
@@ -34,8 +34,8 @@ FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Dacă acest calculator este utilizat în mai multe rețele, puteți specifica
mai jos o configurație alternativă.", -1, 9, 9, 220, 20
CONTROL "Adresă IP p&rivată obținută automat", IDC_USEDHCP,
"BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 40, 210, 12
- GROUPBOX "", -1, 9, 55, 228, 80, BS_GROUPBOX
- CONTROL "Configurată &manual", IDC_NODHCP, "BUTTON",
BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 55, 90, 12
+ GROUPBOX "", -1, 9, 55, 228, 125, BS_GROUPBOX
+ CONTROL "Configurată &manual", IDC_NODHCP, "BUTTON",
BS_AUTORADIOBUTTON, 14, 55, 90, 12
LTEXT "Adresă I&P:", -1, 14, 75, 135, 8
CONTROL "", IDC_IPADDR, "SysIPAddress32", WS_TABSTOP, 144, 75,
85, 12
LTEXT "Mască de su&brețea:", -1, 14, 95, 135, 8
diff --git a/dll/win32/netcfgx/lang/ru-RU.rc b/dll/win32/netcfgx/lang/ru-RU.rc
index 5d46291502c..f2797cd8b23 100644
--- a/dll/win32/netcfgx/lang/ru-RU.rc
+++ b/dll/win32/netcfgx/lang/ru-RU.rc
@@ -32,8 +32,8 @@ FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Если этот компьютер используется в нескольких сетях, введите параметры
альтернативной конфигурации протокола IP:", -1, 9, 9, 230, 20
CONTROL "А&втоматический частный IP-адрес", IDC_USEDHCP,
"BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 40, 210, 12
- GROUPBOX "", -1, 9, 55, 228, 80, BS_GROUPBOX
- CONTROL "Настраиваем&ый пользователем", IDC_NODHCP, "BUTTON",
BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 55, 130, 12
+ GROUPBOX "", -1, 9, 55, 228, 125, BS_GROUPBOX
+ CONTROL "Настраиваем&ый пользователем", IDC_NODHCP, "BUTTON",
BS_AUTORADIOBUTTON, 14, 55, 130, 12
LTEXT "IP-&адрес:", -1, 14, 75, 135, 8
CONTROL "", IDC_IPADDR, "SysIPAddress32", WS_TABSTOP, 144, 75,
85, 12
LTEXT "Ма&ска подсети:", -1, 14, 95, 135, 8
diff --git a/dll/win32/netcfgx/lang/sk-SK.rc b/dll/win32/netcfgx/lang/sk-SK.rc
index 1115422238f..9b1156a7ed8 100644
--- a/dll/win32/netcfgx/lang/sk-SK.rc
+++ b/dll/win32/netcfgx/lang/sk-SK.rc
@@ -32,8 +32,8 @@ FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "If this computer is used on more than one network, enter the alternate IP
settings below", -1, 9, 9, 220, 20
CONTROL "Au&tomatic private IP address", IDC_USEDHCP,
"BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 40, 210, 12
- GROUPBOX "", -1, 9, 55, 228, 80, BS_GROUPBOX
- CONTROL "U&ser configured", IDC_NODHCP, "BUTTON",
BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 55, 70, 12
+ GROUPBOX "", -1, 9, 55, 228, 125, BS_GROUPBOX
+ CONTROL "U&ser configured", IDC_NODHCP, "BUTTON",
BS_AUTORADIOBUTTON, 14, 55, 70, 12
LTEXT "Adresa &IP:", -1, 14, 75, 135, 8
CONTROL "", IDC_IPADDR, "SysIPAddress32", WS_TABSTOP, 144, 75,
85, 12
LTEXT "S&ubnet mask:", -1, 14, 95, 135, 8
diff --git a/dll/win32/netcfgx/lang/sq-AL.rc b/dll/win32/netcfgx/lang/sq-AL.rc
index d72048b17c0..5b673ced9c4 100644
--- a/dll/win32/netcfgx/lang/sq-AL.rc
+++ b/dll/win32/netcfgx/lang/sq-AL.rc
@@ -34,8 +34,8 @@ FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Në qoftë se ky kompjuter është përdorur në më shumë se një rrjet, futni
cilësimet alternative IP poshtë", -1, 9, 9, 220, 20
CONTROL "Adresë IP private auto%matike", IDC_USEDHCP, "BUTTON",
BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 40, 210, 12
- GROUPBOX "", -1, 9, 55, 228, 80, BS_GROUPBOX
- CONTROL "Përdorue&si konfiguruar", IDC_NODHCP, "BUTTON",
BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 55, 70, 12
+ GROUPBOX "", -1, 9, 55, 228, 125, BS_GROUPBOX
+ CONTROL "Përdorue&si konfiguruar", IDC_NODHCP, "BUTTON",
BS_AUTORADIOBUTTON, 14, 55, 70, 12
LTEXT "Adresa &IP:", -1, 14, 75, 135, 8
CONTROL "", IDC_IPADDR, "SysIPAddress32", WS_TABSTOP, 144, 75,
85, 12
LTEXT "S&ubnet mask:", -1, 14, 95, 135, 8
diff --git a/dll/win32/netcfgx/lang/sv-SE.rc b/dll/win32/netcfgx/lang/sv-SE.rc
index 578e279a0bd..bdd89153f31 100644
--- a/dll/win32/netcfgx/lang/sv-SE.rc
+++ b/dll/win32/netcfgx/lang/sv-SE.rc
@@ -32,8 +32,8 @@ FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "If this computer is used on more than one network, enter the alternate IP
settings below", -1, 9, 9, 220, 20
CONTROL "Au&tomatic private IP address", IDC_USEDHCP,
"BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 40, 210, 12
- GROUPBOX "", -1, 9, 55, 228, 80, BS_GROUPBOX
- CONTROL "U&ser configured", IDC_NODHCP, "BUTTON",
BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 55, 70, 12
+ GROUPBOX "", -1, 9, 55, 228, 125, BS_GROUPBOX
+ CONTROL "U&ser configured", IDC_NODHCP, "BUTTON",
BS_AUTORADIOBUTTON, 14, 55, 70, 12
LTEXT "&IP address:", -1, 14, 75, 135, 8
CONTROL "", IDC_IPADDR, "SysIPAddress32", WS_TABSTOP, 144, 75,
85, 12
LTEXT "S&ubnet mask:", -1, 14, 95, 135, 8
diff --git a/dll/win32/netcfgx/lang/tr-TR.rc b/dll/win32/netcfgx/lang/tr-TR.rc
index e218c502488..705d0fde2da 100644
--- a/dll/win32/netcfgx/lang/tr-TR.rc
+++ b/dll/win32/netcfgx/lang/tr-TR.rc
@@ -34,8 +34,8 @@ FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Eğer bu bilgisayar birden çok ağda kullanılıyorsa, aşağıya alternatif IP
ayarlarını giriniz.", -1, 9, 9, 220, 20
CONTROL "&Otomatik özel IP adresi", IDC_USEDHCP, "BUTTON",
BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 40, 210, 12
- GROUPBOX "", -1, 9, 55, 228, 80, BS_GROUPBOX
- CONTROL "K&ullanıcının yapılandırdığı", IDC_NODHCP, "BUTTON",
BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 55, 70, 12
+ GROUPBOX "", -1, 9, 55, 228, 125, BS_GROUPBOX
+ CONTROL "K&ullanıcının yapılandırdığı", IDC_NODHCP, "BUTTON",
BS_AUTORADIOBUTTON, 14, 55, 70, 12
LTEXT "&IP adresi:", -1, 14, 75, 135, 8
CONTROL "", IDC_IPADDR, "SysIPAddress32", WS_TABSTOP, 144, 75,
85, 12
LTEXT "&Alt ağ maskesi:", -1, 14, 95, 135, 8
diff --git a/dll/win32/netcfgx/lang/uk-UA.rc b/dll/win32/netcfgx/lang/uk-UA.rc
index b72169e3bf4..ae19c910e9c 100644
--- a/dll/win32/netcfgx/lang/uk-UA.rc
+++ b/dll/win32/netcfgx/lang/uk-UA.rc
@@ -32,8 +32,8 @@ FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Якщо цей комп'ютер використовується в декількох мережах, введіть
параметри альтернативної конфігурації IP", -1, 9, 9, 220, 20
CONTROL "А&втоматична приватна IP-адреса", IDC_USEDHCP,
"BUTTON", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 40, 210, 12
- GROUPBOX "", -1, 9, 55, 228, 80, BS_GROUPBOX
- CONTROL "Н&алаштована користувачем", IDC_NODHCP, "BUTTON",
BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 55, 120, 12
+ GROUPBOX "", -1, 9, 55, 228, 125, BS_GROUPBOX
+ CONTROL "Н&алаштована користувачем", IDC_NODHCP, "BUTTON",
BS_AUTORADIOBUTTON, 14, 55, 120, 12
LTEXT "&IP-адреса:", -1, 14, 75, 135, 8
CONTROL "", IDC_IPADDR, "SysIPAddress32", WS_TABSTOP, 144, 75,
85, 12
LTEXT "Ма&ска підмережі:", -1, 14, 95, 135, 8
diff --git a/dll/win32/netcfgx/lang/zh-CN.rc b/dll/win32/netcfgx/lang/zh-CN.rc
index 9420b890c8f..dc8da9cb79c 100644
--- a/dll/win32/netcfgx/lang/zh-CN.rc
+++ b/dll/win32/netcfgx/lang/zh-CN.rc
@@ -41,8 +41,8 @@ FONT 9, "宋体"
BEGIN
LTEXT "如果此计算机使用多个网络,输入下面的备用 IP 设置", -1, 9, 9, 220, 20
CONTROL "自动专用 IP 地址(&T)", IDC_USEDHCP, "BUTTON",
BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 40, 210, 12
- GROUPBOX "", -1, 9, 55, 228, 80, BS_GROUPBOX
- CONTROL "用户配置(&S)", IDC_NODHCP, "BUTTON", BS_AUTORADIOBUTTON
| WS_GROUP | WS_TABSTOP, 14, 55, 70, 12
+ GROUPBOX "", -1, 9, 55, 228, 125, BS_GROUPBOX
+ CONTROL "用户配置(&S)", IDC_NODHCP, "BUTTON", BS_AUTORADIOBUTTON,
14, 55, 70, 12
LTEXT "IP 地址(&I):", -1, 14, 75, 135, 8
CONTROL "", IDC_IPADDR, "SysIPAddress32", WS_TABSTOP, 144, 75,
85, 12
LTEXT "子网掩码(&U):", -1, 14, 95, 135, 8
diff --git a/dll/win32/netcfgx/lang/zh-HK.rc b/dll/win32/netcfgx/lang/zh-HK.rc
index d2e7ddaae9a..c58dc9741b9 100644
--- a/dll/win32/netcfgx/lang/zh-HK.rc
+++ b/dll/win32/netcfgx/lang/zh-HK.rc
@@ -40,8 +40,8 @@ FONT 9, "新細明體"
BEGIN
LTEXT "如果這台電腦是被用在多個網絡上,請在下列輸入其他 IP 設定", -1, 9, 9, 220, 20
CONTROL "自動專用 IP 位址(&T)", IDC_USEDHCP, "BUTTON",
BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 40, 210, 12
- GROUPBOX "", -1, 9, 55, 228, 80, BS_GROUPBOX
- CONTROL "使用者設定(&S)", IDC_NODHCP, "BUTTON", BS_AUTORADIOBUTTON
| WS_GROUP | WS_TABSTOP, 14, 55, 70, 12
+ GROUPBOX "", -1, 9, 55, 228, 125, BS_GROUPBOX
+ CONTROL "使用者設定(&S)", IDC_NODHCP, "BUTTON",
BS_AUTORADIOBUTTON, 14, 55, 70, 12
LTEXT "IP 位址(&I):", -1, 14, 75, 135, 8
CONTROL "", IDC_IPADDR, "SysIPAddress32", WS_TABSTOP, 144, 75,
85, 12
LTEXT "子網絡遮罩(&U):", -1, 14, 95, 135, 8
diff --git a/dll/win32/netcfgx/lang/zh-TW.rc b/dll/win32/netcfgx/lang/zh-TW.rc
index b4cb6651580..d652a4272ba 100644
--- a/dll/win32/netcfgx/lang/zh-TW.rc
+++ b/dll/win32/netcfgx/lang/zh-TW.rc
@@ -40,8 +40,8 @@ FONT 9, "新細明體"
BEGIN
LTEXT "如果這台電腦是被用在多個網路上,在下列輸入其他 IP 設定", -1, 9, 9, 220, 20
CONTROL "自動專用 IP 位址(&T)", IDC_USEDHCP, "BUTTON",
BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 14, 40, 210, 12
- GROUPBOX "", -1, 9, 55, 228, 80, BS_GROUPBOX
- CONTROL "使用者設定(&S)", IDC_NODHCP, "BUTTON", BS_AUTORADIOBUTTON
| WS_GROUP | WS_TABSTOP, 14, 55, 70, 12
+ GROUPBOX "", -1, 9, 55, 228, 125, BS_GROUPBOX
+ CONTROL "使用者設定(&S)", IDC_NODHCP, "BUTTON",
BS_AUTORADIOBUTTON, 14, 55, 70, 12
LTEXT "IP 位址(&I):", -1, 14, 75, 135, 8
CONTROL "", IDC_IPADDR, "SysIPAddress32", WS_TABSTOP, 144, 75,
85, 12
LTEXT "子網路遮罩(&U):", -1, 14, 95, 135, 8
diff --git a/dll/win32/netcfgx/tcpipconf_notify.c b/dll/win32/netcfgx/tcpipconf_notify.c
index 264a667805b..cc64370e856 100644
--- a/dll/win32/netcfgx/tcpipconf_notify.c
+++ b/dll/win32/netcfgx/tcpipconf_notify.c
@@ -15,7 +15,7 @@ typedef struct
DWORD IPSize;
DWORD TCPSize;
DWORD UDPSize;
-}TcpFilterSettings;
+} TcpFilterSettings;
// KEY: Tcpip\Parameter\{InstanceGuid}\IpAddress | DhcpIpAddress
// KEY: Tcpip\Parameter\{InstanceGuid}\SubnetMask | DhcpSubnetMask
@@ -30,7 +30,7 @@ typedef struct
DWORD UseDomainNameDevolution;
WCHAR szDomain[100];
LPWSTR szSearchList;
-}TcpipAdvancedDNSDlgSettings;
+} TcpipAdvancedDNSDlgSettings;
typedef struct tagIP_ADDR
{
@@ -39,42 +39,42 @@ typedef struct tagIP_ADDR
{
DWORD Subnetmask;
USHORT Metric;
- }u;
+ } u;
ULONG NTEContext;
- struct tagIP_ADDR * Next;
-}IP_ADDR;
+ struct tagIP_ADDR *Next;
+} IP_ADDR;
typedef enum
{
METRIC = 1,
SUBMASK = 2,
IPADDR = 3
-}COPY_TYPE;
+} COPY_TYPE;
typedef struct
{
- IP_ADDR * Ip;
- IP_ADDR * Ns;
- IP_ADDR * Gw;
+ IP_ADDR *Ip;
+ IP_ADDR *Ns;
+ IP_ADDR *Gw;
UINT DhcpEnabled;
UINT AutoconfigActive;
DWORD Index;
- TcpFilterSettings * pFilter;
- TcpipAdvancedDNSDlgSettings * pDNS;
-}TcpipSettings;
+ TcpFilterSettings *pFilter;
+ TcpipAdvancedDNSDlgSettings *pDNS;
+} TcpipSettings;
typedef struct
{
- const INetCfgComponentPropertyUi * lpVtbl;
- const INetCfgComponentControl * lpVtblCompControl;
- LONG ref;
- IUnknown * pUnknown;
- INetCfg * pNCfg;
- INetCfgComponent * pNComp;
+ const INetCfgComponentPropertyUi *lpVtbl;
+ const INetCfgComponentControl *lpVtblCompControl;
+ LONG ref;
+ IUnknown *pUnknown;
+ INetCfg *pNCfg;
+ INetCfgComponent *pNComp;
TcpipSettings *pCurrentConfig;
CLSID NetCfgInstanceId;
-}TcpipConfNotifyImpl, *LPTcpipConfNotifyImpl;
+} TcpipConfNotifyImpl, *LPTcpipConfNotifyImpl;
typedef struct
{
@@ -82,36 +82,36 @@ typedef struct
HWND hDlgCtrl;
WCHAR szIP[16];
UINT Metric;
-}TcpipGwSettings;
+} TcpipGwSettings;
typedef struct
{
- BOOL bAdd;
+ BOOL bAdd;
HWND hDlgCtrl;
WCHAR szIP[16];
WCHAR szMask[16];
-}TcpipIpSettings;
+} TcpipIpSettings;
typedef struct
{
BOOL bAdd;
HWND hDlgCtrl;
WCHAR szIP[16];
-}TcpipDnsSettings;
+} TcpipDnsSettings;
typedef struct
{
BOOL bAdd;
HWND hDlgCtrl;
LPWSTR Suffix;
-}TcpipSuffixSettings;
+} TcpipSuffixSettings;
typedef struct
{
HWND hDlgCtrl;
UINT ResId;
UINT MaxNum;
-}TcpipPortSettings;
+} TcpipPortSettings;
static __inline LPTcpipConfNotifyImpl
impl_from_INetCfgComponentControl(INetCfgComponentControl *iface)
{
@@ -2136,6 +2136,83 @@ LaunchAdvancedTcpipSettings(
}
}
+HRESULT
+InitializeTcpipAltDlgCtrls(
+ HWND hwndDlg,
+ TcpipSettings *pCurSettings)
+{
+ SendDlgItemMessageW(hwndDlg, IDC_IPADDR, IPM_SETRANGE, 0, MAKEIPRANGE(1, 223));
+ SendDlgItemMessageW(hwndDlg, IDC_IPADDR, IPM_SETRANGE, 1, MAKEIPRANGE(0, 255));
+ SendDlgItemMessageW(hwndDlg, IDC_IPADDR, IPM_SETRANGE, 2, MAKEIPRANGE(0, 255));
+ SendDlgItemMessageW(hwndDlg, IDC_IPADDR, IPM_SETRANGE, 3, MAKEIPRANGE(0, 255));
+
+ SendDlgItemMessageW(hwndDlg, IDC_SUBNETMASK, IPM_SETRANGE, 0, MAKEIPRANGE(0, 255));
+ SendDlgItemMessageW(hwndDlg, IDC_SUBNETMASK, IPM_SETRANGE, 1, MAKEIPRANGE(0, 255));
+ SendDlgItemMessageW(hwndDlg, IDC_SUBNETMASK, IPM_SETRANGE, 2, MAKEIPRANGE(0, 255));
+ SendDlgItemMessageW(hwndDlg, IDC_SUBNETMASK, IPM_SETRANGE, 3, MAKEIPRANGE(0, 255));
+
+ SendDlgItemMessageW(hwndDlg, IDC_DEFGATEWAY, IPM_SETRANGE, 0, MAKEIPRANGE(1, 223));
+ SendDlgItemMessageW(hwndDlg, IDC_DEFGATEWAY, IPM_SETRANGE, 1, MAKEIPRANGE(0, 255));
+ SendDlgItemMessageW(hwndDlg, IDC_DEFGATEWAY, IPM_SETRANGE, 2, MAKEIPRANGE(0, 255));
+ SendDlgItemMessageW(hwndDlg, IDC_DEFGATEWAY, IPM_SETRANGE, 3, MAKEIPRANGE(0, 255));
+
+ SendDlgItemMessageW(hwndDlg, IDC_DNS1, IPM_SETRANGE, 0, MAKEIPRANGE(1, 223));
+ SendDlgItemMessageW(hwndDlg, IDC_DNS1, IPM_SETRANGE, 1, MAKEIPRANGE(0, 255));
+ SendDlgItemMessageW(hwndDlg, IDC_DNS1, IPM_SETRANGE, 2, MAKEIPRANGE(0, 255));
+ SendDlgItemMessageW(hwndDlg, IDC_DNS1, IPM_SETRANGE, 3, MAKEIPRANGE(0, 255));
+
+ SendDlgItemMessageW(hwndDlg, IDC_DNS2, IPM_SETRANGE, 0, MAKEIPRANGE(1, 223));
+ SendDlgItemMessageW(hwndDlg, IDC_DNS2, IPM_SETRANGE, 1, MAKEIPRANGE(0, 255));
+ SendDlgItemMessageW(hwndDlg, IDC_DNS2, IPM_SETRANGE, 2, MAKEIPRANGE(0, 255));
+ SendDlgItemMessageW(hwndDlg, IDC_DNS2, IPM_SETRANGE, 3, MAKEIPRANGE(0, 255));
+
+ if (pCurSettings->DhcpEnabled)
+ {
+ CheckRadioButton(hwndDlg, IDC_USEDHCP, IDC_NODHCP, IDC_USEDHCP);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_IPADDR), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_SUBNETMASK), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_DEFGATEWAY), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_DNS1), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_DNS2), FALSE);
+ }
+ else
+ {
+ CheckRadioButton(hwndDlg, IDC_USEDHCP, IDC_NODHCP, IDC_NODHCP);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_DNS1), TRUE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_DNS2), TRUE);
+
+ if (pCurSettings->Ip)
+ {
+ /* Set current ip address */
+ SendDlgItemMessageA(hwndDlg, IDC_IPADDR, IPM_SETADDRESS, 0,
(LPARAM)pCurSettings->Ip->IpAddress);
+ /* Set current hostmask */
+ SendDlgItemMessageA(hwndDlg, IDC_SUBNETMASK, IPM_SETADDRESS, 0,
(LPARAM)pCurSettings->Ip->u.Subnetmask);
+ }
+ }
+
+ if (pCurSettings->Gw && pCurSettings->Gw->IpAddress)
+ {
+ /* Set current gateway */
+ SendDlgItemMessageA(hwndDlg, IDC_DEFGATEWAY, IPM_SETADDRESS, 0,
(LPARAM)pCurSettings->Gw->IpAddress);
+ }
+
+ if (pCurSettings->Ns)
+ {
+ SendDlgItemMessageW(hwndDlg, IDC_DNS1, IPM_SETADDRESS, 0,
(LPARAM)pCurSettings->Ns->IpAddress);
+ if (pCurSettings->Ns->Next)
+ SendDlgItemMessageW(hwndDlg, IDC_DNS2, IPM_SETADDRESS, 0,
(LPARAM)pCurSettings->Ns->Next->IpAddress);
+ else
+ SendDlgItemMessageW(hwndDlg, IDC_DNS2, IPM_CLEARADDRESS, 0, 0);
+ }
+ else
+ {
+ SendDlgItemMessageW(hwndDlg, IDC_DNS1, IPM_CLEARADDRESS, 0, 0);
+ SendDlgItemMessageW(hwndDlg, IDC_DNS2, IPM_CLEARADDRESS, 0, 0);
+ }
+
+ return S_OK;
+}
+
INT_PTR
CALLBACK
TcpipAltConfDlg(
@@ -2144,10 +2221,51 @@ TcpipAltConfDlg(
WPARAM wParam,
LPARAM lParam)
{
- switch(uMsg)
+ TcpipConfNotifyImpl *This;
+ LPPROPSHEETPAGE page;
+ BOOL bEnabled;
+
+ switch (uMsg)
{
case WM_INITDIALOG:
+ {
+ page = (LPPROPSHEETPAGE)lParam;
+ This = (TcpipConfNotifyImpl*)page->lParam;
+ SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)This);
+ if (This->pCurrentConfig)
+ InitializeTcpipAltDlgCtrls(hwndDlg, This->pCurrentConfig);
return TRUE;
+ }
+ case WM_COMMAND:
+ {
+ switch (LOWORD(wParam))
+ {
+ case IDC_USEDHCP:
+ case IDC_NODHCP:
+ {
+ if (HIWORD(wParam) == BN_CLICKED)
+ {
+ bEnabled = (IsDlgButtonChecked(hwndDlg, IDC_USEDHCP) ==
BST_CHECKED);
+ if (bEnabled)
+ {
+ 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);
+
+ PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
+ }
+ break;
+ }
+ }
+ break;
+ }
}
return FALSE;
}