virtual BOOL CView::OnScroll( UINT nScrollCode, UINT nPos, BOOL bDoScroll = TRUE );
Return Value
If bDoScroll is TRUE and the view was actually scrolled, then return nonzero; otherwise 0. If bDoScroll is FALSE, then return the value that you would have returned if bDoScroll were TRUE, even though you don’t actually do the scrolling.
Parameters
nScrollCode
A scroll-bar code that indicates the user’s scrolling request. This parameter is composed of two parts: a low-order byte, which determines the type of scrolling occurring horizontally, and a high-order byte, which determines the type of scrolling occurring vertically:
nPos
Contains the current scroll-box position if the scroll-bar code is SB_THUMBTRACK; otherwise it is not used. Depending on the initial scroll range, nPos may be negative and should be cast to an int if necessary.
bDoScroll
Determines whether you should actually do the specified scrolling action. If TRUE, then scrolling should take place; if FALSE, then scrolling should not occur.
Remarks
Called by the framework to determine whether scrolling is possible.
In one case this function is called by the framework with bDoScroll set to TRUE when the view receives a scrollbar message. In this case, you should actually scroll the view. In the other case this function is called with bDoScroll set to FALSE when an OLE item is initially dragged into the auto-scrolling region of a drop target before scrolling actually takes place. In this case, you should not actually scroll the view.
CView Overview | Class Members | Hierarchy Chart
See Also CView::OnScrollBy, COleClientItem