mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 12:54:13 +00:00
regedit: Some minor unicode conversions.
This commit is contained in:
parent
7bb5df75d3
commit
d67986b9dd
4 changed files with 18 additions and 16 deletions
|
@ -379,7 +379,7 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa
|
|||
if (((int)wParam == LIST_WINDOW) && (g_pChildWnd != NULL)) {
|
||||
if (((LPNMHDR)lParam)->code == NM_SETFOCUS) {
|
||||
g_pChildWnd->nFocusPanel = 1;
|
||||
} else if (!SendMessage(g_pChildWnd->hListWnd, WM_NOTIFY_REFLECT, wParam, lParam)) {
|
||||
} else if (!SendMessageW(g_pChildWnd->hListWnd, WM_NOTIFY_REFLECT, wParam, lParam)) {
|
||||
goto def;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -87,17 +87,19 @@ void error(HWND hwnd, INT resId, ...)
|
|||
|
||||
static void error_code_messagebox(HWND hwnd, DWORD error_code)
|
||||
{
|
||||
LPTSTR lpMsgBuf;
|
||||
LPWSTR lpMsgBuf;
|
||||
DWORD status;
|
||||
TCHAR title[256];
|
||||
static TCHAR fallback[] = TEXT("Error displaying error message.\n");
|
||||
if (!LoadString(hInst, IDS_ERROR, title, COUNT_OF(title)))
|
||||
lstrcpy(title, TEXT("Error"));
|
||||
status = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
|
||||
NULL, error_code, 0, (LPTSTR)&lpMsgBuf, 0, NULL);
|
||||
WCHAR title[256];
|
||||
static WCHAR fallback[] = {'E','r','r','o','r',' ','d','i','s','p','l','a','y','i','n','g',' ','e','r','r','o','r',' ','m','e','s','s','a','g','e','.','\n',0};
|
||||
static const WCHAR title_error[] = {'E','r','r','o','r',0};
|
||||
|
||||
if (!LoadStringW(hInst, IDS_ERROR, title, COUNT_OF(title)))
|
||||
lstrcpyW(title, title_error);
|
||||
status = FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
|
||||
NULL, error_code, 0, (LPWSTR)&lpMsgBuf, 0, NULL);
|
||||
if (!status)
|
||||
lpMsgBuf = fallback;
|
||||
MessageBox(hwnd, lpMsgBuf, title, MB_OK | MB_ICONERROR);
|
||||
MessageBoxW(hwnd, lpMsgBuf, title, MB_OK | MB_ICONERROR);
|
||||
if (lpMsgBuf != fallback)
|
||||
LocalFree(lpMsgBuf);
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ static void resize_frame_rect(HWND hWnd, PRECT prect)
|
|||
RECT rt;
|
||||
/*
|
||||
if (IsWindowVisible(hToolBar)) {
|
||||
SendMessage(hToolBar, WM_SIZE, 0, 0);
|
||||
SendMessageW(hToolBar, WM_SIZE, 0, 0);
|
||||
GetClientRect(hToolBar, &rt);
|
||||
prect->top = rt.bottom+3;
|
||||
prect->bottom -= rt.bottom+3;
|
||||
|
@ -607,8 +607,8 @@ static INT_PTR CALLBACK removefavorite_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM w
|
|||
}
|
||||
break;
|
||||
case IDOK: {
|
||||
int pos = SendMessage(hwndList, LB_GETCURSEL, 0, 0);
|
||||
int len = SendMessage(hwndList, LB_GETTEXTLEN, pos, 0);
|
||||
int pos = SendMessageW(hwndList, LB_GETCURSEL, 0, 0);
|
||||
int len = SendMessageW(hwndList, LB_GETTEXTLEN, pos, 0);
|
||||
if (len>0) {
|
||||
LPWSTR lpName = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*(len+1));
|
||||
SendMessageW(hwndList, LB_GETTEXT, pos, (LPARAM)lpName);
|
||||
|
@ -739,7 +739,7 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||
hItem = FindNext(g_pChildWnd->hTreeWnd, hItem, searchString, searchMask, &row);
|
||||
SetCursor(hcursorOld);
|
||||
if (hItem) {
|
||||
SendMessage( g_pChildWnd->hTreeWnd, TVM_SELECTITEM, TVGN_CARET, (LPARAM) hItem );
|
||||
SendMessageW( g_pChildWnd->hTreeWnd, TVM_SELECTITEM, TVGN_CARET, (LPARAM) hItem );
|
||||
InvalidateRect(g_pChildWnd->hTreeWnd, NULL, TRUE);
|
||||
UpdateWindow(g_pChildWnd->hTreeWnd);
|
||||
if (row != -1) {
|
||||
|
@ -886,7 +886,7 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||
if(ClientToScreen(g_pChildWnd->hWnd, &pts)) {
|
||||
SetCursorPos(pts.x, pts.y);
|
||||
SetCursor(LoadCursor(0, IDC_SIZEWE));
|
||||
SendMessage(g_pChildWnd->hWnd, WM_LBUTTONDOWN, 0, MAKELPARAM(pt.x, pt.y));
|
||||
SendMessageW(g_pChildWnd->hWnd, WM_LBUTTONDOWN, 0, MAKELPARAM(pt.x, pt.y));
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -411,7 +411,7 @@ static LRESULT CALLBACK ListWndProc(HWND hWnd, UINT message, WPARAM wParam, LPAR
|
|||
case NM_RETURN: {
|
||||
int cnt = ListView_GetNextItem(hWnd, -1, LVNI_FOCUSED | LVNI_SELECTED);
|
||||
if (cnt != -1)
|
||||
SendMessage(hFrameWnd, WM_COMMAND, ID_EDIT_MODIFY, 0);
|
||||
SendMessageW(hFrameWnd, WM_COMMAND, ID_EDIT_MODIFY, 0);
|
||||
}
|
||||
break;
|
||||
case NM_DBLCLK: {
|
||||
|
@ -439,7 +439,7 @@ static LRESULT CALLBACK ListWndProc(HWND hWnd, UINT message, WPARAM wParam, LPAR
|
|||
ListView_SetItemState(hWnd, -1, 0, LVIS_FOCUSED|LVIS_SELECTED);
|
||||
ListView_SetItemState(hWnd, info.iItem, LVIS_FOCUSED|LVIS_SELECTED,
|
||||
LVIS_FOCUSED|LVIS_SELECTED);
|
||||
SendMessage(hFrameWnd, WM_COMMAND, ID_EDIT_MODIFY, 0);
|
||||
SendMessageW(hFrameWnd, WM_COMMAND, ID_EDIT_MODIFY, 0);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue