From 8aa5b99627d3b27348ffaaceaa87dad7dba39a14 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Thu, 13 Oct 2022 16:45:26 +0200 Subject: [PATCH] user.exe: Pass resource ID as a string in DIALOG_CreateControls16. Based on commit 0739aa610cc07. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53646 --- dlls/user.exe16/dialog.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/dlls/user.exe16/dialog.c b/dlls/user.exe16/dialog.c index ecd7acb9bfc..315f70dd6f3 100644 --- a/dlls/user.exe16/dialog.c +++ b/dlls/user.exe16/dialog.c @@ -181,13 +181,25 @@ static BOOL DIALOG_CreateControls16( HWND hwnd, LPCSTR template, TRACE(" BEGIN\n" ); while (items--) { + char *caption, caption_buf[4]; HINSTANCE16 instance = hInst; SEGPTR segptr; template = DIALOG_GetControl16( template, &info ); segptr = MapLS( info.data ); + + caption = (char *)info.windowName; + if (caption && IS_INTRESOURCE(caption)) + { + caption_buf[0] = 0xff; + caption_buf[1] = PtrToUlong( caption ); + caption_buf[2] = PtrToUlong( caption ) >> 8; + caption_buf[3] = 0; + caption = caption_buf; + } + hwndCtrl = WIN_Handle32( CreateWindowEx16( WS_EX_NOPARENTNOTIFY, - info.className, info.windowName, + info.className, caption, info.style | WS_CHILD, MulDiv(info.x, dlgInfo->xBaseUnit, 4), MulDiv(info.y, dlgInfo->yBaseUnit, 8),