Dialogs and drawing
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement