HScrollInfo example for C++ 5.0 and later
void CTutorDlg::OnResizeLeadrasterview1()
{
if(!m_LEADRasterView1.m_hWnd)
return;
if(m_LEADRasterView1.GetHScrollInfo().GetVisible())
{
m_LEADRasterView1.GetHScrollInfo().SetPage(m_LEADRasterView1.GetHScrollInfo().GetMax() / 10);
m_LEADRasterView1.GetHScrollInfo().SetLine(10);
}
if(m_LEADRasterView1.GetVScrollInfo().GetVisible())
{
m_LEADRasterView1.GetVScrollInfo().SetPage(m_LEADRasterView1.GetVScrollInfo().GetMax() / 10);
m_LEADRasterView1.GetVScrollInfo().SetLine(10);
}
OutputDebugString(TEXT("*************\n"));
CString cs;
cs.Format(TEXT("HScrollMin: %d\n"), m_LEADRasterView1.GetHScrollInfo().GetMin());
OutputDebugString(cs);
cs.Format(TEXT("HScrollMax: %d\n"), m_LEADRasterView1.GetHScrollInfo().GetMax());
OutputDebugString(cs);
cs.Format(TEXT("VScrollMin: %d\n"), m_LEADRasterView1.GetVScrollInfo().GetMin());
OutputDebugString(cs);
cs.Format(TEXT("VScrollMax: %d\n"), m_LEADRasterView1.GetVScrollInfo().GetMax());
OutputDebugString(cs);
cs.Format(TEXT("-------------\n"));
OutputDebugString(cs);
cs.Format(TEXT("HScrollPage: %d\n"), m_LEADRasterView1.GetHScrollInfo().GetPage());
OutputDebugString(cs);
cs.Format(TEXT("HScrollLine: %d\n"), m_LEADRasterView1.GetHScrollInfo().GetLine());
OutputDebugString(cs);
cs.Format(TEXT("VScrollPage: %d\n"), m_LEADRasterView1.GetVScrollInfo().GetPage());
OutputDebugString(cs);
cs.Format(TEXT("VScrollLine: %d\n"), m_LEADRasterView1.GetVScrollInfo().GetLine());
OutputDebugString(cs);
cs.Format(TEXT("-------------\n"));
OutputDebugString(cs);
cs.Format(TEXT("HScrollPos: %d\n"), m_LEADRasterView1.GetHScrollInfo().GetPos());
OutputDebugString(cs);
cs.Format(TEXT("VScrollPos: %d\n"), m_LEADRasterView1.GetVScrollInfo().GetPos());
OutputDebugString(cs);
cs.Format(TEXT("-------------\n"));
OutputDebugString(cs);
cs.Format(TEXT("HScrollWidth: %f\n"), m_LEADRasterView1.GetHScrollInfo().GetWidth());
OutputDebugString(cs);
cs.Format(TEXT("VScrollWidth: %f\n"), m_LEADRasterView1.GetVScrollInfo().GetWidth());
OutputDebugString(cs);
}