From: Steven Don <gitlab@shdon.com> In AtlAxWin_wndproc, the handler for WM_CREATE duplicates the existing hWnd's window text and passes that on as the window name for AtlAxCreateControlEx. At the time of WM_CREATE, the window text is always empty. It should instead be taken from the lpszName member of the CREATESTRUCTW struct pointed to by lParam. --- dlls/atl/atl_ax.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/dlls/atl/atl_ax.c b/dlls/atl/atl_ax.c index 4ff0a796d3b..33936a0d982 100644 --- a/dlls/atl/atl_ax.c +++ b/dlls/atl/atl_ax.c @@ -62,13 +62,10 @@ static LRESULT CALLBACK AtlAxWin_wndproc( HWND hWnd, UINT wMsg, WPARAM wParam, L { if ( wMsg == WM_CREATE ) { - DWORD len = GetWindowTextLengthW( hWnd ) + 1; - WCHAR *ptr = malloc( len*sizeof(WCHAR) ); - if (!ptr) + LPCREATESTRUCTW pcs = (LPCREATESTRUCTW)lParam; + if (!pcs) return 1; - GetWindowTextW( hWnd, ptr, len ); - AtlAxCreateControlEx( ptr, hWnd, NULL, NULL, NULL, NULL, NULL ); - free( ptr ); + AtlAxCreateControlEx( pcs->lpszName, hWnd, NULL, NULL, NULL, NULL, NULL ); return 0; } return DefWindowProcW( hWnd, wMsg, wParam, lParam ); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10860