CDC::SetTextAlign & CDC::TextOut 
Author Message
 CDC::SetTextAlign & CDC::TextOut

Hi all,

i want to draw text that is aligned with the vertical center of a bounding
rectangle. I found a constant for horizontal centering:
CDC::SetTextAlign(TA_CENTER) ... but does anyone know how to achieve
vertical centering ??

my code is somewhat like that now:
pDC->SetTextAlign(...);
pDC->TextOut(pt.x, pt.y, ...);

Thanks for your help
Stefan



Tue, 01 Mar 2005 11:02:52 GMT  
 CDC::SetTextAlign & CDC::TextOut
Hi Stefan,

Use CDC::DrawText for your purpose.
The vertical alignment is supported with using VT_VCENTER constant.

good luck

Damien

Stefan Kaeser schrieb in Nachricht ...

Quote:
>Hi all,

>i want to draw text that is aligned with the vertical center of a bounding
>rectangle. I found a constant for horizontal centering:
>CDC::SetTextAlign(TA_CENTER) ... but does anyone know how to achieve
>vertical centering ??

>my code is somewhat like that now:
>pDC->SetTextAlign(...);
>pDC->TextOut(pt.x, pt.y, ...);

>Thanks for your help
>Stefan



Tue, 01 Mar 2005 12:20:38 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. CDC::TextOut not responding to CDC::SetTextAlign??

2. Using CDC TextOut function with doubles & floats

3. Urgent! CDC::TextOut

4. CDC textout problem

5. Q: Selecting font for CDC::TextOut

6. White background for text displayed using CDC::TextOut(...)

7. Text Print using CDC::TextOut by ORing

8. Problem with CDC TextOut function

9. CDC::TextOut() and setting font sizes

10. Howto CDC::TextOut funtion With Anti-alias.....

11. CDC::TextOut is outputting garbage!!

12. White background for text displayed using CDC::TextOut(...)

 

 
Powered by phpBB® Forum Software