Solved

CFormView displays too slow

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

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
Need Help INsttalling wget on Mavericks OS X 3 90
Separate files macro - Errors on larger data set 18 65
only14 challenge 19 68
Path of Workbook 3 59
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

932 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