Solved

MFC Start Up Dialog that display loading information

Posted on 2003-12-09
3
587 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

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

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: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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 is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

920 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

16 Experts available now in Live!

Get 1:1 Help Now