Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Inverting the mouse in windows

Posted on 2002-03-28
4
Medium Priority
?
210 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 4

Accepted Solution

by:
mblat earned 400 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
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.

636 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