Original Post
I want to implement scrollbars for openGl scene That what I’m doing: IMPLEMENT_DYNCREATE(COglView, CScrollView) void COglView::OnInitialUpdate() { CScrollView::OnInitialUpdate(); CSize sizeTotal; CRect clientRec; GetClientRect(clientRec); sizeTotal = GetTotalSize(); sizeTotal.cx = (clientRec.Width())*m_GLManager.GetScaleFactor(); sizeTotal.cy = (clientRec.Height())*m_GLManager.GetScaleFactor(); SetScrollSizes(MM_TEXT, sizeTotal); } OnZoomin function: m_scalefactor += 0.1; OnDrawScene function glScalef(m_scalefactor,m_scalefactor,m_scalefactor); to “scroll” the scene I’m using glTranslatef(m_TranslateX,m_TranslateY,m_TranslateZ); Now my question how to find the relationship between position of the scroll bar and how I should increase/decrease m_TranslateX and m_TranslateY parameters ??? Please help me, it’s really urgent . Thank you. P.S some example could be very help