Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

getcursorpos - how do I get relative to a window?  also, what's lpoint?

Posted on 2007-11-27
6
Medium Priority
?
880 Views
Last Modified: 2012-06-22
http://msdn2.microsoft.com/en-us/library/ms648390.aspx


BOOL GetCursorPos(      
    LPPOINT lpPoint
);

what is ?

LPPOINT lpPoint



also, how do I make it return relative to the a top level window's position?
0
Comment
Question by:Troudeloup
[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
  • 3
  • 3
6 Comments
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20362431
POINT p;
GetCursorPos(&p);
ScreenToClient(yourHwnd, &p);

LPPOINT means pointer to a POINT variable
0
 

Author Comment

by:Troudeloup
ID: 20362453
wait a minute, does it mean it returns the relative position in the window directly?

wow

how about returning screen coordiates?
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20362461
I have answered that in your other question
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:Troudeloup
ID: 20362494
which one?

also, did you mean "that" by

a)  , does it mean it returns the relative position in the window directly?
or
b)  returning screen coordiates?

0
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 2000 total points
ID: 20362514
The name of the function explains all:
ScreenToClient() converts a screen coordinate into a client (window) coordinate
ClientToScreen() converts a client coordinate into a screen coordinate
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

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…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
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 technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses

721 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