?
Solved

WAIT Cursor in MFC Application?

Posted on 2002-06-19
7
Medium Priority
?
2,001 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
[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
7 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 100 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 100 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

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

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…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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 this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

765 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