CScrollBar is gettin' uppity!

The problem: When trying to view large documents in CScrollView, the scrollbar's range isn't enough.

The formula: to find the range i use numberoflines * pixelheightofchar.

This doesn't seem to do it when using SetScrollSizes in OnInitialUpdate. It DOES work using SCROLLINFO and SetScrollInfo, but then I lose thumbtracking (without more work to code it in). What gives with SetScrollSizes? Is there some limitation that isn't in the documentation?

Comments

  • : The problem: When trying to view large documents in CScrollView, the scrollbar's range isn't enough.
    :
    : The formula: to find the range i use numberoflines * pixelheightofchar.
    :
    : This doesn't seem to do it when using SetScrollSizes in OnInitialUpdate. It DOES work using SCROLLINFO and SetScrollInfo, but then I lose thumbtracking (without more work to code it in). What gives with SetScrollSizes? Is there some limitation that isn't in the documentation?
    :
    [blue]You should scroll by lines, not by pixels. The scroll range in text documents is: [0..line count of the document].[/blue]
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion