while (child.IsOk())
{
m_treeCtrl->Delete(child);
/* Not GetNextChild below, because the cookie mechanism can't
* handle disappearing children! */
while (child.IsOk())
{
m_treeCtrl->Delete(child);
/* Not GetNextChild below, because the cookie mechanism can't
* handle disappearing children! */