CScrollBar* ver = this->GetScrollBarCtrl(SB_VERT /*SB_HOR*/);
this->CheckScrollBars(hor,ver);
void CTryToHandleView::OnInitialUpdate(){ CScrollView::OnInitialUpdate(); CSize sizeTotal; // TODO: calculate the total size of this view sizeTotal.cx = sizeTotal.cy = 2000; SetScrollSizes(MM_TEXT, sizeTotal); //try one more CScrollBar* hor2 = this->GetScrollBarCtrl(SB_VERT /*SB_BOTH*/); //try one more CScrollBar* hor1= CScrollView::GetScrollBarCtrl(SB_VERT); //try one more CWnd* pParent = GetParent(); UINT nID = AFX_IDW_HSCROLL_FIRST; CScrollBar* hor3 = CScrollView::GetScrollBarCtrl(SB_VERT); //try one more UINT nID2 = AFX_IDW_VSCROLL_FIRST; CWnd *wnd= this->GetDlgItem(nID2); //try one more CMainFrame* pFrm = (CMainFrame*)GetParent(); CScrollBar* hor5= pFrm->GetScrollBarCtrl(SB_VERT);}