Jump to content
  • Advertisement

Archived

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

kmac

Writing Text to Surface

This topic is 5583 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''m trying to make a simple game using DirectDraw, and want to be able to type on the screen. Is there a DirectDraw function to do this, or should I just sprites for all the characters? I could do that, it just seems like overkill... Thanks, KMac

Share this post


Link to post
Share on other sites
Advertisement
You might use GetDC or Lock, and then type like in GDI(DX 7,9). Btw in dx 8.1 there isn''t something like GetDC, only lock method, but you can use sprites.

Share this post


Link to post
Share on other sites
I use the win32 textout function. example:
HDC hdc;
surface->GetDC(&hdc);
TextOut(hdc,x,y,"Hello!",length_of_text);
surface->ReleaseDC(hdc);
hope this helps.. brassfish

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!