Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
groupNoAdj 7 86
How to get boolean result of md5sum from two files in powershell 8 72
Program to display an alert on Windows Toolbar 2 71
SUM 2 INTEGER ARRAYS INTO 1 10 93
Here we come across an interesting topic of coding guidelines while designing automation test scripts. The scope of this article will not be limited to QTP but to an overall extent of using VB Scripting for automation projects. Introduction Now…
A short article about a problem I had getting the GPS LocationListener working.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
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…

895 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

14 Experts available now in Live!

Get 1:1 Help Now