Jump to content
  • Advertisement
Sign in to follow this  
kevlur

Add menu to a Direct3D app ?

This topic is 4904 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, How can i add a menu(like one to browse and choose files from hard disk) in a C++/Direct3D application? The direct3d app is an editor, in which i load file .x, by now i can load file entering file name in the source files, but i want to load file opening a window and searching the file with it. Is it possible to visualize this window while rendering with direct3d? Thank you:) Kev

Share this post


Link to post
Share on other sites
Advertisement
You will have to look into either writing a gui system which a very hard a complicated solution, or using the WIN32 api to add standard menus ( as seen in microsoft applications).

I'm sure someone can provide further advice.

ace

Share this post


Link to post
Share on other sites
Quote:
Original post by kevlur
Hi all,
How can i add a menu(like one to browse and choose files from hard disk) in a C++/Direct3D application?
The direct3d app is an editor, in which i load file .x, by now i can load file entering file name in the source files, but i want to load file opening a window and searching the file with it. Is it possible to visualize this window while rendering with direct3d?

Thank you:)

Kev

If you want this to be easy, then best do this with windowed mode Direct3D. That is, just target a container within your main window. That way you can use regular MFC/WinForms/Win32 type stuff "around the edge" and get your various menus buttons and dialogs.

If you need to do it in fullscreen, where you can't see any of the normal windows like stuff, you might want to look into the later SDK's that have the D3DX GUI components (they start with DXUT iirc). You won't get a file dialog or menus with this, but you can quite easily simulate similar GUI widgets using drop down lists/text boxes and so on. There isn't much in the documentation about it, but you might wanna check out the CustomUI Sample

hth
Jack

Share this post


Link to post
Share on other sites
Im working fullscreen, ill go to have a look at D3DX GUI components in the last DXSDK, someone know where can get D3DX GUI documentation or code example, which are not in the DXSDK?

Thanks:)

Share this post


Link to post
Share on other sites
Quote:
Original post by kevlur
Im working fullscreen, ill go to have a look at D3DX GUI components in the last DXSDK, someone know where can get D3DX GUI documentation or code example, which are not in the DXSDK?

To my knowledge the DX SDK is the only source of documentation/sample code at the moment.

If you look at the sample I mentioned, the code behind things is very very simple - and, in truth, the GUI components in D3DX are no where near as advanced as Win32/Swing/SWT and their counterparts.

hth
Jack

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!