Solved

Moving cursor with WM_SETCURSOR

Posted on 2003-11-26
2
2,410 Views
Last Modified: 2013-11-20
Hi !

I am trying to move cursor manually in my sample dialog application by doing:

POINT pt;
::GetCursorPos(&pt);
SendMessage(WM_SETCURSOR,NULL,MAKELPARAM(pt.x+10,pt.y));

This doesn't work although in Spy++ I can see that my dialog gets the correct LPARAM.
I tried also to use WM_MOUSEMOVE, but the result was the same.

What do I miss ?

Thanks.
0
Comment
Question by:ab11
2 Comments
 
LVL 48

Accepted Solution

by:
AlexFM earned 200 total points
ID: 9824388
Try SetCursorPos function.
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 9824428
SetCursorPos(x, y) where x and y are in screen coordinates, returns TRUE on success.
The functions ClientToScreen and ScreenToClient can be used to adjust a point from your app's co-ordinates to/from the screen co-ordinates if you require that.
0

Featured Post

Technology Partners: 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

Title # Comments Views Activity
Is it possible to combine several text files into one big one? (redhat v5 enterprise) 4 110
xyBalance chalenge 58 102
ORA-01403: no data found 43 111
matchUp  challenge 6 76
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.
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa‚Ķ

679 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