Archived

This topic is now archived and is closed to further replies.

silly hDC font question

This topic is 4960 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I hate 3D: I want to create text on a direct draw surface. I need to do it quickly, without a lot of programing. later on i can create some kewl bliting thing with 52+ little images all alighned and blted properly, but now i just need transparent stuff. how do i get more information on using hDCs to print text. i want to change the font size but i can''t find it in the direct X documentation. so where do i go for the line that says: "first you must X with your hDC by Ying. then call Z and finaly W to print the text." I just wanna get this done.

Share this post


Link to post
Share on other sites
Changing font size would be in the GDI documentation. When you call CreateFont() or one of its relatives one of the parameters is the font size.

Share this post


Link to post
Share on other sites
Device contexts (hDC = handle of a Device Context) don''t really have anything to do with DirectX so you won''t find any documentation for them in the DirectX SDK docs.

DCs are a Win32 GDI (Graphics Device Interface) concept; the GDI is documented in MSDN: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnanchor/html/gdi.asp?frame=true

Regarding fonts and text in particular (I''d still recommend you familiarise yourself with other GDI basics such as selecting objects into a DC): http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/fontext_8ctw.asp?frame=true


Simon O''Connor
Game Programmer &
Microsoft DirectX MVP

Share this post


Link to post
Share on other sites