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 __WXDEBUG__ debug mode.\n");
58
printf("If you read this then _DEBUG is defined.\n");
62
wxString s = wxT("Hello, world!");
64
printf("Length of string is: %d\n", len);
66
//Force testing of Unicode mode
68
wprintf(L"Unicode: %s \n", s.c_str());
69
wprintf(:"Char: %c\n", ch);
71
printf("ANSI: %s \n", s.c_str());
72
printf("Char: %c\n", ch);