SetScrollInfo
-
Hello! It seems to me that setscrollinfo both updates the position of the thumb and scrolls the window. this annoys me very much because I want to scroll the window, and setscrollpos just ruins everything.. Is there a function that only sets the position of the thumb? I'm using mfc.
-
Hello! It seems to me that setscrollinfo both updates the position of the thumb and scrolls the window. this annoys me very much because I want to scroll the window, and setscrollpos just ruins everything.. Is there a function that only sets the position of the thumb? I'm using mfc.
You could try calling the API-version
::SetScrollInfo
. -
Hello! It seems to me that setscrollinfo both updates the position of the thumb and scrolls the window. this annoys me very much because I want to scroll the window, and setscrollpos just ruins everything.. Is there a function that only sets the position of the thumb? I'm using mfc.
If i recall, position of the thumb is always relative to other information. if Min is 0 and Max is 100, and pos is 50, then thumb position will be 50%. The scrollbar is probably attached to the document you're viewing so its normal that changing the pos or scrollinfo will move the view of the document. Why are you trying to change only the thumb position ? DarkByte
-
If i recall, position of the thumb is always relative to other information. if Min is 0 and Max is 100, and pos is 50, then thumb position will be 50%. The scrollbar is probably attached to the document you're viewing so its normal that changing the pos or scrollinfo will move the view of the document. Why are you trying to change only the thumb position ? DarkByte
-
Because I'm writing an application that behaves like mspaint, and I use SetViewportOrg for scrolling.. Do you have a better suggestion?
How about you create the scrollbar yourself instead of relying on the scrollbars of the window. You could even subclass the scrollbar to add your behavior. Other possibility is to control the repainting behavior so that you decide yourself when you try to repaint offsetted and when you dont. There's probably many other different ways, but they all involve changing some default behavior somwhere. DarkByte
-
How about you create the scrollbar yourself instead of relying on the scrollbars of the window. You could even subclass the scrollbar to add your behavior. Other possibility is to control the repainting behavior so that you decide yourself when you try to repaint offsetted and when you dont. There's probably many other different ways, but they all involve changing some default behavior somwhere. DarkByte