|
-
Nov 23rd, 2001, 11:10 PM
#1
Thread Starter
Lively Member
Set Font and Size with TextOut API function..
How can I set the font and font size in use with the TextOut API function?
-
Nov 24th, 2001, 10:30 AM
#2
Junior Member
CreateFontEx
You can't do that so simple with textout.
I've done a lot of things with GDI, and even made a DLL file that manages the GDI Dll objects.
If you create a font object (I thought about CreateFontEx) with a LOGFONT strcuture, you can define how the font should look like.
Then select that new font into the DC (of the window). That's done with SelectObject() Save the previous handle of the previous font (returned by SelectObject()). Now you should be able to draw with cool fonts.
You can also use DrawText() to draw text. That even supports wrapping the text. Please check our the MSDN for details about, or take a look at my DLL files
Anyway, more about the dll's:- one of the GDI dll's is used to create the GDI objects, and select them easily in the DC.
- an other one (source included) helps you out with the difficulties of the gdi drawing api's
-
Nov 24th, 2001, 02:39 PM
#3
Thread Starter
Lively Member
ya, i figured it out like 10 mins after i posted.... i used CreateFont with SelectObject....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|