Link to home
Start Free TrialLog in
Avatar of kishori
kishori

asked on

about CScrollView

Hi!
To inherit from CWnd and to do my own scroll Wnd it's a lot of job to do and I got stuck with it a bit.
  I tried to use CScrollView, by making constructor, destructor public , and in
overriden PostNcDestroy I commented
CScrollView::PostNcDestroy() and seems like it works nicely without document and frame. Still I am afraid to use it so,since it might be dangerous(inside CScrollView there might be something connected with Doc or Frame)
So, how safely to use CScrollView in this way ?
ASKER CERTIFIED SOLUTION
Avatar of mikeblas
mikeblas

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kishori
kishori

ASKER

Does it mean that I can use CScrollView-derivative safely to put it on my CWnd, by calling Create of CScrollView(rather of its CWnd-base)and using it the way CScrollView derivative is used in Doc-View app.?
             Thanks.
Yes.  You have to do some things for yourself: call OnInitialUpdate(), most notably. And you probably want to make your dialog class a friend of your view class. But it can be made to work just fine without much effort.

Obviously, you're not going to use it the way you use it in a doc-view app because there's no document!

..B ekiM