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
Solved

Text input/output in DirectX

Posted on 1998-03-17
1
464 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
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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone 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
iSeries DB2 Query 2 97
Can not remove SSL certificate on iPhone 6 - iOS10.2 12 854
unix example issues 18 98
Trying to run powershell  in a batch file. How do I do this? 8 106
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

860 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