Sign in to follow this  

Direct3D and Edit Boxes

This topic is 4074 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

Greetings, I am attempting to implement a simple "console" textbox that will appear while my game is running. It's just a regular Win32 textbox into which commands can be entered. I'm using Direct3D 9.0c. I have tried two methods of doing this, both with the same result. I tried putting the textbox directly on the window, and then I tried creating a popup window and displaying the textbox in that (which seemed a better way to do it). In both cases it appears fine if Direct3D is running in windowed mode. If I change to fullscreen, however, the textbox flickers and ultimately disappears if I try to type anything into it. Is there any way to do what I'm trying to do? Thanks!

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
'Fraid not. With Direct3D, you draw to a back buffer which gets drawn OVER any Win32 controls on the target window. Since Win32 isn't drawing to the same back buffer, there will inevitably be flicker. Plus you really shouldn't be using a slow Win32 control in a Direct3D game. Try implementing your own with IDirect3DTexture9, ID3DXSprite9, and ID3DXFont9 (or a custom bitmap font). It's not that hard, and you then have the advantage of having ultimate control over how the textbox appears and behaves. (Actually, if you're going to make a textbox, why not go right ahead and make a full GUI? Buttons, labels, sliders? It's lots of fun.)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
That's what I thought. That tutorial looks like it will help alot, though. Thanks for your responses!

Share this post


Link to post
Share on other sites

This topic is 4074 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this