mirror of
https://github.com/reactos/reactos.git
synced 2025-04-29 18:48:53 +00:00
- Convert some stuff to unicode
svn path=/trunk/; revision=40865
This commit is contained in:
parent
f99fbc6c02
commit
80b7580343
4 changed files with 38 additions and 47 deletions
|
@ -380,9 +380,9 @@ void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID
|
||||||
ptr->wSignalledEvent |= wEventId;
|
ptr->wSignalledEvent |= wEventId;
|
||||||
|
|
||||||
if (ptr->dwFlags & SHCNRF_NewDelivery)
|
if (ptr->dwFlags & SHCNRF_NewDelivery)
|
||||||
SendMessageA(ptr->hwnd, ptr->uMsg, (WPARAM) ptr, (LPARAM) GetCurrentProcessId());
|
SendMessageW(ptr->hwnd, ptr->uMsg, (WPARAM) ptr, (LPARAM) GetCurrentProcessId());
|
||||||
else
|
else
|
||||||
SendMessageA(ptr->hwnd, ptr->uMsg, (WPARAM)Pidls, wEventId);
|
SendMessageW(ptr->hwnd, ptr->uMsg, (WPARAM)Pidls, wEventId);
|
||||||
|
|
||||||
TRACE("notifying %s, event %s(%x) after\n", NodeName( ptr ), DumpEvent(
|
TRACE("notifying %s, event %s(%x) after\n", NodeName( ptr ), DumpEvent(
|
||||||
wEventId ),wEventId );
|
wEventId ),wEventId );
|
||||||
|
|
|
@ -197,15 +197,15 @@ BOOL HCR_GetExecuteCommandW( HKEY hkeyClass, LPCWSTR szClass, LPCWSTR szVerb, LP
|
||||||
*/
|
*/
|
||||||
static BOOL HCR_RegOpenClassIDKey(REFIID riid, HKEY *hkey)
|
static BOOL HCR_RegOpenClassIDKey(REFIID riid, HKEY *hkey)
|
||||||
{
|
{
|
||||||
char xriid[50];
|
WCHAR xriid[50];
|
||||||
sprintf( xriid, "CLSID\\{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
|
swprintf( xriid, L"CLSID\\{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
|
||||||
riid->Data1, riid->Data2, riid->Data3,
|
riid->Data1, riid->Data2, riid->Data3,
|
||||||
riid->Data4[0], riid->Data4[1], riid->Data4[2], riid->Data4[3],
|
riid->Data4[0], riid->Data4[1], riid->Data4[2], riid->Data4[3],
|
||||||
riid->Data4[4], riid->Data4[5], riid->Data4[6], riid->Data4[7] );
|
riid->Data4[4], riid->Data4[5], riid->Data4[6], riid->Data4[7] );
|
||||||
|
|
||||||
TRACE("%s\n",xriid );
|
TRACE("%S\n",xriid );
|
||||||
|
|
||||||
return !RegOpenKeyExA(HKEY_CLASSES_ROOT, xriid, 0, KEY_READ, hkey);
|
return !RegOpenKeyExW(HKEY_CLASSES_ROOT, xriid, 0, KEY_READ, hkey);
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL HCR_RegGetDefaultIconW(HKEY hkey, LPWSTR szDest, DWORD len, int* picon_idx)
|
static BOOL HCR_RegGetDefaultIconW(HKEY hkey, LPWSTR szDest, DWORD len, int* picon_idx)
|
||||||
|
|
|
@ -72,7 +72,7 @@ CPlApplet* Control_LoadApplet(HWND hWnd, LPCWSTR cmd, CPanel* panel)
|
||||||
|
|
||||||
for (i = 0; i < applet->count; i++) {
|
for (i = 0; i < applet->count; i++) {
|
||||||
ZeroMemory(&newinfo, sizeof(newinfo));
|
ZeroMemory(&newinfo, sizeof(newinfo));
|
||||||
newinfo.dwSize = sizeof(NEWCPLINFOA);
|
newinfo.dwSize = sizeof(NEWCPLINFOW);
|
||||||
applet->info[i].dwSize = sizeof(NEWCPLINFOW);
|
applet->info[i].dwSize = sizeof(NEWCPLINFOW);
|
||||||
/* proc is supposed to return a null value upon success for
|
/* proc is supposed to return a null value upon success for
|
||||||
* CPL_INQUIRE and CPL_NEWINQUIRE
|
* CPL_INQUIRE and CPL_NEWINQUIRE
|
||||||
|
@ -105,18 +105,9 @@ CPlApplet* Control_LoadApplet(HWND hWnd, LPCWSTR cmd, CPanel* panel)
|
||||||
if (newinfo.dwSize != sizeof(NEWCPLINFOW))
|
if (newinfo.dwSize != sizeof(NEWCPLINFOW))
|
||||||
{
|
{
|
||||||
applet->info[i].dwSize = sizeof(NEWCPLINFOW);
|
applet->info[i].dwSize = sizeof(NEWCPLINFOW);
|
||||||
MultiByteToWideChar(CP_ACP, 0, ((LPNEWCPLINFOA)&newinfo)->szName,
|
lstrcpyW(applet->info[i].szName, newinfo.szName);
|
||||||
sizeof(((LPNEWCPLINFOA)&newinfo)->szName) / sizeof(CHAR),
|
lstrcpyW(applet->info[i].szInfo, newinfo.szInfo);
|
||||||
applet->info[i].szName,
|
lstrcpyW(applet->info[i].szHelpFile, newinfo.szHelpFile);
|
||||||
sizeof(applet->info[i].szName) / sizeof(WCHAR));
|
|
||||||
MultiByteToWideChar(CP_ACP, 0, ((LPNEWCPLINFOA)&newinfo)->szInfo,
|
|
||||||
sizeof(((LPNEWCPLINFOA)&newinfo)->szInfo) / sizeof(CHAR),
|
|
||||||
applet->info[i].szInfo,
|
|
||||||
sizeof(applet->info[i].szInfo) / sizeof(WCHAR));
|
|
||||||
MultiByteToWideChar(CP_ACP, 0, ((LPNEWCPLINFOA)&newinfo)->szHelpFile,
|
|
||||||
sizeof(((LPNEWCPLINFOA)&newinfo)->szHelpFile) / sizeof(CHAR),
|
|
||||||
applet->info[i].szHelpFile,
|
|
||||||
sizeof(applet->info[i].szHelpFile) / sizeof(WCHAR));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -131,11 +122,11 @@ CPlApplet* Control_LoadApplet(HWND hWnd, LPCWSTR cmd, CPanel* panel)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Control_WndProc_Create(HWND hWnd, const CREATESTRUCTA* cs)
|
static void Control_WndProc_Create(HWND hWnd, const CREATESTRUCTW* cs)
|
||||||
{
|
{
|
||||||
CPanel* panel = (CPanel*)cs->lpCreateParams;
|
CPanel* panel = (CPanel*)cs->lpCreateParams;
|
||||||
|
|
||||||
SetWindowLongPtrA(hWnd, 0, (LONG_PTR)panel);
|
SetWindowLongPtrW(hWnd, 0, (LONG_PTR)panel);
|
||||||
panel->status = 0;
|
panel->status = 0;
|
||||||
panel->hWnd = hWnd;
|
panel->hWnd = hWnd;
|
||||||
}
|
}
|
||||||
|
@ -226,12 +217,12 @@ static LRESULT Control_WndProc_LButton(CPanel* panel, LPARAM lParam, BOOL up)
|
||||||
static LRESULT WINAPI Control_WndProc(HWND hWnd, UINT wMsg,
|
static LRESULT WINAPI Control_WndProc(HWND hWnd, UINT wMsg,
|
||||||
WPARAM lParam1, LPARAM lParam2)
|
WPARAM lParam1, LPARAM lParam2)
|
||||||
{
|
{
|
||||||
CPanel* panel = (CPanel*)GetWindowLongPtrA(hWnd, 0);
|
CPanel* panel = (CPanel*)GetWindowLongPtrW(hWnd, 0);
|
||||||
|
|
||||||
if (panel || wMsg == WM_CREATE) {
|
if (panel || wMsg == WM_CREATE) {
|
||||||
switch (wMsg) {
|
switch (wMsg) {
|
||||||
case WM_CREATE:
|
case WM_CREATE:
|
||||||
Control_WndProc_Create(hWnd, (CREATESTRUCTA*)lParam2);
|
Control_WndProc_Create(hWnd, (CREATESTRUCTW*)lParam2);
|
||||||
return 0;
|
return 0;
|
||||||
case WM_DESTROY:
|
case WM_DESTROY:
|
||||||
{
|
{
|
||||||
|
@ -252,14 +243,14 @@ static LRESULT WINAPI Control_WndProc(HWND hWnd, UINT wMsg,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return DefWindowProcA(hWnd, wMsg, lParam1, lParam2);
|
return DefWindowProcW(hWnd, wMsg, lParam1, lParam2);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Control_DoInterface(CPanel* panel, HWND hWnd, HINSTANCE hInst)
|
static void Control_DoInterface(CPanel* panel, HWND hWnd, HINSTANCE hInst)
|
||||||
{
|
{
|
||||||
WNDCLASSA wc;
|
WNDCLASSW wc;
|
||||||
MSG msg;
|
MSG msg;
|
||||||
const CHAR* appName = "Wine Control Panel";
|
const WCHAR* appName = L"ReactOS Control Panel";
|
||||||
wc.style = CS_HREDRAW|CS_VREDRAW;
|
wc.style = CS_HREDRAW|CS_VREDRAW;
|
||||||
wc.lpfnWndProc = Control_WndProc;
|
wc.lpfnWndProc = Control_WndProc;
|
||||||
wc.cbClsExtra = 0;
|
wc.cbClsExtra = 0;
|
||||||
|
@ -269,11 +260,11 @@ static void Control_DoInterface(CPanel* panel, HWND hWnd, HINSTANCE hInst)
|
||||||
wc.hCursor = 0;
|
wc.hCursor = 0;
|
||||||
wc.hbrBackground = GetStockObject(WHITE_BRUSH);
|
wc.hbrBackground = GetStockObject(WHITE_BRUSH);
|
||||||
wc.lpszMenuName = NULL;
|
wc.lpszMenuName = NULL;
|
||||||
wc.lpszClassName = "Shell_Control_WndClass";
|
wc.lpszClassName = L"Shell_Control_WndClass";
|
||||||
|
|
||||||
if (!RegisterClassA(&wc)) return;
|
if (!RegisterClassW(&wc)) return;
|
||||||
|
|
||||||
CreateWindowExA(0, wc.lpszClassName, appName,
|
CreateWindowExW(0, wc.lpszClassName, appName,
|
||||||
WS_OVERLAPPEDWINDOW | WS_VISIBLE,
|
WS_OVERLAPPEDWINDOW | WS_VISIBLE,
|
||||||
CW_USEDEFAULT, CW_USEDEFAULT,
|
CW_USEDEFAULT, CW_USEDEFAULT,
|
||||||
CW_USEDEFAULT, CW_USEDEFAULT,
|
CW_USEDEFAULT, CW_USEDEFAULT,
|
||||||
|
@ -282,13 +273,13 @@ static void Control_DoInterface(CPanel* panel, HWND hWnd, HINSTANCE hInst)
|
||||||
|
|
||||||
if (!panel->first) {
|
if (!panel->first) {
|
||||||
/* FIXME appName & message should be localized */
|
/* FIXME appName & message should be localized */
|
||||||
MessageBoxA(panel->hWnd, "Cannot load any applets", appName, MB_OK);
|
MessageBoxW(panel->hWnd, L"Cannot load any applets", appName, MB_OK);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (GetMessageA(&msg, panel->hWnd, 0, 0)) {
|
while (GetMessageW(&msg, panel->hWnd, 0, 0)) {
|
||||||
TranslateMessage(&msg);
|
TranslateMessage(&msg);
|
||||||
DispatchMessageA(&msg);
|
DispatchMessageW(&msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -424,7 +415,7 @@ static void Control_DoLaunch(CPanel* panel, HWND hWnd, LPCWSTR wszCmd)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (applet->info[sp].dwSize) {
|
if (applet->info[sp].dwSize) {
|
||||||
if (!applet->proc(applet->hWnd, CPL_STARTWPARMSA, sp, (LPARAM)extraPmts))
|
if (!applet->proc(applet->hWnd, CPL_STARTWPARMSW, sp, (LPARAM)extraPmts))
|
||||||
applet->proc(applet->hWnd, CPL_DBLCLK, sp, applet->info[sp].lData);
|
applet->proc(applet->hWnd, CPL_DBLCLK, sp, applet->info[sp].lData);
|
||||||
}
|
}
|
||||||
Control_UnloadApplet(applet);
|
Control_UnloadApplet(applet);
|
||||||
|
|
|
@ -258,7 +258,7 @@ Fail:
|
||||||
static HWND
|
static HWND
|
||||||
SHDESK_FindDesktopListView (SHDESK *This)
|
SHDESK_FindDesktopListView (SHDESK *This)
|
||||||
{
|
{
|
||||||
return FindWindowEx (This->hWndShellView,
|
return FindWindowExW(This->hWndShellView,
|
||||||
NULL,
|
NULL,
|
||||||
WC_LISTVIEW,
|
WC_LISTVIEW,
|
||||||
NULL);
|
NULL);
|
||||||
|
@ -410,7 +410,7 @@ SHDESK_SendControlMsg(IShellBrowser *iface, UINT id, UINT uMsg, WPARAM wParam, L
|
||||||
id);
|
id);
|
||||||
if (hWnd != NULL)
|
if (hWnd != NULL)
|
||||||
{
|
{
|
||||||
*pret = SendMessage(hWnd,
|
*pret = SendMessageW(hWnd,
|
||||||
uMsg,
|
uMsg,
|
||||||
wParam,
|
wParam,
|
||||||
lParam);
|
lParam);
|
||||||
|
@ -552,12 +552,12 @@ SHDESK_MessageLoop(SHDESK *This)
|
||||||
MSG Msg;
|
MSG Msg;
|
||||||
BOOL bRet;
|
BOOL bRet;
|
||||||
|
|
||||||
while ((bRet = GetMessage(&Msg, NULL, 0, 0)) != 0)
|
while ((bRet = GetMessageW(&Msg, NULL, 0, 0)) != 0)
|
||||||
{
|
{
|
||||||
if (bRet != -1)
|
if (bRet != -1)
|
||||||
{
|
{
|
||||||
TranslateMessage(&Msg);
|
TranslateMessage(&Msg);
|
||||||
DispatchMessage(&Msg);
|
DispatchMessageW(&Msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -684,7 +684,7 @@ RegisterProgmanWindowClass(VOID)
|
||||||
wcProgman.cbWndExtra = sizeof(PSHDESK);
|
wcProgman.cbWndExtra = sizeof(PSHDESK);
|
||||||
wcProgman.hInstance = shell32_hInstance;
|
wcProgman.hInstance = shell32_hInstance;
|
||||||
wcProgman.hIcon = NULL;
|
wcProgman.hIcon = NULL;
|
||||||
wcProgman.hCursor = LoadCursor(NULL,
|
wcProgman.hCursor = LoadCursorW(NULL,
|
||||||
IDC_ARROW);
|
IDC_ARROW);
|
||||||
wcProgman.hbrBackground = (HBRUSH)(COLOR_BACKGROUND + 1);
|
wcProgman.hbrBackground = (HBRUSH)(COLOR_BACKGROUND + 1);
|
||||||
wcProgman.lpszMenuName = NULL;
|
wcProgman.lpszMenuName = NULL;
|
||||||
|
@ -732,7 +732,7 @@ HANDLE WINAPI SHCreateDesktop(IShellDesktop *ShellDesk)
|
||||||
rcDesk.left, rcDesk.top, rcDesk.right, rcDesk.bottom,
|
rcDesk.left, rcDesk.top, rcDesk.right, rcDesk.bottom,
|
||||||
NULL, NULL, shell32_hInstance, (LPVOID)ShellDesk);
|
NULL, NULL, shell32_hInstance, (LPVOID)ShellDesk);
|
||||||
if (hWndDesk != NULL)
|
if (hWndDesk != NULL)
|
||||||
return (HANDLE)GetWindowLongPtr(hWndDesk, 0);
|
return (HANDLE)GetWindowLongPtrW(hWndDesk, 0);
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue