bringing a wxApp to front

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
spectrum
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 207
Joined: Sat Jul 21, 2007 12:17 pm

bringing a wxApp to front

Post by spectrum » Fri Oct 02, 2009 1:47 pm

Hello All,

i am stucked in a strange problem, hope someone can help me on this:

I need to do the following:
1)launching my wxApp, i look for other running instances of the same application,
2) if found, then a message box pop up and advise about another instance is running
3) (here is the problem) i need to maximize the running instance and exit the current.

My problem is the point 2 only. There are many and many ways on the net to put the other app in the foreground, i used the following API code,

http://forums.wxwidgets.org/viewtopic.p ... t=lischner

Anyway, all the methods i found bring the app to foreground, but in about 50% of the cases, the app (wxFrame) that is maximized is not redrawn, it accept mouse commands, i can move it on the screen, but the GUI shape remain in the old position, no redraw seems to work at all.

Since i suppose most of the samples i found to maximize another app should work, could it be something related to wxWidgets ?

many thanks,
spectrum

Post Reply