Page 1 of 1

wxMessageBox() doesn't show

Posted: Sun Nov 15, 2009 7:48 pm
by zaneski13
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.

Posted: Mon Nov 16, 2009 10:16 am
by spectrum
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 ?