X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/779e28da630ef9fba6441fb0bab01cd538a7e7bb..89b3361ec25cf1e6d255b14c7633d8375646e4fb:/samples/grid/griddemo.cpp?ds=sidebyside diff --git a/samples/grid/griddemo.cpp b/samples/grid/griddemo.cpp index c331a34845..2b3ba6df60 100644 --- a/samples/grid/griddemo.cpp +++ b/samples/grid/griddemo.cpp @@ -2220,7 +2220,6 @@ void GridFrame::OnGridRender( wxCommandEvent& event ) if ( useLometric ) { memDc.SetMapMode( wxMM_LOMETRIC ); - wxSize sizePPI = memDc.GetPPI(); sizeRender.x = memDc.DeviceToLogicalXRel( sizeRender.x ); sizeRender.y = memDc.DeviceToLogicalYRel( sizeRender.y ); } @@ -2237,7 +2236,10 @@ void GridFrame::OnGridRender( wxCommandEvent& event ) m_gridBitmap = bmp; - canvas->Bind( wxEVT_PAINT, &GridFrame::OnRenderPaint, this ); + canvas->Connect( wxEVT_PAINT, + wxPaintEventHandler(GridFrame::OnRenderPaint), + NULL, + this ); frame->Show(); }