5 static void TestDirEnumHelper(wxDir
& dir
,
6 int flags
= wxDIR_DEFAULT
,
7 const wxString
& filespec
= wxEmptyString
)
11 if ( !dir
.IsOpened() )
14 bool cont
= dir
.GetFirst(&filename
, filespec
, flags
);
17 wxPrintf(_T("\t%s\n"), filename
.c_str());
19 cont
= dir
.GetNext(&filename
);
26 //----------------------------------------------------------------------------
28 //----------------------------------------------------------------------------
30 class MyApp
: public wxApp
48 //test a directory that exist:
49 wxDir
dir(wxT(".")); //wxDir dir("/tmp");
50 TestDirEnumHelper(dir
, wxDIR_DEFAULT
| wxDIR_DOTDOT
);
52 //Testing if link to wx debug library
54 printf("If you read this you're in debug mode.\n");
58 wxString s
= wxT("Hello, world!");
60 printf("Length of string is: %d\n", len
);
62 //Force testing of Unicode mode
64 wprintf(L
"Unicode: %s \n", s
.c_str());
65 wprintf(:"Char: %c\n", ch
);
67 printf("ANSI: %s \n", s
.c_str());
68 printf("Char: %c\n", ch
);