Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

CFormView displays too slow

Posted on 1998-10-15
3
Medium Priority
?
178 Views
Last Modified: 2013-11-20
I have an MDI app that contains a CFormView for its view.  This view contains many controls that are initialized when the document is opened.

When a new document is opened and initialize during application startup, it reasonably displays the view.  However everytime I create a new document from then on, it dipslays a few controls and the outline of the child frame and then finally the entire view.

How can I get this to display "all at the same time" instead of this piecemeal behavior?

Thanks.
0
Comment
Question by:solomon021499
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 7

Accepted Solution

by:
psdavis earned 600 total points
ID: 1323352
How about trying the SetRedraw function?

The format is CWnd::SetRedraw( bool bRedraw )

This member function sets or clears the redraw flag. While the redraw flag is cleared, the contents will not be updated after each change and will not be repainted until the redraw flag is set. For example, an application that needs to add several items to a list box can clear the redraw flag, add the items, and then set the redraw flag. Finally, the application can call the Invalidate or InvalidateRect member function to cause the list box to be repainted.

Phillip
0
 

Author Comment

by:solomon021499
ID: 1323353
The child frame of the view still displays much sooner than
the controls (although the controls all display simultaneously now).  Where does this Redraw go to get the frame and the entire view to display all at once?
0
 
LVL 7

Expert Comment

by:psdavis
ID: 1323354
I don't know that one.  You might try overriding the child frame's on draw as well.

Then again, you might consider just displaying a 'please wait' in the background of the child frame so that the user isn't curious what's going on.  Displaying the frame and then displaying the view isn't all that bad compared to someone pressing the button and nothing happening for a few seconds.

Phillip
0

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

722 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