Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2003-11-18
2
Medium Priority
?
390 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 375 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
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…
Progress

772 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