Non-MFC dialogs

Started by
4 comments, last by Muhammad Haggag 19 years, 1 month ago
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
Advertisement
Clicky
IDirect3DDevice9::SetDialogBoxMode

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?
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.
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]

This topic is closed to new replies.

Advertisement