Module: wine Branch: master Commit: dfc0fa86d4165159e8189311bc69623020559cda URL: http://source.winehq.org/git/wine.git/?a=commit;h=dfc0fa86d4165159e8189311bc...
Author: Andrew Nguyen anguyen@codeweavers.com Date: Sat Apr 16 03:07:08 2011 -0500
regedit: Convert the child window code to Unicode.
---
programs/regedit/childwnd.c | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/programs/regedit/childwnd.c b/programs/regedit/childwnd.c index 86fa62b..1ff7a90 100644 --- a/programs/regedit/childwnd.c +++ b/programs/regedit/childwnd.c @@ -131,7 +131,7 @@ static LPWSTR GetPathRoot(HWND hwndTV, HTREEITEM hItem, BOOL bFull) { WCHAR text[260]; HKEY hRootKey = NULL; if (!hItem) - hItem = TreeView_GetSelection(hwndTV); + hItem = (HTREEITEM)SendMessageW(hwndTV, TVM_GETNEXTITEM, TVGN_CARET, 0); HeapFree(GetProcessHeap(), 0, GetItemPath(hwndTV, hItem, &hRootKey)); if (!bFull && !hRootKey) return NULL; @@ -262,7 +262,9 @@ static void set_last_key(HWND hwndTV)
if (RegCreateKeyExW(HKEY_CURRENT_USER, wszKeyName, 0, NULL, 0, KEY_WRITE, NULL, &hkey, NULL) == ERROR_SUCCESS) { - wszVal = GetItemFullPath(g_pChildWnd->hTreeWnd, TreeView_GetSelection(g_pChildWnd->hTreeWnd), FALSE); + HTREEITEM selection = (HTREEITEM)SendMessageW(g_pChildWnd->hTreeWnd, TVM_GETNEXTITEM, TVGN_CARET, 0); + + wszVal = GetItemFullPath(g_pChildWnd->hTreeWnd, selection, FALSE); RegSetValueExW(hkey, wszLastKey, 0, REG_SZ, (LPBYTE)wszVal, (lstrlenW(wszVal) + 1) * sizeof(WCHAR)); HeapFree(GetProcessHeap(), 0, wszVal); RegCloseKey(hkey); @@ -309,7 +311,7 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa GetCursorPos(&pt); ScreenToClient(hWnd, &pt); if (pt.x>=g_pChildWnd->nSplitPos-SPLIT_WIDTH/2 && pt.x<g_pChildWnd->nSplitPos+SPLIT_WIDTH/2+1) { - SetCursor(LoadCursor(0, IDC_SIZEWE)); + SetCursor(LoadCursorW(0, (LPCWSTR)IDC_SIZEWE)); return TRUE; } } @@ -354,7 +356,7 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa ResizeWnd(rt.right, rt.bottom); last_split = -1; ReleaseCapture(); - SetCursor(LoadCursor(0, IDC_ARROW)); + SetCursor(LoadCursorW(0, (LPCWSTR)IDC_ARROW)); } break;
@@ -413,7 +415,7 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa LPWSTR fullPath = GetPathFullPath(g_pChildWnd->hTreeWnd, dispInfo->item.pszText); item.mask = TVIF_HANDLE | TVIF_TEXT; - item.hItem = TreeView_GetSelection(g_pChildWnd->hTreeWnd); + item.hItem = (HTREEITEM)SendMessageW(g_pChildWnd->hTreeWnd, TVM_GETNEXTITEM, TVGN_CARET, 0); item.pszText = dispInfo->item.pszText; SendMessageW( g_pChildWnd->hTreeWnd, TVM_SETITEMW, 0, (LPARAM)&item ); SendMessageW(hStatusBar, SB_SETTEXTW, 0, (LPARAM)fullPath);