[wxMessageDialog] add buttons

Christian Buhtz exsudat at gmx.de
Sun Jul 29 07:34:47 PDT 2007


I derived a class from wxMessageDialog and need to add more buttons to 
it. How can I do this? I tried to get the sizer like this:

wxSizer* pSizer = GetSizer();
or more exactly
wxSizer* sizerBtn = 
dynamic_cast<wxSizer*>(GetSizer()->GetItem(2)->GetUserData());

But GetSizer() just returns NULL. But the main-sizer of the 
wxMessageDialog is set in its ctor.

I call GetSizer() long after the wxMessageDialog object is constructed. 
Its ctor is called in the beginning of the application. It is everytime 
alive. I just show/hide it.)





More information about the wx-dev mailing list