Commit 5cb8bccf authored by Alexander Nicolaysen Sørnes's avatar Alexander Nicolaysen Sørnes Committed by Alexandre Julliard

regedit: Convert printing&help to unicode.

parent 04929756
...@@ -375,10 +375,10 @@ static BOOL ExportRegistryFile(HWND hWnd, BOOL export_branch) ...@@ -375,10 +375,10 @@ static BOOL ExportRegistryFile(HWND hWnd, BOOL export_branch)
return TRUE; return TRUE;
} }
static BOOL PrintRegistryHive(HWND hWnd, LPCTSTR path) static BOOL PrintRegistryHive(HWND hWnd, LPCWSTR path)
{ {
#if 1 #if 1
PRINTDLG pd; PRINTDLGW pd;
ZeroMemory(&pd, sizeof(PRINTDLG)); ZeroMemory(&pd, sizeof(PRINTDLG));
pd.lStructSize = sizeof(PRINTDLG); pd.lStructSize = sizeof(PRINTDLG);
...@@ -391,15 +391,15 @@ static BOOL PrintRegistryHive(HWND hWnd, LPCTSTR path) ...@@ -391,15 +391,15 @@ static BOOL PrintRegistryHive(HWND hWnd, LPCTSTR path)
pd.nToPage = 0xFFFF; pd.nToPage = 0xFFFF;
pd.nMinPage = 1; pd.nMinPage = 1;
pd.nMaxPage = 0xFFFF; pd.nMaxPage = 0xFFFF;
if (PrintDlg(&pd)) { if (PrintDlgW(&pd)) {
/* GDI calls to render output. */ /* GDI calls to render output. */
DeleteDC(pd.hDC); /* Delete DC when done.*/ DeleteDC(pd.hDC); /* Delete DC when done.*/
} }
#else #else
HRESULT hResult; HRESULT hResult;
PRINTDLGEX pd; PRINTDLGEXW pd;
hResult = PrintDlgEx(&pd); hResult = PrintDlgExW(&pd);
if (hResult == S_OK) { if (hResult == S_OK) {
switch (pd.dwResultAction) { switch (pd.dwResultAction) {
case PD_RESULT_APPLY: case PD_RESULT_APPLY:
...@@ -671,8 +671,11 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) ...@@ -671,8 +671,11 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
case ID_REGISTRY_DISCONNECTNETWORKREGISTRY: case ID_REGISTRY_DISCONNECTNETWORKREGISTRY:
break; break;
case ID_REGISTRY_PRINT: case ID_REGISTRY_PRINT:
PrintRegistryHive(hWnd, _T("")); {
const WCHAR empty = 0;
PrintRegistryHive(hWnd, empty);
break; break;
}
case ID_EDIT_DELETE: case ID_EDIT_DELETE:
if (GetFocus() == g_pChildWnd->hTreeWnd) { if (GetFocus() == g_pChildWnd->hTreeWnd) {
WCHAR* keyPathW = GetWideString(keyPath); WCHAR* keyPathW = GetWideString(keyPath);
...@@ -842,8 +845,11 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) ...@@ -842,8 +845,11 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
toggle_child(hWnd, LOWORD(wParam), hStatusBar); toggle_child(hWnd, LOWORD(wParam), hStatusBar);
break; break;
case ID_HELP_HELPTOPICS: case ID_HELP_HELPTOPICS:
WinHelp(hWnd, _T("regedit"), HELP_FINDER, 0); {
const WCHAR help_regedit[] = {'r','e','g','e','d','i','t',0};
WinHelpW(hWnd, help_regedit, HELP_FINDER, 0);
break; break;
}
case ID_HELP_ABOUT: case ID_HELP_ABOUT:
ShowAboutBox(hWnd); ShowAboutBox(hWnd);
break; break;
...@@ -914,8 +920,11 @@ LRESULT CALLBACK FrameWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa ...@@ -914,8 +920,11 @@ LRESULT CALLBACK FrameWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa
OnMenuSelect(hWnd, LOWORD(wParam), HIWORD(wParam), (HMENU)lParam); OnMenuSelect(hWnd, LOWORD(wParam), HIWORD(wParam), (HMENU)lParam);
break; break;
case WM_DESTROY: case WM_DESTROY:
WinHelp(hWnd, _T("regedit"), HELP_QUIT, 0); {
const WCHAR help_regedit[] = {'r','e','g','e','d','i','t',0};
WinHelpW(hWnd, help_regedit, HELP_QUIT, 0);
PostQuitMessage(0); PostQuitMessage(0);
}
default: default:
return DefWindowProc(hWnd, message, wParam, lParam); return DefWindowProc(hWnd, message, wParam, lParam);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment