[ros-diffs] [gedmurphy] 23440: - 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
gedmurphy at svn.reactos.org
gedmurphy at svn.reactos.org
Thu Aug 3 23:29:09 CEST 2006
Author: gedmurphy
Date: Fri Aug 4 01:29:09 2006
New Revision: 23440
URL: http://svn.reactos.org/svn/reactos?rev=23440&view=rev
Log:
- 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
Modified:
trunk/reactos/dll/cpl/ncpa/tcpip_properties.c
Modified: trunk/reactos/dll/cpl/ncpa/tcpip_properties.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/ncpa/tcpip_properties.c?rev=23440&r1=23439&r2=23440&view=diff
==============================================================================
--- trunk/reactos/dll/cpl/ncpa/tcpip_properties.c (original)
+++ trunk/reactos/dll/cpl/ncpa/tcpip_properties.c Fri Aug 4 01:29:09 2006
@@ -62,6 +62,25 @@
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,
More information about the Ros-diffs
mailing list