projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9b2a53e
)
[NETCFGX] NetworkPropertySheetProvider: Fix property selection because the property...
author
Eric Kohl
<eric.kohl@reactos.org>
Tue, 9 Oct 2018 21:19:48 +0000
(23:19 +0200)
committer
Eric Kohl
<eric.kohl@reactos.org>
Tue, 9 Oct 2018 21:19:48 +0000
(23:19 +0200)
CORE-15095
dll/win32/netcfgx/propertypage.c
patch
|
blob
|
history
diff --git
a/dll/win32/netcfgx/propertypage.c
b/dll/win32/netcfgx/propertypage.c
index
1c37083
..
b069cf6
100644
(file)
--- a/
dll/win32/netcfgx/propertypage.c
+++ b/
dll/win32/netcfgx/propertypage.c
@@
-789,6
+789,7
@@
OnInitDialog(
HWND hwndControl;
PWSTR pszText;
DWORD i;
HWND hwndControl;
PWSTR pszText;
DWORD i;
+ INT idx;
TRACE("OnInitDialog()\n");
TRACE("OnInitDialog()\n");
@@
-811,13
+812,15
@@
OnInitDialog(
else
pszText = pParamArray->Array[i].pszName;
else
pszText = pParamArray->Array[i].pszName;
- ListBox_AddString(hwndControl, pszText);
+ idx = ListBox_AddString(hwndControl, pszText);
+ if (idx != LB_ERR)
+ ListBox_SetItemData(hwndControl, idx, (LPARAM)&pParamArray->Array[i]);
}
if (pParamArray->dwCount > 0)
{
ListBox_SetCurSel(hwndControl, 0);
}
if (pParamArray->dwCount > 0)
{
ListBox_SetCurSel(hwndControl, 0);
- pParamArray->pCurrentParam =
&pParamArray->Array[0]
;
+ pParamArray->pCurrentParam =
(PPARAMETER)ListBox_GetItemData(hwndControl, 0)
;
DisplayParameter(hwnd, pParamArray->pCurrentParam);
}
}
DisplayParameter(hwnd, pParamArray->pCurrentParam);
}
}
@@
-855,7
+858,7
@@
OnCommand(
iIndex = ListBox_GetCurSel((HWND)lParam);
if (iIndex != LB_ERR && iIndex < pParamArray->dwCount)
{
iIndex = ListBox_GetCurSel((HWND)lParam);
if (iIndex != LB_ERR && iIndex < pParamArray->dwCount)
{
- pParamArray->pCurrentParam =
&pParamArray->Array[iIndex]
;
+ pParamArray->pCurrentParam =
(PPARAMETER)ListBox_GetItemData((HWND)lParam, iIndex)
;
DisplayParameter(hwnd, pParamArray->pCurrentParam);
}
}
DisplayParameter(hwnd, pParamArray->pCurrentParam);
}
}