Solved

CFormView displays too slow

Posted on 1998-10-15
3
174 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
  • 2
3 Comments
 
LVL 7

Accepted Solution

by:
psdavis earned 200 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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Turn a spreadsheet into a vba executable. 2 96
ODBC Connection Logging, ADO.NET 6 69
iSeries DB2 Query 2 97
Can not remove SSL certificate on iPhone 6 - iOS10.2 12 882
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.

820 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