Solved

WaitCursor, display over function scope

Posted on 1998-09-30
3
195 Views
Last Modified: 2013-11-20
Hi all!

I have a function that startups a Waitcursor. After this
I use a Timer to check when a Smartcard is removed from
its reader. Of course, the Waitcursor disappears when the
first function goes out of scope.

I would like the Waitcursor to hold its Waitstate until
the timer function tells it to go back to its normal state.

I've had a look at DoWaitCursor and BeginWaitCursor EndWaitCursor functions but the Cursor still resumes its
normal pointer state when the first function goes out of scope.

Any ideas?

// Anders
0
Comment
Question by:Kalle 2
3 Comments
 
LVL 3

Accepted Solution

by:
plaroche earned 100 total points
ID: 1322739
You can try with OnSetCursor, it is called when the mouse moves over your window, or everytime if you captured the mouse cursor.

In that call check for a boolean value which your timer function will reset to FALSE.  In your timer function you might force a call to OnSetCursor since the user may not force a call to the function if he doesn't move the mouse.

The cursor comes back to normal in your case because of OnSetCursor, which resets it to normal state.
0
 
LVL 7

Expert Comment

by:psdavis
ID: 1322740
Have you considered creating the CWaitCursor on the heap?

Try this, add a CWaitCursor pointer to your header file like

CWaitCursor* m_pWaitCursor;

Now inside of your .cpp file, start the cursor with

m_pWaitCursor = new CWaitCursor;

and delete it when you're done!

delete m_pWaitCursor;
m_pWaitCursor = NULL;

Hope this works!

Phillip
0
 

Author Comment

by:Kalle 2
ID: 1322741
Ok, worked like a treat!
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

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…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

831 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