Solved

Inverting the mouse in windows

Posted on 2002-03-28
4
204 Views
Last Modified: 2010-04-02
When my windows app is runnning (minimized) I want the mouse to be "inverted". When the mouse is moved up the pointer moves down and when the mouse is moved down the pointer goes up. But left and right will remain unchanged. Can anyone show me an example of how I can do this?
0
Comment
Question by:kpnkpn
  • 2
4 Comments
 
LVL 4

Accepted Solution

by:
mblat earned 100 total points
ID: 6904047
First of all if you app. is minimized you will not get any mouse messages, unless you will capture mouse input with SetCapture or TrackMouseEvent.  But then nobody else will receive them, so what is the point exactly?
Assuming that did get mouse input somehow, (let's say you've installed system hook) you need to handle WM_MOUSEMOVE message in you window.

In that event you need to compare new mouse position with old position (position of the mouse is passed as a parameter in message) and therefore detect if mouse moved up or down.

At this point you can call LoadCursor(....).  For standrad cursor you'll be able to use IDC_ARROW as a parameter, for "reversed arrow", you will need to create custom cursor.  Don't forget to free up resources, this function if poorely writen will eat up GDI resources in hurry.
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6906829
kpnkpn-->  I have refunded 100 points to you for the other 3 items inadvertently created when you posted this question and closed them for you.  

http://www.experts-exchange.com/cplusprog/Q.20282670.html
http://www.experts-exchange.com/cplusprog/Q.20282672.html
http://www.experts-exchange.com/cplusprog/Q.20282675.html 

Rather than using the browser controls (F5/Refresh or the back button), please use the Reload function of this application.  Also, hitting submit more than once can cause this problem as well.

Thanks to expert Triskelion, for bringing these to my attention so I could refund all of the above to you.

Moondancer - EE Moderator
0
 
LVL 11

Expert Comment

by:griessh
ID: 6956277
Dear kpnkpn

I think you forgot this question. I will ask Community Support to close it unless you finalize it within 7 days. You can always request to keep this question open. But remember, experts can only help you if you provide feedback to their questions.
Unless there is objection or further activity,  I will suggest to accept

     "mblat"

comment(s) as an answer.

If you think your question was not answered at all, you can post a request in Community support (please include this link) to refund your points. The link to the Community Support area is: http://www.experts-exchange.com/commspt/

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
======
Werner
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6957971
Thank you, finalized today by EE Moderator.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

713 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