Esempio n. 1
0
void TTreeView::RecalcScroll()
{
	short h;
	long len;
	XGDraw draw(this);
	draw.SetFont(XGFont::LoadFont(1));
	
	len = fDrawList.GetSize() / sizeof(TableDrawRecord);
	h = draw.GetFontHeight() + 1;
	if (h < 17) h = 17;
	
	SetScrollLimits(fWidth,h * len,h);
}
Esempio n. 2
0
/*============================================================================*/
        void WScrollBars::
Register(CWnd *theView)							/*

        Initialize scroll bars already attached to theView.  This member
        cannot be called until the window has been created. the
	OnInitialUpdate() of the view is a good place for this call.
*-----------------------------------------------------------------------------*/
{
	  // attach the view to this object
	m_theView = theView;
 	  // set initial limits
	ScrollLimits sl(0, 100, 0, 100);
	SetScrollLimits(sl);
	  // set initial increments
	ScrollIncrements si(1, 1, 1, 1);
	SetScrollIncrements(si);
	  // hide the scroll bars until needed
        ShowHScrollBar(FALSE);
        ShowVScrollBar(FALSE);
}