Scrollbar range
-
Hi. I have set the scrollbar range from 0 to 9900 to accomodate the original graph. But I have a few radio buttons which reduce the size of the graph. The problem is when I reduce the size of the graph and scroll right to the back of the graph, there is this empty space. I know the scrollbar range is smaller but how to I change this range when the radio button is clicked? Thanks.
-
Hi. I have set the scrollbar range from 0 to 9900 to accomodate the original graph. But I have a few radio buttons which reduce the size of the graph. The problem is when I reduce the size of the graph and scroll right to the back of the graph, there is this empty space. I know the scrollbar range is smaller but how to I change this range when the radio button is clicked? Thanks.
Hi, try this: CSize sizeTotal; sizeTotal.cx = ????; sizeTotal.cy = ????; SetScrollSizes(MM_TEXT, sizeTotal); Where the ???? put the values you need.
Greetings. -------- M.D.V. If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
-
Hi, try this: CSize sizeTotal; sizeTotal.cx = ????; sizeTotal.cy = ????; SetScrollSizes(MM_TEXT, sizeTotal); Where the ???? put the values you need.
Greetings. -------- M.D.V. If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
-
but this can only be used if you are using CScrollview? Im using CFormView with a scrollbar control, used to control a picture control.
Ok, I thought that would make you think a bit :P From VC++ Help: CScrollBar::SetScrollRange void SetScrollRange( int nMinPos, int nMaxPos, BOOL bRedraw = TRUE ); Parameters nMinPos: Specifies the minimum scrolling position. nMaxPos: Specifies the maximum scrolling position. bRedraw: Specifies whether the scroll bar should be redrawn to reflect the change. If bRedraw is TRUE, the scroll bar is redrawn; if FALSE, it is not redrawn. It is redrawn by default. And when you check your radio button, set it another time with bRedraw TRUE to force the redraw of the scrollbar
Greetings. -------- M.D.V. If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?