Page 1 of 1

Dialogs and frames

Posted: Wed Mar 04, 2009 3:45 am
by nkwinder
hello all

Well, i was searching for a window class that it would be the best to use for what i want to achieve.

Basically i have my main window as a wxFrame. This would be sth like 3d studio with realtime viewports etc. I also want to open a separate window that shows the final rendering of the model. This window will contain it's own toolbar, scrolled window for canvas etc.

So i was thinking of making it a wxFrame too, but i see that a frame must not be a child of another frame. Then i thought dialog, but i read that a frame can't have a dialog child either. Then the only option is to create a frame with a null parent, but i see that when a null parent is provided, the top level window is assigned as a parent to it by default, which in my case is a wxFrame.

let me note here that i don't want this separate window to appear in windows taskbar.

so can anyone help me out choosing the appropriate window class?

thanks in advance

Re: Dialogs and frames

Posted: Wed Mar 04, 2009 5:04 am
by tierra
nkwinder wrote:So i was thinking of making it a wxFrame too, but i see that a frame must not be a child of another frame. Then i thought dialog, but i read that a frame can't have a dialog child either.
Where did you read this? Neither of these statements are true.

Posted: Wed Mar 04, 2009 2:41 pm
by Auria
let me note here that i don't want this separate window to appear in windows taskbar.
What you probably want is to use the wxFRAME_TOOL_WINDOW flag

Posted: Wed Mar 04, 2009 2:47 pm
by computerquip

Code: Select all

class MyFrame : public wxFrame
{
 public:
  wxFrame bob = new wxFrame(this, -1);
}
Child frame of a frame? MyFrame is the parent of bob. If you want, you could also extend MyFrame like I did wxFrame.

EDIT: My cheesy graph encoder thingy majig has a nice example I could show when I get home from high school...

Posted: Wed Mar 04, 2009 2:47 pm
by nkwinder
from august 2008 documentation

"A frame is a window whose size and position can (usually) be changed by the user. It usually has thick borders and a title bar, and can optionally contain a menu bar, toolbar and status bar. A frame can contain any window that is not a frame or dialog."

maybe i'm wrong but i think contain means having a child...

Posted: Wed Mar 04, 2009 4:37 pm
by tierra
That's just talking about how top level windows can't contain other top level windows (in the sense of MDI, which is possible on Windows, but not any other platform). It's not referring to parent/child window relationships.

Posted: Wed Mar 04, 2009 4:39 pm
by nkwinder
ok then! thanks