[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

VC++, nice way to show that an intern calculation is in progress.

Posted on 1998-09-01
7
Medium Priority
?
266 Views
Last Modified: 2012-05-05
I made a VC++ application that displays some calculations results, these calculations can take 4 or 5 seconds and I would like to use something different than the progress control to make the user waiting.
thanks,
m3.
0
Comment
Question by:m3
[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
  • 3
  • 2
  • 2
7 Comments
 
LVL 2

Expert Comment

by:duneram
ID: 1171832
Normally you would display a progress bar  you know the blue rectangle that slowly fills up the edit control?

You can use the CProgressCtrl to accomplish it
0
 
LVL 2

Expert Comment

by:duneram
ID: 1171833
In the old days before the creation of this class, people used to make a Edit control and then slowly select more and more of the text to give the appearance of having the blue bar grow from left to right until it was at the end point.
0
 
LVL 8

Expert Comment

by:Answers2000
ID: 1171834
Progress Controls are the usual, but as you've indicated you don't want one.  

How about an AVI, you can play these pretty easily using the CAnimateCtrl class, and it won't be too unusual as plenty of other apps play these when busy (e.g. Find Files).

If you pick something really bizarre, expect user confusion or compliants.
0
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!

 

Author Comment

by:m3
ID: 1171835
It doesn't an alternative solution.
0
 
LVL 8

Expert Comment

by:Answers2000
ID: 1171836
m3 can you explain a bit more about what you want.  Your comment is particularly cryptic to me, as I thought CAnimateCtrl was an alternative.

If you don't like this why not
EITHER
(i) Show the results as they become available
OR
(ii) Update the text in the dialog/status bar with messages indicating what's happening, e.g.
"Adding numbers"
after 1 second this changes to
"Doing Y"
after 1 second this changes to
"Doing Z and totalling"
etc.

0
 

Author Comment

by:m3
ID: 1171837
I'm intersted in that control, do you have any example of how can I use this control?
Thanks,
m3.
0
 
LVL 8

Accepted Solution

by:
Answers2000 earned 20 total points
ID: 1171838
OK, steps :

1. First get your AVI file.  Needs to be small 16 color, looping and fit within the other limitations of the control (these are documented in the MS Dev help).

2. Add an "AVI" resource
i. Right click on the resource pane in Dev Studio
ii. Click Import menu
iii. Browse the file name and press Import button
iv. Select a resource type of "AVI".
You should now have a folder in your resource tree called "AVI" with an item under it labelled something like IDR_AVI1.  When you click on this item you have loads of hex (don't worry this is binary-ized version of the AVI contents).

3. Code, I'll give an example for sticking one on a dialog box
i. Bring up the dialog you want to add it to
ii. Click the Animate icon on the dialog controls toolbar (looks live a little bit of a movie film)
iii. Drag out the control where you want it.
iv. Press Ctrl-W to bring up class wizard
v. On member variables tab you'll see the control listed as something like IDC_ANIMATE1
vi. Double click on the name and call it some name like m_animate (of type CAnimateCtrl)
vii. To play the AVI add to the code something like:
    m_animate.Open( IDR_AVI1 ); // open the avi resource.
    m_animate.Play( 0, -1,-1 );//play avi resource.      
First param (0) means play from first frame
Second param (-1) means play to the end
Third param (-1) means keep playing for ever
viii. When you want to stop playing the AVI simply call Stop, example:
m_animate.Stop() ;

0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses

649 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