I find have used both these functions before, but I don't quite see the the difference between them. Well, I know that DrawText requires a formatting rectangle,and can do some text formatting, and textout only the starting coordinates, are there any other differences?
DrawText
TextOut
Also, take a look at ExtTextOut and DrawTextEx
DrawText() is User32.dll
TextOut() is Gdi32.dll
DrawText most likely calls TextOut in its implementation.
Draw text can be used to just give the length or size of text without actually displaying it. This is useful when you have to fine the maximum display length of a set of strings. Also if you supply a null terminated string as the input in DrawText, it is not necessary to supply the length of the string - that is automatically created.
Take a look at this and this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With