Solved

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

Posted on 2003-11-18
2
330 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
Comment Utility
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
Comment Utility
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now