Solved

CFormView displays too slow

Posted on 1998-10-15
3
169 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
VB.NET how to use the Vertical ScrollBar 5 87
Separate into files by filename 12 66
Path of Workbook 3 45
Problem to open Excel file 15 39
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
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.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

708 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

12 Experts available now in Live!

Get 1:1 Help Now