[PATCH 10/14] user32: Send the WM_CREATE message from user32's
CreateWindow
Pierre d'Herbemont
pdherbemont at free.fr
Sun Jan 21 17:36:47 CST 2007
---
dlls/user32/win.c | 19 +++++++++++++++++++
dlls/winex11.drv/window.c | 8 --------
2 files changed, 19 insertions(+), 8 deletions(-)
-------------- next part --------------
diff --git a/dlls/user32/win.c b/dlls/user32/win.c
index 551dfd8..e8961c2 100644
--- a/dlls/user32/win.c
+++ b/dlls/user32/win.c
@@ -1183,6 +1183,25 @@ static HWND WIN_CreateWindowEx( CREATEST
wndPtr->rectClient.left, wndPtr->rectClient.top,
wndPtr->rectClient.right, wndPtr->rectClient.bottom );
+ WIN_ReleasePtr( wndPtr );
+
+ if (unicode)
+ ret = (SendMessageW( hwnd, WM_CREATE, 0, (LPARAM)cs ) != -1);
+ else
+ ret = (SendMessageA( hwnd, WM_CREATE, 0, (LPARAM)cs ) != -1);
+
+ if (!ret)
+ {
+ WIN_DestroyWindow( hwnd );
+ return 0;
+ }
+
+ if (!(wndPtr = WIN_GetPtr(hwnd)))
+ {
+ WIN_DestroyWindow( hwnd );
+ return 0;
+ }
+
client_rect = wndPtr->rectClient;
window_rect = wndPtr->rectWindow;
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index fdffc80..d7f2088 100644
--- a/dlls/winex11.drv/window.c
+++ b/dlls/winex11.drv/window.c
@@ -1009,7 +1009,6 @@ BOOL X11DRV_CreateWindow( HWND hwnd, CRE
struct x11drv_win_data *data;
LPWSTR text;
DWORD style;
- BOOL ret = FALSE;
if (!(data = alloc_win_data( display, hwnd ))) return FALSE;
@@ -1038,13 +1037,6 @@ BOOL X11DRV_CreateWindow( HWND hwnd, CRE
data->client_rect.right, data->client_rect.bottom,
(unsigned int)data->whole_window );
- if (unicode)
- ret = (SendMessageW( hwnd, WM_CREATE, 0, (LPARAM)cs ) != -1);
- else
- ret = (SendMessageA( hwnd, WM_CREATE, 0, (LPARAM)cs ) != -1);
-
- if (!ret) return FALSE;
-
NotifyWinEvent(EVENT_OBJECT_CREATE, hwnd, OBJID_WINDOW, 0);
/* Send the size messages */
More information about the wine-patches
mailing list