Jump to content
  • Advertisement
Sign in to follow this  

Textbox for DirectX?

This topic is 3543 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 assuming you mean something for text entry here)

In the DirectX SDK, there is a GUI example in the DXUT (= DirectX UTilities) folder which uses subclassing to draw Win32 controls, including textboxes, onto a Direct3D surface.

Then the are game GUI libraries like CEGUI which can render controls such as buttons and text boxes onto any graphical surface. If portability was a concern, these should be preferred.

Finally, to do it yourself, you should simply catch the WM_CHAR message and append that to your text box. You can also do the trick using MapVirtualKeyEx() and ToAscii(), but international users won't be able to enter things like french accents with that method.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!