A couple of questions (Windows-related)...
I am working on a level editor for a 3D engine, and I''ve run into a snag. Basically the editor consists of MDI frame and client window, and a bunch of MDI child windows inside. The child windows are either views (3D view, left view, front view, etc.) or tools (texture selector, brush config, etc.).
First question...I want to use the dialog resource editor (MSVC5) to create the tool windows, but they have to be MDI child windows. Is there any way to turn a dialog box into a MDI child window, or stick a dialog template into a MDI child window (same effect).
Second question...Every child window in the editor can be "floated". When a child window''s float flag is set, it can be moved around "above" all the other windows freely (normally windows snap together to make aligning them easier). Floating windows are supposed to be above all the other windows at all times, even if the active window completely overlaps the child window. What styles/flags do this? WS_EX_TOPMOST almost works, but it still allows the active window to overlap the floating window.
I hope all this makes sense. Please help!
--Torin
Well I''m no expert at mfc but i think you can base your class on CFormView instead of CView in the AppWizard and you will get a dialog type window you can place controlls on etc.
Peo
Crappy shareware games at:
http://www.trollmagic.com
Peo
Crappy shareware games at:
http://www.trollmagic.com
Yes you can use formview that works ok.
You can always make the dialog be a child with no border and then create it as a child of the mdi frame window. There are some sizing issues you have to deal witht here when the user has a different system font selected but it works pretty well.
There is an ex style WS_EX_TOOLWINDOW. Have you tried using that?
Photoshop has a bunch of tool windows in it, for instance.
HTH
Doug Sutherland
You can always make the dialog be a child with no border and then create it as a child of the mdi frame window. There are some sizing issues you have to deal witht here when the user has a different system font selected but it works pretty well.
There is an ex style WS_EX_TOOLWINDOW. Have you tried using that?
Photoshop has a bunch of tool windows in it, for instance.
HTH
Doug Sutherland
I figured out how to do question #1 (PS, I''m using Win32 functions, not MFC, which is why I couldn''t try Cafall''s solution). Thanks anyway.
What I did was this - I made my dialog template without a caption or a border in the resource editor, then made it a child window (which you CAN do in the resource editor). I then created an MDI child window and made THAT the parent of my dialog template. Then I resized the MDI child window to be the same size as the dialog window inside of it. It looks like one window, and my dialog can now effectively be a MDI child window.
Still figuring out #2. It seems like it should be so easy...
Thanks for your help,
--Torin
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement