Use a flag to test if create structure is unicode.

This commit is contained in:
Gerard Patel 2001-06-06 21:26:50 +00:00 committed by Alexandre Julliard
parent 37e5e7f46c
commit ad363030a1
6 changed files with 11 additions and 10 deletions

View File

@ -27,7 +27,7 @@ debug_channels (ttydrv)
@ cdecl GetScreenSaveTimeout() TTYDRV_GetScreenSaveTimeout
@ cdecl SetScreenSaveTimeout(long) TTYDRV_SetScreenSaveTimeout
@ 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 GetDC(long long long long) TTYDRV_GetDC
@ cdecl SetWindowPos(ptr) TTYDRV_SetWindowPos

View File

@ -30,7 +30,7 @@ WND_DRIVER TTYDRV_WND_Driver =
/**********************************************************************
* CreateWindow (TTYDRV.@)
*/
BOOL TTYDRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs )
BOOL TTYDRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs, BOOL unicode )
{
BOOL ret;
@ -65,7 +65,7 @@ BOOL TTYDRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs )
FIXME("(%x): stub\n", hwnd);
#endif /* defined(WINE_CURSES) */
if (IsWindowUnicode( hwnd ))
if (unicode)
{
ret = SendMessageW( hwnd, WM_NCCREATE, 0, (LPARAM)cs );
if (ret) ret = (SendMessageW( hwnd, WM_CREATE, 0, (LPARAM)cs ) != -1);

View File

@ -769,7 +769,7 @@ BOOL X11DRV_DestroyWindow( HWND hwnd )
/**********************************************************************
* CreateWindow (X11DRV.@)
*/
BOOL X11DRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs )
BOOL X11DRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs, BOOL unicode )
{
Display *display = thread_display();
WND *wndPtr;
@ -788,7 +788,7 @@ BOOL X11DRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs )
wndPtr->flags |= WIN_NATIVE;
WIN_ReleaseWndPtr( wndPtr );
if (IsWindowUnicode( hwnd ))
if (unicode)
ret = SendMessageW( hwnd, WM_NCCREATE, 0, (LPARAM)cs );
else
ret = SendMessageA( hwnd, WM_NCCREATE, 0, (LPARAM)cs );
@ -830,7 +830,7 @@ BOOL X11DRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs )
X11DRV_register_window( display, hwnd, data );
WIN_ReleaseWndPtr( wndPtr );
if (IsWindowUnicode( hwnd ))
if (unicode)
ret = (SendMessageW( hwnd, WM_CREATE, 0, (LPARAM)cs ) != -1);
else
ret = (SendMessageA( hwnd, WM_CREATE, 0, (LPARAM)cs ) != -1);

View File

@ -27,7 +27,7 @@ debug_channels (bitblt bitmap clipboard cursor dinput event font gdi graphics
@ cdecl GetScreenSaveTimeout() X11DRV_GetScreenSaveTimeout
@ cdecl SetScreenSaveTimeout(long) X11DRV_SetScreenSaveTimeout
@ 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 GetDC(long long long long) X11DRV_GetDC
@ cdecl EnableWindow(long long) X11DRV_EnableWindow

View File

@ -69,7 +69,7 @@ typedef struct tagUSER_DRIVER {
void (*pResetSelectionOwner)(struct tagWND *, BOOL);
/* windowing functions */
BOOL (*pCreateWindow)(HWND,CREATESTRUCTA*);
BOOL (*pCreateWindow)(HWND,CREATESTRUCTA*,BOOL);
BOOL (*pDestroyWindow)(HWND);
BOOL (*pGetDC)(HWND,HDC,HRGN,DWORD);
BOOL (*pEnableWindow)(HWND,BOOL);

View File

@ -615,7 +615,7 @@ BOOL WIN_CreateDesktopWindow(void)
cs.lpszName = NULL;
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;
return TRUE;
@ -704,6 +704,7 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
DWORD clsStyle;
WNDPROC winproc;
DCE *dce;
BOOL unicode = (type == WIN_PROC_32W);
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),
@ -894,7 +895,7 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
}
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");
WIN_ReleaseWndPtr(WIN_DestroyWindow( wndPtr ));