我想在对话框中显示一张图,因为图比较大,需用到CScrollview,可是用下列语句实现后,滚动条不能动,为什么呢???
CScrollView *pView = (CScrollView* )RUNTIME_CLASS(bmp272)->CreateObject(); pView->Create(NULL, NULL, AFX_WS_DEFAULT_VIEW, CRect(5,5,590,620), this, IDB_BITMAP17); pView->ShowWindow(SW_SHOW); pView->OnInitialUpdate(); CSize sizeTotal; CBitmap bmp; bmp.LoadBitmap(IDB_BITMAP17); BITMAP bmpstr; bmp.GetBitmap(&bmpstr); sizeTotal.cx = bmpstr.bmWidth; sizeTotal.cy = bmpstr.bmHeight; pView->SetScrollSizes(MM_TEXT, sizeTotal); |