Index: dll/win32/user32/windows/messagebox.c =================================================================== --- dll/win32/user32/windows/messagebox.c (revision 50865) +++ dll/win32/user32/windows/messagebox.c (working copy) @@ -421,11 +421,12 @@ *(WORD*)dest = 0; dest += sizeof(WORD); } - - /* create static for text */ + + /* TODO: make the edit control a registry option + create static/edit control for text */ dest = (BYTE*)(((UINT_PTR)dest + 3) & ~3); itxt = (DLGITEMTEMPLATE *)dest; - itxt->style = WS_CHILD | WS_VISIBLE | SS_NOPREFIX; + itxt->style = WS_CHILD | WS_VISIBLE | SS_NOPREFIX | ES_READONLY | ES_MULTILINE; //no ES_READONLY, ES_MULTILINE for static if(lpMsgBoxParams->dwStyle & MB_RIGHT) itxt->style |= SS_RIGHT; else @@ -435,14 +436,16 @@ dest += sizeof(DLGITEMTEMPLATE); *(WORD*)dest = 0xFFFF; dest += sizeof(WORD); - *(WORD*)dest = 0x0082; /* static control */ + *(WORD*)dest = 0x0081; /* static control = 0x0082, edit control = 0x0081 */ dest += sizeof(WORD); memcpy(dest, text, textlen * sizeof(WCHAR)); dest += textlen * sizeof(WCHAR); *(WCHAR*)dest = 0; dest += sizeof(WCHAR); + *(WCHAR*)dest = '\0'; /* Need to terminate it for static */ *(WORD*)dest = 0; - dest += sizeof(WORD); + dest += sizeof(WORD); + *(WORD*)dest = '\0'; /* Need to terminate it for static */ /* create buttons */ btnsize.cx = BTN_CX; @@ -579,10 +582,10 @@ btnleft = max(btnleft - MSGBOXEX_BUTTONSPACING, rc.left + txtrect.right); btnleft += MSGBOXEX_MARGIN; btntop += btnsize.cy + MSGBOXEX_MARGIN; - /* set size and position of the message static */ + /* set size and position of the message static/edit */ itxt->x = (rc.left * 4) / LOWORD(units); itxt->y = (rc.top * 8) / HIWORD(units); - itxt->cx = (((btnleft - rc.left - MSGBOXEX_MARGIN) * 4) / LOWORD(units)); + itxt->cx = ((((btnleft - rc.left - MSGBOXEX_MARGIN) * 5)) / LOWORD(units)); /* Multiple by 4 for static, by 5 for edit */ itxt->cy = ((txtrect.bottom * 8) / HIWORD(units)); /* set size of the window */ tpl->cx = (btnleft * 4) / LOWORD(units);