mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 09:06:22 +00:00
- load the current IP address when switching from dhcp to manual.
- this isn't how Windows behaves, but it should be as it makes life slightly easier in most cases svn path=/trunk/; revision=23440
This commit is contained in:
parent
7288929ef0
commit
2175834be0
1 changed files with 19 additions and 0 deletions
|
@ -62,6 +62,25 @@ DWORD APIENTRY DhcpNotifyConfigChange(LPWSTR ServerName, LPWSTR AdapterName,
|
|||
|
||||
static void
|
||||
ManualDNS(HWND Dlg, BOOL Enabled) {
|
||||
PTCPIP_PROPERTIES_DATA DlgData =
|
||||
(PTCPIP_PROPERTIES_DATA) GetWindowLongPtrW(Dlg, GWL_USERDATA);
|
||||
|
||||
if (! DlgData->OldDhcpEnabled)
|
||||
{
|
||||
if (INADDR_NONE != DlgData->OldIpAddress) {
|
||||
SendDlgItemMessage(Dlg, IDC_IPADDR, IPM_SETADDRESS, 0,
|
||||
ntohl(DlgData->OldIpAddress));
|
||||
}
|
||||
if (INADDR_NONE != DlgData->OldSubnetMask) {
|
||||
SendDlgItemMessage(Dlg, IDC_SUBNETMASK, IPM_SETADDRESS, 0,
|
||||
ntohl(DlgData->OldSubnetMask));
|
||||
}
|
||||
if (INADDR_NONE != DlgData->OldGateway) {
|
||||
SendDlgItemMessage(Dlg, IDC_DEFGATEWAY, IPM_SETADDRESS, 0,
|
||||
ntohl(DlgData->OldGateway));
|
||||
}
|
||||
}
|
||||
|
||||
CheckDlgButton(Dlg, IDC_FIXEDDNS,
|
||||
Enabled ? BST_CHECKED : BST_UNCHECKED);
|
||||
CheckDlgButton(Dlg, IDC_AUTODNS,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue