mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 17:05:46 +00:00
fix bug introduced in r27994
svn path=/trunk/; revision=28012
This commit is contained in:
parent
e36095538d
commit
7875f9d609
1 changed files with 4 additions and 1 deletions
|
@ -513,12 +513,15 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa
|
||||||
HKEY hKey = NULL;
|
HKEY hKey = NULL;
|
||||||
LPNMTVDISPINFO ptvdi;
|
LPNMTVDISPINFO ptvdi;
|
||||||
LONG lResult;
|
LONG lResult;
|
||||||
|
TCHAR szBuffer[MAX_PATH];
|
||||||
|
|
||||||
ptvdi = (LPNMTVDISPINFO) lParam;
|
ptvdi = (LPNMTVDISPINFO) lParam;
|
||||||
if (ptvdi->item.pszText)
|
if (ptvdi->item.pszText)
|
||||||
{
|
{
|
||||||
|
keyPath = GetItemPath(pChildWnd->hTreeWnd, TreeView_GetParent(pChildWnd->hTreeWnd, ptvdi->item.hItem), &hRootKey);
|
||||||
|
_sntprintf(szBuffer, sizeof(szBuffer) / sizeof(szBuffer[0]), _T("%s\\%s"), keyPath, ptvdi->item.pszText);
|
||||||
keyPath = GetItemPath(pChildWnd->hTreeWnd, ptvdi->item.hItem, &hRootKey);
|
keyPath = GetItemPath(pChildWnd->hTreeWnd, ptvdi->item.hItem, &hRootKey);
|
||||||
if (RegOpenKeyEx(hRootKey, keyPath, 0, KEY_READ, &hKey) == ERROR_SUCCESS)
|
if (RegOpenKeyEx(hRootKey, szBuffer, 0, KEY_READ, &hKey) == ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
lResult = REG_OPENED_EXISTING_KEY;
|
lResult = REG_OPENED_EXISTING_KEY;
|
||||||
RegCloseKey(hKey);
|
RegCloseKey(hKey);
|
||||||
|
|
Loading…
Reference in a new issue