• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 276
  • Last Modified:

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 ?
0
kishori
Asked:
kishori
  • 2
1 Solution
 
mikeblasCommented:
It's safe.

CScrollView is quite independent of having a document.

..B ekiM
0
 
kishoriAuthor Commented:
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.
0
 
mikeblasCommented:
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
0

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now