mirror of
https://github.com/reactos/reactos.git
synced 2024-12-31 19:42:51 +00:00
[SHLWAPI] Import wine commit 2c163225730e88 as addendum to the SHCreateWorkerWindowW/A fixes from commit 770bf93
.
This commit is contained in:
parent
37b9ca3fe3
commit
eb3987e172
1 changed files with 2 additions and 35 deletions
|
@ -2555,19 +2555,14 @@ HRESULT WINAPI IUnknown_GetSite(LPUNKNOWN lpUnknown, REFIID iid, PVOID *lppSite)
|
||||||
* Success: The window handle of the newly created window.
|
* Success: The window handle of the newly created window.
|
||||||
* Failure: 0.
|
* Failure: 0.
|
||||||
*/
|
*/
|
||||||
#ifndef __REACTOS__
|
|
||||||
HWND WINAPI SHCreateWorkerWindowA(LONG wndProc, HWND hWndParent, DWORD dwExStyle,
|
|
||||||
DWORD dwStyle, HMENU hMenu, LONG_PTR wnd_extra)
|
|
||||||
#else
|
|
||||||
HWND WINAPI SHCreateWorkerWindowA(WNDPROC wndProc, HWND hWndParent, DWORD dwExStyle,
|
HWND WINAPI SHCreateWorkerWindowA(WNDPROC wndProc, HWND hWndParent, DWORD dwExStyle,
|
||||||
DWORD dwStyle, HMENU hMenu, LONG_PTR wnd_extra)
|
DWORD dwStyle, HMENU hMenu, LONG_PTR wnd_extra)
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
static const char szClass[] = "WorkerA";
|
static const char szClass[] = "WorkerA";
|
||||||
WNDCLASSA wc;
|
WNDCLASSA wc;
|
||||||
HWND hWnd;
|
HWND hWnd;
|
||||||
|
|
||||||
TRACE("(0x%08x, %p, 0x%08x, 0x%08x, %p, 0x%08lx)\n",
|
TRACE("(%p, %p, 0x%08x, 0x%08x, %p, 0x%08lx)\n",
|
||||||
wndProc, hWndParent, dwExStyle, dwStyle, hMenu, wnd_extra);
|
wndProc, hWndParent, dwExStyle, dwStyle, hMenu, wnd_extra);
|
||||||
|
|
||||||
/* Create Window class */
|
/* Create Window class */
|
||||||
|
@ -2589,12 +2584,7 @@ HWND WINAPI SHCreateWorkerWindowA(WNDPROC wndProc, HWND hWndParent, DWORD dwExSt
|
||||||
if (hWnd)
|
if (hWnd)
|
||||||
{
|
{
|
||||||
SetWindowLongPtrW(hWnd, 0, wnd_extra);
|
SetWindowLongPtrW(hWnd, 0, wnd_extra);
|
||||||
#ifndef __REACTOS__
|
|
||||||
|
|
||||||
if (wndProc) SetWindowLongPtrA(hWnd, GWLP_WNDPROC, wndProc);
|
|
||||||
#else
|
|
||||||
if (wndProc) SetWindowLongPtrA(hWnd, GWLP_WNDPROC, (LONG_PTR)wndProc);
|
if (wndProc) SetWindowLongPtrA(hWnd, GWLP_WNDPROC, (LONG_PTR)wndProc);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return hWnd;
|
return hWnd;
|
||||||
|
@ -2853,45 +2843,28 @@ DWORD WINAPI WhichPlatform(void)
|
||||||
*
|
*
|
||||||
* Unicode version of SHCreateWorkerWindowA.
|
* Unicode version of SHCreateWorkerWindowA.
|
||||||
*/
|
*/
|
||||||
#ifndef __REACTOS__
|
|
||||||
HWND WINAPI SHCreateWorkerWindowW(LONG wndProc, HWND hWndParent, DWORD dwExStyle,
|
|
||||||
DWORD dwStyle, HMENU hMenu, LONG msg_result)
|
|
||||||
#else
|
|
||||||
HWND WINAPI SHCreateWorkerWindowW(WNDPROC wndProc, HWND hWndParent, DWORD dwExStyle,
|
HWND WINAPI SHCreateWorkerWindowW(WNDPROC wndProc, HWND hWndParent, DWORD dwExStyle,
|
||||||
DWORD dwStyle, HMENU hMenu, LONG_PTR wnd_extra)
|
DWORD dwStyle, HMENU hMenu, LONG_PTR wnd_extra)
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
static const WCHAR szClass[] = { 'W', 'o', 'r', 'k', 'e', 'r', 'W', 0 };
|
static const WCHAR szClass[] = { 'W', 'o', 'r', 'k', 'e', 'r', 'W', 0 };
|
||||||
WNDCLASSW wc;
|
WNDCLASSW wc;
|
||||||
HWND hWnd;
|
HWND hWnd;
|
||||||
|
|
||||||
TRACE("(0x%08x, %p, 0x%08x, 0x%08x, %p, 0x%08x)\n",
|
TRACE("(%p, %p, 0x%08x, 0x%08x, %p, 0x%08lx)\n",
|
||||||
#ifndef __REACTOS__
|
|
||||||
wndProc, hWndParent, dwExStyle, dwStyle, hMenu, msg_result);
|
|
||||||
#else
|
|
||||||
wndProc, hWndParent, dwExStyle, dwStyle, hMenu, wnd_extra);
|
wndProc, hWndParent, dwExStyle, dwStyle, hMenu, wnd_extra);
|
||||||
#endif
|
|
||||||
|
|
||||||
/* If our OS is natively ANSI, use the ANSI version */
|
/* If our OS is natively ANSI, use the ANSI version */
|
||||||
if (GetVersion() & 0x80000000) /* not NT */
|
if (GetVersion() & 0x80000000) /* not NT */
|
||||||
{
|
{
|
||||||
TRACE("fallback to ANSI, ver 0x%08x\n", GetVersion());
|
TRACE("fallback to ANSI, ver 0x%08x\n", GetVersion());
|
||||||
#ifndef __REACTOS__
|
|
||||||
return SHCreateWorkerWindowA(wndProc, hWndParent, dwExStyle, dwStyle, hMenu, msg_result);
|
|
||||||
#else
|
|
||||||
return SHCreateWorkerWindowA(wndProc, hWndParent, dwExStyle, dwStyle, hMenu, wnd_extra);
|
return SHCreateWorkerWindowA(wndProc, hWndParent, dwExStyle, dwStyle, hMenu, wnd_extra);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create Window class */
|
/* Create Window class */
|
||||||
wc.style = 0;
|
wc.style = 0;
|
||||||
wc.lpfnWndProc = DefWindowProcW;
|
wc.lpfnWndProc = DefWindowProcW;
|
||||||
wc.cbClsExtra = 0;
|
wc.cbClsExtra = 0;
|
||||||
#ifndef __REACTOS__
|
|
||||||
wc.cbWndExtra = 4;
|
|
||||||
#else
|
|
||||||
wc.cbWndExtra = sizeof(LONG_PTR);
|
wc.cbWndExtra = sizeof(LONG_PTR);
|
||||||
#endif
|
|
||||||
wc.hInstance = shlwapi_hInstance;
|
wc.hInstance = shlwapi_hInstance;
|
||||||
wc.hIcon = NULL;
|
wc.hIcon = NULL;
|
||||||
wc.hCursor = LoadCursorW(NULL, (LPWSTR)IDC_ARROW);
|
wc.hCursor = LoadCursorW(NULL, (LPWSTR)IDC_ARROW);
|
||||||
|
@ -2905,14 +2878,8 @@ HWND WINAPI SHCreateWorkerWindowW(WNDPROC wndProc, HWND hWndParent, DWORD dwExSt
|
||||||
hWndParent, hMenu, shlwapi_hInstance, 0);
|
hWndParent, hMenu, shlwapi_hInstance, 0);
|
||||||
if (hWnd)
|
if (hWnd)
|
||||||
{
|
{
|
||||||
#ifndef __REACTOS__
|
|
||||||
SetWindowLongPtrW(hWnd, DWLP_MSGRESULT, msg_result);
|
|
||||||
|
|
||||||
if (wndProc) SetWindowLongPtrW(hWnd, GWLP_WNDPROC, wndProc);
|
|
||||||
#else
|
|
||||||
SetWindowLongPtrW(hWnd, 0, wnd_extra);
|
SetWindowLongPtrW(hWnd, 0, wnd_extra);
|
||||||
if (wndProc) SetWindowLongPtrW(hWnd, GWLP_WNDPROC, (LONG_PTR)wndProc);
|
if (wndProc) SetWindowLongPtrW(hWnd, GWLP_WNDPROC, (LONG_PTR)wndProc);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return hWnd;
|
return hWnd;
|
||||||
|
|
Loading…
Reference in a new issue