Solved

MFC Start Up Dialog that display loading information

Posted on 2003-12-09
3
602 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

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…
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.

739 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