About scrollbar of CScrollView
-
CScrollView is a derived class of MFC supporting scroll.When size of document is bigger than size ofviewport,CScrollView will display scroll automatially. How can Hide the scrollbar(s) and i can still scroll the view by such as mousewheel events in this case. Is there any derived class of Cview to complete the same function(supporting scroll but not showing the scrollbar).
-
CScrollView is a derived class of MFC supporting scroll.When size of document is bigger than size ofviewport,CScrollView will display scroll automatially. How can Hide the scrollbar(s) and i can still scroll the view by such as mousewheel events in this case. Is there any derived class of Cview to complete the same function(supporting scroll but not showing the scrollbar).
Why in the world would you want to contradict standard Windows usability and provide scrolling without a scrollbar? Why would your users want to re-learn how to scroll, just for your application? Then, have to deal with different mouse gestures as they switch between your applications and all other Windows applications? What happens if your users don't have mouse with a scroll wheel? CScrollView-derived views cannot simply have their scroll bars "hidden"; they are integral to the window. You would probably have to override the non-client size calculations and drawing. PeterRitchie.com
-
Why in the world would you want to contradict standard Windows usability and provide scrolling without a scrollbar? Why would your users want to re-learn how to scroll, just for your application? Then, have to deal with different mouse gestures as they switch between your applications and all other Windows applications? What happens if your users don't have mouse with a scroll wheel? CScrollView-derived views cannot simply have their scroll bars "hidden"; they are integral to the window. You would probably have to override the non-client size calculations and drawing. PeterRitchie.com
In fact, i want to own a style like ACDsee viewer, users can move the content by drag mouse, but not by scroll the scrollbars. In my derived class of CScrollView, i have complete for it, but i cann't get rid of the scrollbars, it ocuppy the area of use's content.
-
In fact, i want to own a style like ACDsee viewer, users can move the content by drag mouse, but not by scroll the scrollbars. In my derived class of CScrollView, i have complete for it, but i cann't get rid of the scrollbars, it ocuppy the area of use's content.
Then just use CView and handle all the scrolling yourself.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03 "Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04 Within you lies the power for good - Use it!
Honoured as one of The Most Helpful Members of 2004
-
Then just use CView and handle all the scrolling yourself.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03 "Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04 Within you lies the power for good - Use it!
Honoured as one of The Most Helpful Members of 2004
-
CView is derived from CWnd and is the base class of CScrollView and CCtrlView. Since what you are asking for is non-standard behaviour I doubt there is a readily available class that does what you want, but there might be if you search long and hard enough. You said you had it working with CScrollView, just the scroll bars were giving you trouble. It shouldn't be too difficult to derive a class from CView that does what you want. Just take the parts from CScrollView that you can use, and ignore or modify the parts you can't use.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03 "Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04 Within you lies the power for good - Use it!
Honoured as one of The Most Helpful Members of 2004