::wxGetTopLevelParent() returns NULL
Thomas Zehbe
tz at ingenion.de
Fri Aug 25 03:58:24 PDT 2006
Hi,
Tried to call ::wxGetTopLevelParent() from wihtin the dtor of a listctrl
contained in a wxFrame. The call returns NULL.
Debugging it I found this function in wincmn.cpp
bool wxWindowBase::IsTopLevel() const
{
return false;
}
which was called from
wxWindow* wxGetTopLevelParent(wxWindow *win)
{
while ( win && !win->IsTopLevel() )
win = win->GetParent();
return win;
}
Seems to be a complex implementation of a NULL pointer of type wxWindow*.
Did I miss something?
What I want to archieve is to make the column settings of the listcontrol
persistent. Therefore I want to get the title of the frame or dialog and use
it together with the controls ID as Identifier for wxConfigBase entry.
Any hint would be appreciated.
Regards,
Thomas
--
Dipl.-Ing. Thomas Zehbe
INGENION GmbH
Kuhweide 6
31552 Apelern
Fon: 05043 / 40 57 90 4
Fax: 05043 / 40 57 90 7
More information about the wx-users
mailing list