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; //no ES_READONLY for static if(lpMsgBoxParams->dwStyle & MB_RIGHT) itxt->style |= SS_RIGHT; else @@ -435,14 +436,15 @@ 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); + /* TODO: Get rid of rectangles at end of edit control */ *(WCHAR*)dest = 0; dest += sizeof(WCHAR); *(WORD*)dest = 0; - dest += sizeof(WORD); + dest += sizeof(WORD); /* create buttons */ btnsize.cx = BTN_CX; @@ -489,7 +491,8 @@ mbi.DefBtn = Buttons[0]; } - /* calculate position and size of controls */ + /* calculate position and size of controls + TODO: edit control needs more space to show text*/ txtrect.right = GetSystemMetrics(SM_CXSCREEN) / 5 * 4; if(Icon) txtrect.right -= GetSystemMetrics(SM_CXICON) + MSGBOXEX_SPACING;