Solved

MFC Start Up Dialog that display loading information

Posted on 2003-12-09
3
586 Views
Last Modified: 2013-11-20
Hi.

I am kind of new to MFC, currently working on a Diary program.
The current implementation is that I put the loading function in OnInitialUpdate of the CRichEditView class. The problem is that the Diary application won't display until all the entries are loaded in memory, and this is a big problem for me. As entries gets above 200,000 char, there is a lag.

Right now, there is two solution that I need help on, either is fine.
1. I want to create some sort of start up dialog that displays loading information. Then closes itself once everything is done, and go straight to the Application.
Problem: How do to make something like that?

or

2. Display the application first, then load the function, and uses the CProgressbar to display the information.
Problem: I got the progressbar working, but I don't know how to call the load function automatically after the application is displayed. OninitialUdpate doesn't work, what should I do?

Thank you very much
The source code is at http://www.rpi.edu/~ningc

Alan
0
Comment
Question by:askldjd
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
luvjd earned 250 total points
ID: 9910018
Hi...
Check thefollowing link..
What u r looking for is a splash screen..u can get many implementations similar to this if u search for "splash screen "

http://www.codeproject.com/dialog/splasher.asp?target=splash%7Cscreen%7C%2Bmfc

Luv..
Jd..
0
 
LVL 1

Expert Comment

by:luvjd
ID: 9910067
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 9910900
I would do the following.
Start your app.
In the OnInitialUpdate of the view start a timer (eg. SetTimer(1, 10, NULL)) with a small interval and disbale the main window (AfxGetMainWnd()->EnableWindow(false))
In the timer handler in your view
KillTimer(1);
Start loading your diary
When loading is finished / when error ocurrs then free up the main window (AfxGetMainWnd()->EnableWindow(true)).
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
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.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

744 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

15 Experts available now in Live!

Get 1:1 Help Now