Problems with showing two wxFrame objects

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
Knows some wx things
Knows some wx things
Posts: 25
Joined: Wed Feb 25, 2009 3:00 pm

Problems with showing two wxFrame objects

Post by xargon » Tue Mar 10, 2009 9:56 am


I have a problem where I cannot show two wxFrame objects together. The second one only shows after the first one is minimized or closed.

So, if I have code as follows...

wxFrame * frame1 = new wxFrame(NULL, ....) // constructor

MyWorkerThread * thread = new MyWorkerThread();

wxFrame * frame2 = new wxFrame(NULL, ....) // constructor

frame2 only shows after frame1 has been minimized or closed. How can I show them together? I notice this only happens when I have a thread running...

Last edited by xargon on Tue Mar 10, 2009 10:12 am, edited 1 time in total.

Super wx Problem Solver
Super wx Problem Solver
Posts: 323
Joined: Sun Jun 08, 2008 11:59 am
Location: Bordeaux, France

Post by Muetdhiver » Tue Mar 10, 2009 10:10 am

Maybe by making the second to depend on the first ?

This work ? :

Code: Select all

wxFrame * frame2 = new wxFrame(frame1, ....)

OS: Ubuntu 11.10
Compiler: g++ 4.6.1 (Eclipse CDT Indigo)
wxWidgets: 2.9.3

Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 211
Joined: Sat Sep 02, 2006 7:24 pm
Location: Ukraine

Post by lester » Tue Mar 10, 2009 10:18 am

Or maybe wxTheApp->SetTopWindow( frame1 ); ?

Post Reply