void CMy1021Dlg::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
{
// TODO: Add your message handler code here and/or call default
int nDelta;
switch(nSBCode)
{
case SB_LINELEFT:
nDelta=-LINESIZE;
break;
case SB_PAGELEFT:
nDelta=-m_nHPageSize;
break;
case SB_THUMBTRACK:
nDelta=(int)nPos-m_nHScrollPos;
break;
case SB_PAGERIGHT:
nDelta=m_nHPageSize;
break;
case SB_LINERIGHT:
nDelta=LINESIZE;
break;
default:
return;
}
int nScrollPos=m_nHScrollPos+nDelta;
int nMaxPos=m_nViewWidth-m_nHPageSize;
SetScrollInfo(SB_VERT,&si,TRUE);
// TODO: Add your message handler code here
}
///////////////////////////////////////////////////////////////////
int m_nCellWidth;
int m_nCellHeight;
int m_nRibbonWidth;
int m_nViewWidth;
int m_nViewHeight;
int m_nHScrollPos;
int m_nVScrollPos;
int m_nHPageSize;
int m_nVPageSize;