+ dc->SetBrush(*wxTRANSPARENT_BRUSH);
+
+ { // GetTextExtent demo:
+ wxString words[7] = {_T("This "), _T("is "), _T("GetTextExtent "), _T("testing "), _T("string. "), _T("Enjoy "), _T("it!")};
+ long w, h;
+ long x = 200, y= 250;
+ wxFont fnt(15, wxSWISS, wxNORMAL, wxNORMAL);
+
+ dc->SetFont(fnt);
+
+ for (int i = 0; i < 7; i++)
+ {
+ wxString word = words[i];
+ word.Remove( word.Len()-1, 1 );
+ dc->GetTextExtent(word, &w, &h);
+ dc->DrawRectangle(x, y, w, h);
+ dc->GetTextExtent(words[i], &w, &h);
+ dc->DrawText(words[i], x, y);
+ x += w;
+ }
+
+ }
+
+ dc->SetFont(wxGetApp().m_testFont);
+
+ dc->DrawText(_T("Some test text"), 200, 300 );
+