Dialogs and frames Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
nkwinder
Experienced Solver
Experienced Solver
Posts: 70
Joined: Sun Nov 23, 2008 2:32 pm

Dialogs and frames

Post 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
User avatar
tierra
Site Admin
Site Admin
Posts: 1355
Joined: Sun Aug 29, 2004 7:14 pm
Location: Salt Lake City, Utah, USA
Contact:

Re: Dialogs and frames

Post 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.
Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Post 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
computerquip
Experienced Solver
Experienced Solver
Posts: 72
Joined: Fri Feb 20, 2009 7:13 pm
Location: $(#wx)\src

Post 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...
Last edited by computerquip on Wed Mar 04, 2009 2:57 pm, edited 2 times in total.
nkwinder
Experienced Solver
Experienced Solver
Posts: 70
Joined: Sun Nov 23, 2008 2:32 pm

Post 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...
User avatar
tierra
Site Admin
Site Admin
Posts: 1355
Joined: Sun Aug 29, 2004 7:14 pm
Location: Salt Lake City, Utah, USA
Contact:

Post 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.
nkwinder
Experienced Solver
Experienced Solver
Posts: 70
Joined: Sun Nov 23, 2008 2:32 pm

Post by nkwinder »

ok then! thanks
Post Reply