?
Solved

Text input/output in DirectX

Posted on 1998-03-17
1
Medium Priority
?
473 Views
Last Modified: 2013-11-19
Hi all,
What I want to do is input and output some text to a fullscreen DirectX application.  Now, I'm not looking for miracles here, but I know there has to be a way to do this without too much pain - I'd hate to have to go convert a font from its font format into individual graphic files for each letter of the alphabet.  I know there has to be a way to drawtext to the DirectX screen, or background buffer - but I haven't found any reference for it, and I've assumed since using DirectX bypasses the normal Windows paint method that I couldn't use textout.

I want to use some standard system font (ie: Arial) and display it on my screen for things like score counters, highscore lists, etc.

I know there has to be a way to do it.  Diablo does it in their multiplayer chat, and draws text during the game using their own font (which I do believe is a font, and not a set of graphic images).  

Any and all help would be appreciated.
0
Comment
Question by:navigator010897
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 15

Accepted Solution

by:
Tommy Hui earned 300 total points
ID: 1317044
Actually, a DirectX program can use GDI functions. The only draw back is that it is slower. However, there's nothing preventing you from doing that.

Once you have a surface, you can use GetDC() to retrieve the device context. Then you can use any of the GDI functions on that device context.
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Ready to get certified? Check out some courses that help you prepare for third-party exams.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question