void CSoundAnimDlg::updateScroll(uint pos, uint min, uint max) { CScrollBar* scroll = (CScrollBar*) GetDlgItem(IDC_SOUND_ANIM_SCROLLBAR); scroll->SetScrollRange(min, max, FALSE); scroll->SetScrollPos(pos, TRUE); }
void CBCGPMSOffice2007DemoView::OnENVScroll() { CScrollBar* pScrollBar = ((CMainFrame*) GetTopLevelFrame ())->GetScrollBar (); if (pScrollBar->GetSafeHwnd () != NULL) { ASSERT_VALID (pScrollBar); CPoint ptScroll (0, 0); SendMessage (EM_GETSCROLLPOS, 0, (LPARAM) &ptScroll); pScrollBar->SetScrollPos (ptScroll.y); } }