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
Solved

MFC Start Up Dialog that display loading information

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Replacement selected text 2 63
Change owner from userA to server Local Administrators 7 66
lucky13 challenge 11 154
either24  challenge 19 101
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: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

829 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