Skip to main content
gamedev.net
🔒 Locked

Dialogue boxes

Started by bobbinus Aug 3, 2006 at 6:44 AM 6 replies 700+ views
Original Post
bobbinus
bobbinus
Hello I want to create a dialogue box that will allow the player to configure their graphics settings in windows....MFC style...I havn't done this before and was considering using Windows Forms and C# to do it but realised that would require the user to have .net installed.... Is C++ and standard MFC feasible? I have no experience with this kind of thing so your input would be much appreciated. Thank you in advance for your help :)
SilentKiller
SilentKiller
Quote:
Original post by bobbinus
would require the user to have .net installed....


So? Most people would have it and its easily obtainable if they dont.
Simian Man
Simian Man
Quote:
Original post by SilentKiller
Quote:
Original post by bobbinus
would require the user to have .net installed....


So? Most people would have it and its easily obtainable if they dont.


It's a lot to install for somthing so small as a settings dialog though.

I have done this using MSVC's dialog editor and straight Win32; I imagine MFC would work too.
StarikKalachnikov
StarikKalachnikov
I find that .NET is a far clearer API/framework than MFC. But then again I never understood one thing about MFC ;)

Furthermore since it's newer it's bound to have more support for coming years.

Don't know how to do it in MFC, but using .NET showing a window in modal mode is as easy as:

if (ConfigureDialog.ShowDialog() == DialogResult.OK)  SaveConfiguration();//something like that.   
Next time I give my advice, I'll buy some bubblegum so I won't your kick ass!
yadango
yadango
in MFC you would need two classes, one derived from CApplication (which you also need to instantiate a global object of) and one derived from CDialog (your dialog). In CApplication you overload one function, if I remember right it's InitInstance; there you create an instance of your dialog and call DoModal (if I remember right also... it's been over a year since I used MFC).
thesimon
thesimon
for something as simple as a dialog for configuration purposes MFC is just the right thing. i also wouldn't add a dependency to .net 2.0 just because of a dialog. as long as you don't want to make a window as for example in notepad.exe (with an interactive part, i.e. the text editing surface) but only a dialog with a bunch of options using MFC will be reasonably simple. you should not be afraid to read though a bunch of C (well c++.. but by no means complex c++) code that is littered with macros, though. MFC produces quite a lot of it.
If your application is completely c++ and doesn't include the ATL or MFC yet, i'd think about making the MFC config dialog a dll. i wouldn't introduce the MFC dependency to your main project if it's only used in a small part of the app like a config dialog.

go with it :)
cheers,
simon
bobbinus
bobbinus
hehe thanks for grammar correction....my main concern is that the user would have to download some kind of virtual machine.....MFC is built into windows right?

To develop with that....do I need to download an SDK or does visual studio come with something?

Relevant point made by Starik about .net support into the future....does any version of .net come with the XP service packs....or will Vista include it? However it really is a fairly trivial, one time task....would really piss me off as a user if I wanted to start playing and had to do a ~20mb download as a first hurdle...

[Edited by - bobbinus on August 3, 2006 4:29:39 PM]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.