[ros-diffs] [gedmurphy] 23437: Add a header to the prop sheet and correct a variable spelling fixes bug 1731 patch from itay.perl at gmail.com

gedmurphy at svn.reactos.org gedmurphy at svn.reactos.org
Thu Aug 3 20:01:47 CEST 2006


Author: gedmurphy
Date: Thu Aug  3 22:01:47 2006
New Revision: 23437

URL: http://svn.reactos.org/svn/reactos?rev=23437&view=rev
Log:
Add a header to the prop sheet and correct a variable spelling
fixes bug 1731
patch from itay.perl at gmail.com

Modified:
    trunk/reactos/dll/cpl/ncpa/ncpa.c
    trunk/reactos/dll/cpl/ncpa/tcpip_properties.c

Modified: trunk/reactos/dll/cpl/ncpa/ncpa.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/ncpa/ncpa.c?rev=23437&r1=23436&r2=23437&view=diff
==============================================================================
--- trunk/reactos/dll/cpl/ncpa/ncpa.c (original)
+++ trunk/reactos/dll/cpl/ncpa/ncpa.c Thu Aug  3 22:01:47 2006
@@ -338,10 +338,10 @@
 					tpszCfgInstanceID = (TCHAR*)pPage->lParam;
 					while(pAdapter)
 					{
-						TCHAR tpszAdatperName[MAX_PATH];
-						swprintf(tpszAdatperName,L"%S",pAdapter->AdapterName);
-						DPRINT("IPHLPAPI returned: %S\n", tpszAdatperName);
-						if(_tcscmp(tpszAdatperName,tpszCfgInstanceID)==0)
+						TCHAR tpszAdapterName[MAX_PATH];
+						swprintf(tpszAdapterName,L"%S",pAdapter->AdapterName);
+						DPRINT("IPHLPAPI returned: %S\n", tpszAdapterName);
+						if(_tcscmp(tpszAdapterName,tpszCfgInstanceID)==0)
 						{
 							DisplayTCPIPProperties(hwndDlg,pAdapter);
 							break;

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=23437&r1=23436&r2=23437&view=diff
==============================================================================
--- trunk/reactos/dll/cpl/ncpa/tcpip_properties.c (original)
+++ trunk/reactos/dll/cpl/ncpa/tcpip_properties.c Thu Aug  3 22:01:47 2006
@@ -466,7 +466,15 @@
     PROPSHEETHEADERW psh;
     INITCOMMONCONTROLSEX cce;
     TCPIP_PROPERTIES_DATA DlgData;
-
+    TCHAR tpszCaption[MAX_PATH];
+    HWND hListBox = GetDlgItem(hParent,IDC_COMPONENTSLIST);
+    int iListBoxIndex = (int) SendMessage(hListBox,LB_GETCURSEL,0,0);
+    if(iListBoxIndex != LB_ERR)
+        SendMessage(hListBox,LB_GETTEXT,iListBoxIndex,(LPARAM)tpszCaption);
+    else
+        _stprintf(tpszCaption,_T("[ERROR]"));
+    _tcscat(tpszCaption,_T(" Properties"));
+    
     if (! LoadDataFromInfo(&DlgData, pInfo))
     {
         ShowError(hParent, IDS_CANNOT_LOAD_CONFIG);
@@ -483,7 +491,7 @@
     psh.hwndParent = hParent;
     psh.hInstance = hApplet;
     psh.hIcon = LoadIcon(hApplet, MAKEINTRESOURCE(IDI_CPLSYSTEM));
-    psh.pszCaption = NULL;//Caption;
+    psh.pszCaption = tpszCaption;
     psh.nPages = sizeof(psp) / sizeof(PROPSHEETPAGE);
     psh.nStartPage = 0;
     psh.ppsp = psp;




More information about the Ros-diffs mailing list