Jump to content
  • Advertisement
Sign in to follow this  

Dialogs and drawing

This topic is 3739 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

I have a windows application that is well on its way to becoming a tile map editor. I'm at the point where I have DirectX presenting to multiple windows for the map display and tile selection. So far, there is one frame() function that determines what windows are active and then presents a scene to them. Now I've run into a problem... The toolboxes and map display are just child windows of the main window, and I have no problem rendering to both when frame() is called with each loop iteration, but suppose I want to open a dialog box that will display the frames of a tile animation so the user can edit them. If the dialog is modal (prefered) then the application is stuck in its own little loop for that dialog, and I can't use the frame() function since it's used in the main message loop. I thought of using a message hook or a timer message to give the dialog its own rendering routine. If the dialog is modeless, then I can present just fine to every window, but it seems to defeat the purpose of using a dialog box, and I may risk changing data out of order, unless I disable controls. If I use multithreading... something I'me very iffy about... I might be able to render throughout the whole application lifetime with no worries as long as I am just reading data from the windows message loop. I really would like to avoid multithreading because of the complexity, but if the benefits outweigh the problems, then I may give it a shot. I've never really thought I'd run into an issue like this, but that's the joy of programming! I would like to hear of any suggestions or thoughts.

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!