FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour DrawTextEx vs. DrawText
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
DrawTextEx vs. DrawText
Posted: Sun Nov 06, 2011 07: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 )


Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: DrawTextEx vs. DrawText
Posted: Sun Nov 06, 2011 09: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
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
Re: DrawTextEx vs. DrawText
Posted: 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
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: DrawTextEx vs. DrawText
Posted: 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

Continue the discussion