Commit ad363030 authored by Gerard Patel's avatar Gerard Patel Committed by Alexandre Julliard

Use a flag to test if create structure is unicode.

parent 37e5e7f4
...@@ -27,7 +27,7 @@ debug_channels (ttydrv) ...@@ -27,7 +27,7 @@ debug_channels (ttydrv)
@ cdecl GetScreenSaveTimeout() TTYDRV_GetScreenSaveTimeout @ cdecl GetScreenSaveTimeout() TTYDRV_GetScreenSaveTimeout
@ cdecl SetScreenSaveTimeout(long) TTYDRV_SetScreenSaveTimeout @ cdecl SetScreenSaveTimeout(long) TTYDRV_SetScreenSaveTimeout
@ cdecl LoadOEMResource(long long) TTYDRV_LoadOEMResource @ cdecl LoadOEMResource(long long) TTYDRV_LoadOEMResource
@ cdecl CreateWindow(long ptr) TTYDRV_CreateWindow @ cdecl CreateWindow(long ptr long) TTYDRV_CreateWindow
@ cdecl DestroyWindow(long) TTYDRV_DestroyWindow @ cdecl DestroyWindow(long) TTYDRV_DestroyWindow
@ cdecl GetDC(long long long long) TTYDRV_GetDC @ cdecl GetDC(long long long long) TTYDRV_GetDC
@ cdecl SetWindowPos(ptr) TTYDRV_SetWindowPos @ cdecl SetWindowPos(ptr) TTYDRV_SetWindowPos
......
...@@ -30,7 +30,7 @@ WND_DRIVER TTYDRV_WND_Driver = ...@@ -30,7 +30,7 @@ WND_DRIVER TTYDRV_WND_Driver =
/********************************************************************** /**********************************************************************
* CreateWindow (TTYDRV.@) * CreateWindow (TTYDRV.@)
*/ */
BOOL TTYDRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs ) BOOL TTYDRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs, BOOL unicode )
{ {
BOOL ret; BOOL ret;
...@@ -65,7 +65,7 @@ BOOL TTYDRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs ) ...@@ -65,7 +65,7 @@ BOOL TTYDRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs )
FIXME("(%x): stub\n", hwnd); FIXME("(%x): stub\n", hwnd);
#endif /* defined(WINE_CURSES) */ #endif /* defined(WINE_CURSES) */
if (IsWindowUnicode( hwnd )) if (unicode)
{ {
ret = SendMessageW( hwnd, WM_NCCREATE, 0, (LPARAM)cs ); ret = SendMessageW( hwnd, WM_NCCREATE, 0, (LPARAM)cs );
if (ret) ret = (SendMessageW( hwnd, WM_CREATE, 0, (LPARAM)cs ) != -1); if (ret) ret = (SendMessageW( hwnd, WM_CREATE, 0, (LPARAM)cs ) != -1);
......
...@@ -769,7 +769,7 @@ BOOL X11DRV_DestroyWindow( HWND hwnd ) ...@@ -769,7 +769,7 @@ BOOL X11DRV_DestroyWindow( HWND hwnd )
/********************************************************************** /**********************************************************************
* CreateWindow (X11DRV.@) * CreateWindow (X11DRV.@)
*/ */
BOOL X11DRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs ) BOOL X11DRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs, BOOL unicode )
{ {
Display *display = thread_display(); Display *display = thread_display();
WND *wndPtr; WND *wndPtr;
...@@ -788,7 +788,7 @@ BOOL X11DRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs ) ...@@ -788,7 +788,7 @@ BOOL X11DRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs )
wndPtr->flags |= WIN_NATIVE; wndPtr->flags |= WIN_NATIVE;
WIN_ReleaseWndPtr( wndPtr ); WIN_ReleaseWndPtr( wndPtr );
if (IsWindowUnicode( hwnd )) if (unicode)
ret = SendMessageW( hwnd, WM_NCCREATE, 0, (LPARAM)cs ); ret = SendMessageW( hwnd, WM_NCCREATE, 0, (LPARAM)cs );
else else
ret = SendMessageA( hwnd, WM_NCCREATE, 0, (LPARAM)cs ); ret = SendMessageA( hwnd, WM_NCCREATE, 0, (LPARAM)cs );
...@@ -830,7 +830,7 @@ BOOL X11DRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs ) ...@@ -830,7 +830,7 @@ BOOL X11DRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs )
X11DRV_register_window( display, hwnd, data ); X11DRV_register_window( display, hwnd, data );
WIN_ReleaseWndPtr( wndPtr ); WIN_ReleaseWndPtr( wndPtr );
if (IsWindowUnicode( hwnd )) if (unicode)
ret = (SendMessageW( hwnd, WM_CREATE, 0, (LPARAM)cs ) != -1); ret = (SendMessageW( hwnd, WM_CREATE, 0, (LPARAM)cs ) != -1);
else else
ret = (SendMessageA( hwnd, WM_CREATE, 0, (LPARAM)cs ) != -1); ret = (SendMessageA( hwnd, WM_CREATE, 0, (LPARAM)cs ) != -1);
......
...@@ -27,7 +27,7 @@ debug_channels (bitblt bitmap clipboard cursor dinput event font gdi graphics ...@@ -27,7 +27,7 @@ debug_channels (bitblt bitmap clipboard cursor dinput event font gdi graphics
@ cdecl GetScreenSaveTimeout() X11DRV_GetScreenSaveTimeout @ cdecl GetScreenSaveTimeout() X11DRV_GetScreenSaveTimeout
@ cdecl SetScreenSaveTimeout(long) X11DRV_SetScreenSaveTimeout @ cdecl SetScreenSaveTimeout(long) X11DRV_SetScreenSaveTimeout
@ cdecl LoadOEMResource(long long) X11DRV_LoadOEMResource @ cdecl LoadOEMResource(long long) X11DRV_LoadOEMResource
@ cdecl CreateWindow(long ptr) X11DRV_CreateWindow @ cdecl CreateWindow(long ptr long) X11DRV_CreateWindow
@ cdecl DestroyWindow(long) X11DRV_DestroyWindow @ cdecl DestroyWindow(long) X11DRV_DestroyWindow
@ cdecl GetDC(long long long long) X11DRV_GetDC @ cdecl GetDC(long long long long) X11DRV_GetDC
@ cdecl EnableWindow(long long) X11DRV_EnableWindow @ cdecl EnableWindow(long long) X11DRV_EnableWindow
......
...@@ -69,7 +69,7 @@ typedef struct tagUSER_DRIVER { ...@@ -69,7 +69,7 @@ typedef struct tagUSER_DRIVER {
void (*pResetSelectionOwner)(struct tagWND *, BOOL); void (*pResetSelectionOwner)(struct tagWND *, BOOL);
/* windowing functions */ /* windowing functions */
BOOL (*pCreateWindow)(HWND,CREATESTRUCTA*); BOOL (*pCreateWindow)(HWND,CREATESTRUCTA*,BOOL);
BOOL (*pDestroyWindow)(HWND); BOOL (*pDestroyWindow)(HWND);
BOOL (*pGetDC)(HWND,HDC,HRGN,DWORD); BOOL (*pGetDC)(HWND,HDC,HRGN,DWORD);
BOOL (*pEnableWindow)(HWND,BOOL); BOOL (*pEnableWindow)(HWND,BOOL);
......
...@@ -615,7 +615,7 @@ BOOL WIN_CreateDesktopWindow(void) ...@@ -615,7 +615,7 @@ BOOL WIN_CreateDesktopWindow(void)
cs.lpszName = NULL; cs.lpszName = NULL;
cs.lpszClass = DESKTOP_CLASS_ATOM; cs.lpszClass = DESKTOP_CLASS_ATOM;
if (!USER_Driver.pCreateWindow( hwndDesktop, &cs )) return FALSE; if (!USER_Driver.pCreateWindow( hwndDesktop, &cs, FALSE )) return FALSE;
pWndDesktop->flags |= WIN_NEEDS_ERASEBKGND; pWndDesktop->flags |= WIN_NEEDS_ERASEBKGND;
return TRUE; return TRUE;
...@@ -704,6 +704,7 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom, ...@@ -704,6 +704,7 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
DWORD clsStyle; DWORD clsStyle;
WNDPROC winproc; WNDPROC winproc;
DCE *dce; DCE *dce;
BOOL unicode = (type == WIN_PROC_32W);
TRACE("%s %s %08lx %08lx %d,%d %dx%d %04x %04x %08x %p\n", TRACE("%s %s %08lx %08lx %d,%d %dx%d %04x %04x %08x %p\n",
(type == WIN_PROC_32W) ? debugres_w((LPWSTR)cs->lpszName) : debugres_a(cs->lpszName), (type == WIN_PROC_32W) ? debugres_w((LPWSTR)cs->lpszName) : debugres_a(cs->lpszName),
...@@ -894,7 +895,7 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom, ...@@ -894,7 +895,7 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
} }
else wndPtr->wIDmenu = (UINT)cs->hMenu; else wndPtr->wIDmenu = (UINT)cs->hMenu;
if (!USER_Driver.pCreateWindow( wndPtr->hwndSelf, cs )) if (!USER_Driver.pCreateWindow( wndPtr->hwndSelf, cs, unicode))
{ {
WARN("aborted by WM_xxCREATE!\n"); WARN("aborted by WM_xxCREATE!\n");
WIN_ReleaseWndPtr(WIN_DestroyWindow( wndPtr )); WIN_ReleaseWndPtr(WIN_DestroyWindow( wndPtr ));
......
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