Re: Problem while outputting multiline text using DrawText
What kind of control/window are your drawing
in?
<<
Standard Activex control made with MFC APPWIZARD
What are the bounds of the rectangle that you are drawing in?
<<
rcBounds passed in by OnDraw
Is the
text all displaying on one line or is it truncated in the rectangle?
<<
Displaying in one line.
Have
you considered using DT_WORDBREAK to have DrawText do word wrap for you?
<<
Ya, I used DT_WORDBREAK, but no effec
This article might be interesting to you. It doesn't solve your problem,
but it's a good read:
http://blogs.msdn.com/michkap/archive/2005/06/25/432723.aspx
<<
Thanks.
On Jun 28, 6:50 pm, "Tom Serface" <tom.nos...@camaswood.com> wrote:
Need some more information. What kind of control/window are your drawing
in? What are the bounds of the rectangle that you are drawing in? Is the
text all displaying on one line or is it truncated in the rectangle? Have
you considered using DT_WORDBREAK to have DrawText do word wrap for you?
This article might be interesting to you. It doesn't solve your problem,
but it's a good read:
http://blogs.msdn.com/michkap/archive/2005/06/25/432723.aspx
Tom
"JoDeGr8" <johnemma...@gmail.com> wrote in message
news:1183030326.633693.318460@z28g2000prd.googlegroups.com...
Hi All,
When i used drawtext to output a multiline text in a standard VC++
app it is working fine. But when i added the following code in the
ondraw function of my Activex control the text is displayed in single
line.
void COCXForTestingDrawTextCtrl::OnDraw(
CDC* pdc, const CRect& rcBounds, const CRect&
rcInvalid)
{
CRect theNewRect=rcBounds;
pdc->DrawText("This is a text to display the multiline
functionality
of Draw text",&theNewRect,DT_LEFT);
}
Please tell me what is wrong with the above code.
Thanx,
J