Solved

WaitCursor, display over function scope

Posted on 1998-09-30
3
196 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
maven archtype selection in eclipse 1 57
sum67 challenge 35 110
Execute multiple curl cmds with sleep and send output to file 10 104
Way to decrease size of apk file 9 88
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
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…
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.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

820 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