nFmt = DT_END_ELLIPSIS | DT_EXPANDTABS | DT_NOCLIP | DT_WORDBREAK |
DT_CALCRECT;
nHt1 = DrawText(hDC, strText, &rectItem, nFmt);
nFmt = DT_END_ELLIPSIS | DT_EXPANDTABS | DT_NOCLIP | DT_WORDBREAK;
nHt2 = DrawText(hDC, strText, &rectItem, nFmt);
_ASSERT(nHt1 == nHt2);
Any help is very appreciated.
>Can someone please tell me why two subsequent calls to DrawText, one with
>DT_CALCRECT and the other without, results in the height calculation being
>different?
I can't tell you why, but if you look here:
http://msdn.microsoft.com/library/sdkdoc/gdi/fontext_0odw.htm
you'll see that DT_EXPANDTABS | DT_END_ELLIPSIS is not supported.
>
>nFmt = DT_END_ELLIPSIS | DT_EXPANDTABS | DT_NOCLIP | DT_WORDBREAK |
>DT_CALCRECT;
>nHt1 = DrawText(hDC, strText, &rectItem, nFmt);
>
--
Mike Enright
enri...@acm.org (Email replies cheerfully ignored, use the news group)
http://www.users.cts.com/sd/m/menright/
Cardiff-by-the-Sea, California, USA
Hope this helps a bit!
Jamie O'Brien
jam...@interworx.com.au