Solved

Text input/output in DirectX

Posted on 1998-03-17
1
465 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 150 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Expand LInux Boot partition remotly 3 102
Line meaning 9 91
Problem to event 3 114
I could not set window to top 4 45
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.

696 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