|
-
May 20th, 1999, 11:14 AM
#1
Converting CView to CScrollView
Hi,
Can someone tell me the steps to convert a class derived from CView to one derived from CScrollView (without rebuilding the whole app using appwizard, if possible). I want the scroll bars in my application to work.
Thanks
regards,
mc
-
May 20th, 1999, 11:25 AM
#2
Re: Converting CView to CScrollView
Go and have a look at the help section on CScrollBar::Create. You d'ont have to canvert anything, you just have to add the bars to your view.
-
May 20th, 1999, 02:19 PM
#3
Re: Converting CView to CScrollView
Another way you can do this is wherever you see the word CView, replace it with CScrollView. That should do it, I think.
-
May 21st, 1999, 03:57 PM
#4
Re: Converting CView to CScrollView
No replacing CView with CScrollView alone will not work...some more adjustments have to be made (that I don't know of)...
thanks.
mc
-
April 6th, 2009, 04:17 PM
#5
Re: Converting CView to CScrollView
1. Everywhere you see CView change it to CScrollView.
2. Add the following to the void CYOURNAMEView::OnInitialUpdate()
// TODO: calculate the total size of this view
CSize sizeTotal;
sizeTotal.cx = sizeTotal.cy = 100;
SetScrollSizes(MM_TEXT, sizeTotal);
That seems to be the only difference between an app wizard generated CScrollView app and and an app wizard generated CView app.
Then you need to make all the changes that deal with scrolling.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|