Results 1 to 9 of 9

Thread: GetCursorPos

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800

    GetCursorPos

    MSDN makes it so confusing...how on earth do I use it?

  2. #2
    Frenzied Member Magiaus's Avatar
    Join Date
    Mar 2002
    Location
    swamp land
    Posts
    1,267
    POINT pnt;
    int x;
    int y;
    GetCursorPos(pnt);
    x = pnt.x;
    y=pnt.y;
    Magiaus

    If I helped give me some points.

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800
    thanks

  4. #4
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    GetCursorPos(&pnt);

    !!!
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800
    is there a way to see where it is on my window? I guess GetCursorPos wasn't what I was looking for

  6. #6
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    You can map the screen coordinates to your window coordinates. There is a function for this.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  7. #7
    Frenzied Member
    Join Date
    Jul 2002
    Posts
    1,370
    GetWindowRect() is the function CB is referring to.

  8. #8
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    No, I actually mean ScreenToClient
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  9. #9
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    And if you have strange logical coordinates you can then use DPtoLP to convert the return of ScreenToClient to your own little world.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width