Add a header to the prop sheet and correct a variable spelling

fixes bug 1731
patch from itay.perl@gmail.com

svn path=/trunk/; revision=23437
This commit is contained in:
Ged Murphy 2006-08-03 18:01:47 +00:00
parent 53af48a8b2
commit c6b0db6688
2 changed files with 14 additions and 6 deletions

View file

@ -338,10 +338,10 @@ NICPropertyPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
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;

View file

@ -466,7 +466,15 @@ DisplayTCPIPProperties(HWND hParent, IP_ADAPTER_INFO *pInfo)
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 @@ DisplayTCPIPProperties(HWND hParent, IP_ADAPTER_INFO *pInfo)
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;