Fixed calculating the size of empty message boxes. Fixes bug 1224
Modified: trunk/reactos/lib/user32/windows/messagebox.c

Modified: trunk/reactos/lib/user32/windows/messagebox.c
--- trunk/reactos/lib/user32/windows/messagebox.c	2006-01-01 13:36:06 UTC (rev 20510)
+++ trunk/reactos/lib/user32/windows/messagebox.c	2006-01-01 13:45:09 UTC (rev 20511)
@@ -493,7 +493,15 @@
       txtrect.right -= GetSystemMetrics(SM_CXICON) + MSGBOXEX_SPACING;
     txtrect.top = txtrect.left = txtrect.bottom = 0;
     SelectObject(hDC, hFont);
-    DrawTextW(hDC, text, textlen, &txtrect, DT_LEFT | DT_NOPREFIX | DT_WORDBREAK | DT_CALCRECT);
+    if (textlen != 0)
+    {
+      DrawTextW(hDC, text, textlen, &txtrect, DT_LEFT | DT_NOPREFIX | DT_WORDBREAK | DT_CALCRECT);
+    }
+    else
+    {
+      txtrect.right = txtrect.left + 1;
+      txtrect.bottom = txtrect.top + 1;
+    }
     txtrect.right++;
 
     /* calculate position and size of the icon */