Sign in to follow this  
jagguy2

another UI and directx

Recommended Posts

Hi, q1)In my program i want another screen where i change the settings with directx/c++. So i ht maybe F1 and i goto another screen to change something then come back and continue the program with a new setting. In directX is there an easy way or do i need to call another screen with win32 code? how do i do this again? q2) To have a settings window (another screen)with UI controls on a screen do I use regular c++ win32 COM objects or can i use .net managed code or even Visual Basic.net? So i will have a directx program that you hit f1 and goto a a setings page written in VB.net.

Share this post


Link to post
Share on other sites
The usual options are:
1. A separate config app run before the main app, that enumerates devices, presents options and saves the results to an ini/registry. (e.g. Lucasarts games?)
2. Enumerate and render the directx options (resolution etc) in the app and call Reset() etc. on the directx device with the new settings. (e.g. id software games, DirectX 9 examples)
3. A combo where a regular Windows dialog is spawned by the main app and effectively does the same thing as 1, but finishes by doing 2. (e.g. DirectX 8 examples).

Share this post


Link to post
Share on other sites
If it's already a vc++ program, I'd investigate Modal Dialogs. You can put your options in that. It won't be .net and it doesn't have to be COM.

http://www.devarticles.com/c/a/Cplusplus/Using-MFC-in-Cplus-Dialog-Boxes/1/
http://www.functionx.com/visualc/controls/dialogbox.htm

You can catch F1 from your message loop or a Keyboard Accelerator. If you don't know what these things are I think you have a lot of reading to do on MSDN!

Share this post


Link to post
Share on other sites
Quote:
Original post by jagguy2
one more q) to test for key input in directx in am using GetAsyncKeyState(some key )) but is there a dirextx way that is better?


Not really. DirectX contains a component called DirectInput that provides keyboard data, but you'd be better off just using the WM_KEYDOWN and WM_KEYUP messages that Windows sends to your WndProc already.

Share this post


Link to post
Share on other sites
Quote:
Original post by DvDmanDT
Possible, but probably not too easy or efficient. Accutually, probably quite hard. I would recommend looking at UI libraries instead.


what UI libraries are these ? you mean the UI option on VC++ express for instance?
These are MFC?

Share this post


Link to post
Share on other sites

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