Solved

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

Posted on 2003-11-18
2
351 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Device same like our heart 12 86
egit plugin on eclipse 8 64
Help Required 3 97
Selenium docs api java index 3 15
This is an explanation of a simple data model to help parse a JSON feed
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
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…

809 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