mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 19:26:32 +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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user