Muhammad-Shakeel
asked on
WAIT Cursor in MFC Application?
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 ()","Relea seCapture( )".
With Best Regards...
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
With Best Regards...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
CWaitCursor Wait; // Display cursor
... // Your procedures
Wait.Restore(); // Restores the original cursor
Regards,
Tim
... // Your procedures
Wait.Restore(); // Restores the original cursor
Regards,
Tim
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.