Solved

WAIT Cursor in MFC Application?

Posted on 2002-06-19
7
1,878 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

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

Title # Comments Views Activity
repeatEnd java challenge 42 84
no14 challenge 14 62
Sed question 2 69
how to use laptop or pad camera in vb.net windows application 2 55
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
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.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

867 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

22 Experts available now in Live!

Get 1:1 Help Now