Frame::Frame(const wxString& title)
: wxFrame(NULL, wxID_ANY, title, wxDefaultPosition, wxSize(640,480))
{
wxBoxSizer * topSizer = new wxBoxSizer(wxHORIZONTAL);
topSizer->Add(new Canvas(this), 1, wxEXPAND);
SetSizer(topSizer);
topSizer->FitInside(this);
}
Canvas::Canvas( wxWindow * parent ) :
wxScrolledWindow( parent, wxID_ANY )
{
if ( wxFileExists( wxT("dpd_test.tif") ) )
{
::wxInitAllImageHandlers();
POD_Image.LoadFile( wxT("dpd_test.tif") );
}
if ( POD_Image.Ok() )
{
wxBoxSizer * topSizer = new wxBoxSizer(wxBOTH);
topSizer->Add(
new wxStaticBitmap( this, wxID_ANY, wxBitmap(POD_Image) ),
1,
wxEXPAND );
SetSizer( topSizer );
topSizer->SetSizeHints(this);
}
}
Now my image is (GetVirtualSize() -> w1728, h2273)... And my screen is w640,h480... Now the "viewsize" is ofcourse not equal to the real size. But how can I show scrollbars? Aren't they supposed to show up automagically?------------------------ Website: www.KaReLs0ft.be |