Fixed bug preventing dir enumeration from working on WinCE

Prevented crash on WinCE by removing hidden root style
(a bug in Windows causes crash in child traversal/data retrieval)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33278 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2005-04-02 17:38:14 +00:00
parent 0906c58d05
commit 3bd8a40543

View File

@@ -524,7 +524,13 @@ bool wxGenericDirCtrl::Create(wxWindow *parent,
Init();
long treeStyle = wxTR_HAS_BUTTONS | wxTR_HIDE_ROOT;
long treeStyle = wxTR_HAS_BUTTONS;
// On Windows CE, if you hide the root, you get a crash when
// attempting to access data for children of the root item.
#ifndef __WXWINCE__
treeStyle |= wxTR_HIDE_ROOT;
#endif
#ifdef __WXGTK20__
treeStyle |= wxTR_NO_LINES;
@@ -771,7 +777,7 @@ void wxGenericDirCtrl::ExpandDir(wxTreeItemId parentId)
wxString dirName(data->m_path);
#if defined(__WINDOWS__) || defined(__DOS__) || defined(__OS2__)
#if (defined(__WINDOWS__) && !defined(__WXWINCE__)) || defined(__DOS__) || defined(__OS2__)
// Check if this is a root directory and if so,
// whether the drive is avaiable.
if (!wxIsDriveAvailable(dirName))