X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6ab069f2b68cd266b31122d6a73a0878fd4760fe..30738aae14dfbce0c492d8696c861947228028c2:/samples/text/text.cpp diff --git a/samples/text/text.cpp b/samples/text/text.cpp index ce77e8de8c..bf9b9dc253 100644 --- a/samples/text/text.cpp +++ b/samples/text/text.cpp @@ -921,6 +921,10 @@ void MyTextCtrl::OnKeyDown(wxKeyEvent& event) wxLogMessage(_T("Selection = '%s' (len = %u)"), sel.c_str(), (unsigned int) sel.length()); + + const wxString text = GetLineText(line); + wxLogMessage(_T("Current line: \"%s\"; length = %lu"), + text.c_str(), text.length()); } break; @@ -1036,7 +1040,7 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h ) // a little hack to use the command line argument for encoding testing if ( wxTheApp->argc == 2 ) { - switch ( wxTheApp->argv[1][0] ) + switch ( (wxChar)wxTheApp->argv[1][0] ) { case '2': m_horizontal->SetFont(wxFont(18, wxSWISS, wxNORMAL, wxNORMAL, @@ -1828,10 +1832,9 @@ void RichTextFrame::OnIdle(wxIdleEvent& WXUNUSED(event)) alignment = wxT("left-aligned"); else if (attr.GetAlignment() == wxTEXT_ALIGNMENT_JUSTIFIED) alignment = wxT("justified"); - msg.Printf(wxT("Facename: %s, wxColour(%d, %d, %d), %s"), - (const wxChar*) facename, + msg.Printf( "Facename: %s, wxColour(%d, %d, %d), %s", facename, attr.GetTextColour().Red(), attr.GetTextColour().Green(), attr.GetTextColour().Blue(), - (const wxChar*) alignment); + alignment ); if (attr.HasFont()) {