Solved

How to make changing from base class view to scrollview using MFC?

Posted on 2003-11-18
2
368 Views
Last Modified: 2010-04-17
I have made a programm of view/document model. But now it is needed to replace view with scrollview . I modified view class by replacing base of common view with SCrollView by hand . And I changed message mapping  and some other resource code. The result of modification is that the file can pass through compiling and linking,but occured the following errors when runing.
  Debug Assertion Failed!
  program:\Degug\My_file.exe
  File:viewscrl.cpp
  Line:220
0
Comment
Question by:cdq_chance
2 Comments
 
LVL 3

Accepted Solution

by:
freewell earned 125 total points
ID: 9776401
You are required to handle the  OnInitialUpdate() of ScrollView
void CMyScrollView::OnInitialUpdate()
{
      CScrollView::OnInitialUpdate();

      CSize sizeTotal(100,100);
      // TODO: calculate the total size of this view
      SetScrollSizes(MM_TEXT, sizeTotal);
}
0
 

Author Comment

by:cdq_chance
ID: 9785119
I am very appreciative for your comments.you give me some information for dealing with this question.In fact, I did what you wrote before, but I couldn't solve the problem.Now,I have solved it by the instruction of my companion.My mistakes lie in the second parameter of function SetScrollSizes(). I applied a action to provide a value of the second  parameter and the method is wrong.
Thanks for your comments. Could you tell me your email address? wish you all best.

                                    cdq_chance
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an explanation of a simple data model to help parse a JSON feed
This is about my first experience with programming Arduino.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question