X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1ddb6d28576c3ab21f80d8a3815fcccb1545961c..3814f667a0d446ca0c65d2cdc15e1688106148d7:/samples/scroll/scroll.cpp diff --git a/samples/scroll/scroll.cpp b/samples/scroll/scroll.cpp index 98a9d01dad..874783a1bb 100644 --- a/samples/scroll/scroll.cpp +++ b/samples/scroll/scroll.cpp @@ -22,6 +22,10 @@ #include "wx/log.h" #include "wx/tglbtn.h" +#ifndef __WXMSW__ + #include "../sample.xpm" +#endif + // ---------------------------------------------------------------------------- // a trivial example // ---------------------------------------------------------------------------- @@ -854,6 +858,8 @@ END_EVENT_TABLE() MyFrame::MyFrame() : wxFrame(NULL, wxID_ANY, "wxWidgets scroll sample") { + SetIcon(wxICON(sample)); + wxMenu *menuFile = new wxMenu; menuFile->Append(wxID_ABOUT, "&About.."); menuFile->AppendSeparator(); @@ -1234,7 +1240,7 @@ void MyAutoScrollingWindow::OnDraw(wxDC& dc) dc.SetPen(*wxTRANSPARENT_PEN); const wxString str = sm_testData; size_t strLength = str.length(); - wxString::const_iterator str_i; + wxString::const_iterator str_i = str.begin(); // draw the characters // 1. for each update region @@ -1308,7 +1314,7 @@ void MyAutoScrollingWindow::OnMouseMove(wxMouseEvent& event) // set the new cursor position m_cursor = DeviceCoordsToGraphicalChars(event.GetPosition()); // draw/erase selection - MyRefresh(); + // MyRefresh(); // capture mouse to activate auto-scrolling if (!HasCapture()) { CaptureMouse();