Jump to content
  • Advertisement
Sign in to follow this  
Darker_Rage

Non-MFC dialogs

This topic is 4907 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, I am using Visual Studio.NET 2003's Visual C++ to create a game. I need to put a dialog box into my DirectX game. As far as I know, I am not using MFC. I have created a resource, designed my dialog box, and I don't know what to do next. I have tried every combination of things I can put into the "app wizard" thing that you get if you double click, and nothing happens. I have not created any other files, apart from "resource.h" which was generated when I made the resource. This is for my final dissertation project, so is really important to me, I will be eternally grateful for any help! Darker_Rage

Share this post


Link to post
Share on other sites
Advertisement
Doynax:- No good, need to be able to popup on keypress and pass meaningful information back to the main program

Coder: hUh? I'm not running fullscreen, and I think that's a bit ahead of myself - all I need to do is get the dialog to appear at the moment! Come to that, what's a GDI dialog box?

ETA:

Actually, Coder, that might be of some use... I looked up GDI dialogs, and it's given me a meaningful looking Window procedure (LRESULT CALLBACK bla bla bla). Thing is, i'm a little unsure of where I should put it? Do I just declare it like I did the main window procedure? And then what; how do I get it to pop up when I need it to?

Share this post


Link to post
Share on other sites
Quote:
Original post by Darker_Rage
Doynax:- No good, need to be able to popup on keypress and pass meaningful information back to the main program
That shouldn't be any problem.
Design everything as usual in MSVC's editor and provide DialogBox with its resource id.
Use EndDialog to pass a value back to its creator and you'll get it as the return value from the DialogBox function.

Quote:
Original post by Darker_Rage
I looked up GDI dialogs, and it's given me a meaningful looking Window procedure (LRESULT CALLBACK bla bla bla). Thing is, i'm a little unsure of where I should put it? Do I just declare it like I did the main window procedure? And then what; how do I get it to pop up when I need it to?
Yup, just a normal window procedure. Try copying to one in the tutorial for a start.
You can spawn one whenever you need to with the DialogBox or CreateDialog (for modeless dialogs) functions.

Share this post


Link to post
Share on other sites
Quote:
Original post by Darker_Rage
Coder: hUh? I'm not running fullscreen, and I think that's a bit ahead of myself - all I need to do is get the dialog to appear at the moment! Come to that, what's a GDI dialog box?

ETA:

Actually, Coder, that might be of some use... I looked up GDI dialogs, and it's given me a meaningful looking Window procedure (LRESULT CALLBACK bla bla bla). Thing is, i'm a little unsure of where I should put it? Do I just declare it like I did the main window procedure? And then what; how do I get it to pop up when I need it to?

Sorry, I assumed you were given that we're in the DirectX forum, and you said you'd like to display in your DX game [smile]

If your problem is displaying dialogs in general:
MFC Dialog box tutorial
Relisoft Win32 Dialog Box tutorial

These, and you should've posted at the General Programming forum [smile]

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!