Available in the LEADTOOLS Imaging toolkit. |
HScrollInfo example for C++ 4.0 and later
void CMfcdemoView::OnResizeLeadctrl1()
{
if(!m_Lead.m_hWnd)
return;
if(m_Lead.GetHScrollInfo().GetVisible())
{
m_Lead.GetHScrollInfo().SetPage(m_Lead.GetHScrollInfo().GetMax() / 10);
m_Lead.GetHScrollInfo().SetLine(10);
}
if(m_Lead.GetVScrollInfo().GetVisible())
{
m_Lead.GetVScrollInfo().SetPage(m_Lead.GetVScrollInfo().GetMax() / 10);
m_Lead.GetVScrollInfo().SetLine(10);
}
OutputDebugString("*************\n");
CString cs;
cs.Format("HScrollMin: %d\n", m_Lead.GetHScrollInfo().GetMin());
OutputDebugString(cs);
cs.Format("HScrollMax: %d\n", m_Lead.GetHScrollInfo().GetMax());
OutputDebugString(cs);
cs.Format("VScrollMin: %d\n", m_Lead.GetVScrollInfo().GetMin());
OutputDebugString(cs);
cs.Format("VScrollMax: %d\n", m_Lead.GetVScrollInfo().GetMax());
OutputDebugString(cs);
cs.Format("-------------\n");
OutputDebugString(cs);
cs.Format("HScrollPage: %d\n", m_Lead.GetHScrollInfo().GetPage());
OutputDebugString(cs);
cs.Format("HScrollLine: %d\n", m_Lead.GetHScrollInfo().GetLine());
OutputDebugString(cs);
cs.Format("VScrollPage: %d\n", m_Lead.GetVScrollInfo().GetPage());
OutputDebugString(cs);
cs.Format("VScrollLine: %d\n", m_Lead.GetVScrollInfo().GetLine());
OutputDebugString(cs);
cs.Format("-------------\n");
OutputDebugString(cs);
cs.Format("HScrollPos: %d\n", m_Lead.GetHScrollInfo().GetPos());
OutputDebugString(cs);
cs.Format("VScrollPos: %d\n", m_Lead.GetVScrollInfo().GetPos());
OutputDebugString(cs);
cs.Format("-------------\n");
OutputDebugString(cs);
cs.Format("HScrollWidth: %f\n", m_Lead.GetHScrollInfo().GetWidth());
OutputDebugString(cs);
cs.Format("VScrollWidth: %f\n", m_Lead.GetVScrollInfo().GetWidth());
OutputDebugString(cs);
}