diff --git a/samples/stc/stctest.cpp b/samples/stc/stctest.cpp index 8db40419ef..ff590d1b12 100644 --- a/samples/stc/stctest.cpp +++ b/samples/stc/stctest.cpp @@ -330,6 +330,7 @@ AppFrame::AppFrame (const wxString &title) m_edit->SetFocus(); FileOpen (wxT("stctest.cpp")); + m_edit->SetSelection(0,0); } AppFrame::~AppFrame () { diff --git a/src/stc/PlatWX.cpp b/src/stc/PlatWX.cpp index 0a774a063c..af67c0cdaa 100644 --- a/src/stc/PlatWX.cpp +++ b/src/stc/PlatWX.cpp @@ -277,7 +277,14 @@ void SurfaceImpl::LineTo(int x_, int y_) { void SurfaceImpl::Polygon(Point *pts, int npts, ColourDesired fore, ColourDesired back) { PenColour(fore); BrushColour(back); - hdc->DrawPolygon(npts, (wxPoint*)pts); + wxPoint *p = new wxPoint[npts]; + + for (int i=0; iDrawPolygon(npts, p); + delete [] p; } void SurfaceImpl::RectangleDraw(PRectangle rc, ColourDesired fore, ColourDesired back) {