Archived

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

How to put edit box in DirectX

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

hi all, im developing a game with directx. My game will required input from users (getting from edit box). I''ve tried to use win32 way of prompting a dialog with edit box. but the screen stays as if it''s hang. but i know the dialog box is being called out but only it''s not displaying correctly. This is how i called the dialog box DialogBox(hInstance,MAKEINTRESOURCE(IDD_DIALOG),NULL, (DLGPROC)DlgProc); pls comment... it will be better if there''s any small sample programs as reference for me, thanks guys!

Share this post


Link to post
Share on other sites
You can''t use Windows dialog boxes when you are in a directX game because the directX game takes over the screen. If you want to take user input through a textbox within your game then you will have to either write some code for an editbox control or use someone else''s code for doing this in a dx app.

I am currently writing something like this myself. It''s not really hard, just takes some knowhow and you have to start with the simple stuff then work up to the actual editbox. For example, get some textboxes and input handling working then you can create an edit-textbox.

Share this post


Link to post
Share on other sites
DirectX only takes control if you use full screen mode.
I decided not to use full screen so I could use windows
dialog boxes and everything worked out fine.

Share this post


Link to post
Share on other sites
quote:
Original post by Igilima
You can''t use Windows dialog boxes when you are in a directX game because the directX game takes over the screen. If you want to take user input through a textbox within your game then you will have to either write some code for an editbox control or use someone else''s code for doing this in a dx app.


I haven''t tried it recently, but I''ve never had a problem displaying dialog boxes in DX7 days.

Share this post


Link to post
Share on other sites
first of all, thanks guys,

following the reply u guys gave me, i''ve look up the fullscreendialog at ddraw samples. now i manage to get the dialog prompt out, but the edit box inside the dialog box still can''t be seen and the dialog box cannot stay long. how can i make the dialog box stay until the user has input the data?



Share this post


Link to post
Share on other sites