Solved

WAIT Cursor in MFC Application?

Posted on 2002-06-19
7
1,892 Views
Last Modified: 2013-11-20
Hi everyone...

I am currently working on a critical project and want to display WAIT Cursor in a function.which is using type-library marshalling.

I also connect with a machine on network for accessing information from it.

I have tried every possible option which includes "CWaitCursor", "Begin/EndWaitCursor()",
"GetCapture()","SetCapture()","ReleaseCapture()".

With Best Regards...
0
Comment
Question by:Muhammad-Shakeel
7 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 25 total points
ID: 7092893
Just add a CWaitCursor instance to your function:

void LongFunction () {

CWaitCursor wc;

//...
}
0
 
LVL 32

Assisted Solution

by:jhance
jhance earned 25 total points
ID: 7092897
CWaitCursor
0
 
LVL 5

Expert Comment

by:Jan Louwerens
ID: 7094273
The constructor of the CWaitCursor displays the wait cursor, and the destructor sets it back to normal.

So in jkr's example, the CWaitCursor object is created at the beginning of the function, displaying the wait cursor.
Then, when it's destroyed after leaving the funtion, the normal cursor is displayed again.
0
 
LVL 3

Expert Comment

by:ghimireniraj
ID: 7094817

   BeginWaitCursor(); // display the hourglass cursor

   // do some lengthy processing

   EndWaitCursor(); // remove the hourglass cursor




Aren't these functions working? They belong to CCmdTarget class

--Niraj
0
 
LVL 1

Expert Comment

by:Tim_Musschoot
ID: 7120811
CWaitCursor Wait;  // Display cursor
...                // Your procedures
Wait.Restore();    // Restores the original cursor


Regards,
Tim
0

Featured Post

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

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: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

777 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