<pre> <pre>void CModalitaNotturnaDlg2::OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar) { switch (nSBCode) { case SB_TOP: m_iSrcY = 0; break; case SB_BOTTOM: m_iSrcY = INT_MAX; break; case SB_THUMBPOSITION: case SB_THUMBTRACK: m_iSrcY = nPos; break; case SB_PAGEDOWN: case SB_LINEDOWN: if (m_iSrcY >= INT_MAX) { m_iSrcY = INT_MAX; return; } m_iSrcY += 10; break; case SB_PAGEUP: case SB_LINEUP: if (m_iSrcY <= (-INT_MAX)) { m_iSrcY = 0; return; } m_iSrcY -= 10; break; } m_Scroll.SetScrollPos(m_iSrcY); Invalidate(); CDialogEx::OnVScroll(nSBCode, nPos, pScrollBar); }
<pre> void CModalitaNotturnaDlg2::OnSize(UINT nType, int cx, int cy) { //if (m_Scroll.GetSafeHwnd()) //{ vert.fMask = SIF_ALL; vert.nMin = 0; vert.nMax = 200; vert.nPage = 0; vert.nTrackPos = 0; m_Scroll.SetScrollInfo(&vert); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)