From: Michael Letzgus on
Hi all,

I've just found a problem with the HasChildren()-Method of wxTreeCtrl:

bool hasChildren = this->HasChildren( rootID );

doesn't work with wxMSW (2.8.9).

An assertion in debug mode fails ("can't retrieve virtual root item"),
followed by a GPF.

This problem only occurs if the wxTR_HIDE_ROOT flag is set.

Workaround:
bool hasChildren = (GetChildrenCount(rootID, false) != 0);


There are no problems with HasChildren() with wxGTK (2.8.9).


Setup: MSYS+MinGW (TDM g++ 4.3.2), Windows XP


Best regards,
Michael