Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

How to disable the mouse input in CView?

Posted on 2003-04-01
7
Medium Priority
?
229 Views
Last Modified: 2013-11-20
I use BeginWaitCursor() and EndWaitCursor() to set the cursor as an hourglass when I am opening many files in my application. Now I want to disable the mouse input of all the views when I am opening files. How can I do that? Can I get the information of the cursor to decide whether the mouse input is valid, that is, if the cursor is an hourglass, the view cannot be updated and cannot receive any mouse message? Or is there a better way to do it? Thank you!!! :1
0
Comment
Question by:Xiaoyang
  • 2
4 Comments
 
LVL 3

Expert Comment

by:Nosfedra
ID: 8246922
Why trying to see if the cursor is a hour-glass? I think it would be better and simpler to set a global variable or a member in your MainFrame class that would indicate that currently there is a time-consuming file operation in progress.

You'd clear that variable (set it to false, for instance) once the operation is done.

Then, override the OnUpdate member of your view class and check for the variable. If it is true (fileOpInProgress), don't do anything.

Hope this helps.
--Razvan
0
 
LVL 12

Accepted Solution

by:
williamcampbell earned 300 total points
ID: 8247983

  You can disable all the mouse input by creating a hidden control and using SetCapture.

  pMyHiddenEdit->SetCapture ();

  no all mouse input will go to *only* that window. when you operation is done

  pMyHiddenEdit->ReleaseCapture ();

 

 
0
 

Author Comment

by:Xiaoyang
ID: 8254801
Thank you so much, guys :)
0
 
LVL 12

Expert Comment

by:williamcampbell
ID: 8255089

 Your welcome .. Small matter of accepting answer :)
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Suggested Courses

571 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