X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2ab25aca26bffe363b1f76623c736602a70eb56f..b911bc32a17f592214fcc37bb942ad3f355e6893:/samples/typetest/typetest.cpp diff --git a/samples/typetest/typetest.cpp b/samples/typetest/typetest.cpp index 4d8ab2866d..71507f11a1 100644 --- a/samples/typetest/typetest.cpp +++ b/samples/typetest/typetest.cpp @@ -1052,6 +1052,15 @@ void MyApp::DoVariantDemo(wxCommandEvent& WXUNUSED(event) ) { textCtrl << _T("var1[") << (int) i << _T("] (type ") << var1[i].GetType() << _T(") = ") << var1[i].MakeString() << _T("\n"); } + + var1 = wxVariant(new wxFont(wxSystemSettings::GetFont(wxSYS_OEM_FIXED_FONT))); + textCtrl << _T("var1 = (wxfont)\""); + wxFont* font = wxGetVariantCast(var1,wxFont); + if (font) { + textCtrl << font->GetNativeFontInfoDesc() << _T("\"\n"); + } else { + textCtrl << _T("(null)\"\n"); + } } BEGIN_EVENT_TABLE(MyFrame, wxFrame)