DrawTextEx vs. DrawText

DrawTextEx vs. DrawText

Postby Otto » Sun Nov 06, 2011 7:31 pm

To all:
Is it possible that the screen printout of the 2 printing functions differs in quality.
I feel that nStyle - DrawText is better readable.

If yes I would suggest to use nStyle - DrawText for the MetroUI.

Best regards,
Otto

---------------------------------------------------------------------------
DrawTextEx( ::hDC, cText, aRect, nAlign )
---------------------------------------------------------------------------
nStyle = nOR( WS_CHILD, WS_VISIBLE )
DrawText( ::hDC, cText, aRect, nStyle )
---------------------------------------------------------------------------
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6330
Joined: Fri Oct 07, 2005 7:07 pm

Re: DrawTextEx vs. DrawText

Postby nageswaragunupudi » Sun Nov 06, 2011 9:15 pm

In both the functions, the 4th parameter is nAlign only.
This is always an Or'ed value of any of the constants like, DT_TOP, DT_LEFT, DT_SINGLELINE, DT_CALCRECT, etc.

In the function DrawText, the 4th parameter has nothing to do with WS_VISIBLE or WS_CHILD.

Using the numeric value of WS_VISIBLE | WS_CHILD is understood by the DrawText function as DT_TOP|DT_LEFT.

Except that DrawTextEx accepts one more parameter additionally (which is not used in the present FWH library) both are functionally the same to my understanding.

It is interesting to note that the quality of rendering of both the functions is different.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10631
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: DrawTextEx vs. DrawText

Postby Otto » Sun Nov 06, 2011 10:42 pm

Mr. Rao,
please look at the attached picture.
This is a zoom of the screenshot. "W" shows the differences well.
DrawTextEX prints a picture which seems slightly unshaped.
Best regards,
Otto


left side is with DrawTextEX
Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6330
Joined: Fri Oct 07, 2005 7:07 pm

Re: DrawTextEx vs. DrawText

Postby nageswaragunupudi » Sun Nov 06, 2011 10:46 pm

Dear Mr Otto

I am not disputing your observation.
But it raises curiosity, because both the functions are supposed to be identical in functionality.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10631
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 108 guests