Jump to content
  • Advertisement
Sign in to follow this  
Jannes

Confusion about Game Editor with MFC

This topic is 4648 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, i am confused about how i should do my game editor with MFC (VC++) and DirectX. I want it to display always only one map (indication for SDI) but with several tool windows for picking tiles/objects. DirectX should render the map to the main window (parent) and objects in the toolwindows (children). Questions: 1.) Should a toolwindow be a CDialog or CFormView derived class if i need to render within it? 2.) Can i render in a picture box of a CDialog object? 3.) Is it necessary to use an MDI app? 4.) Is it possible to render in the client area of a MDI Mainframe ? 5.) Rendering to multiple targets/windows should be done with swap chains ? Thanks for any help

Share this post


Link to post
Share on other sites
Advertisement
1) From my experience, a modeless CDialog derived tool window works very well.
2) Yes, you can render into any control and a picture box is just as good as a static control.
3) No, it's neither necessary nor suitable unless you want to edit many maps at once. Please note that SDI still allows for multiple views, though.
4) Yes it's possible to render into the client area.
5) Rendering into multiple windows should (must?) be implemented using swap chains.

HTH,
Pat.

Share this post


Link to post
Share on other sites
It's possible to use an SDI setup for the editor; but, there will be a few things you need to worry about. For instance, if you create a toolbar along either side of the main window, and you draw to the client area of the main window, you will be rendering over top of the toolbar. Your best bet would be to go with an MDI setup, just to save from that hassle (and it can be quite so).

If you're going to be using DirectX in multiple windows (e.g. A map editor window, and another window), then you'll need to look into swap chains. I've never used them, so I can't say too much about the process of setting them up. Are you planning on having each object in its own picture box? If so, that swap chain would be massive.

For MDI setups, it would be better to create a CChildFrame window and render into that, for your map editing. As for rendering into a picture box, it's doable. Personally, to save from the complexity of that added rendering, I would set the toolbars up to have tree views of the objects, instead of rendering meshes. This way, people will lower-end video cards and systems wouldn't be lagging when they scroll through the list of objects available. To add to this, you could set it up so if the user double-clicked on one of the tree nodes (objects), then a little model viewer could open up with the mesh of the selected object.

Share this post


Link to post
Share on other sites
Thx both for your help.

Have to think abit more about it though.

P.S.:
Quote:

4) Yes it's possible to render into the client area.


I tried this once but got problems with the toolbar drawing and the usually used OnDraw-Handler for Rendering which isn't present in FrameWnd.

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!