wxMessageBox() doesn't show

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
zaneski13
In need of some credit
In need of some credit
Posts: 4
Joined: Sat Nov 14, 2009 1:34 am

wxMessageBox() doesn't show

Post by zaneski13 » Sun Nov 15, 2009 7:48 pm

I have an overloaded class called MainFrame which inherits from wxFrame. This window is maximized and contains a pointer to another overloaded class called GLCanvas which inherits from wxGLCanvas. right now I'm just trying to handle events inside of the GLCanvas class so I was testing different functions of mine, one being OnMouseButtonDown(). To check to see if my function was actually being called by wxWidgets I decided to use the wxMessageBox function and display some sort of message saying something about the mouse click event. When I run my app and click my mouse over the GLCanvas window the messagebox doesn't appear. ( I think its under my MainFrame or the GLCanvas ) I know it creates the messagebox bewcause I hear the sound and if I press ALT the messagebox appears. How can I make the messagebox appear on top of everything. I've tryed parenting it to the GLCanvas, the MainFrame and settinf parent to (wxWindow *)NULL I'm not sure what else I can do.

spectrum
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 207
Joined: Sat Jul 21, 2007 12:17 pm

Post by spectrum » Mon Nov 16, 2009 10:16 am

Hello, seems your window is topmost than the messagebox. Did you try to set the parent parameter to 0 ? Or to make an Hide() to your window before calling ::wxMessageBox ?
spectrum

Post Reply