Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Getting desktop cursor position???

zenboyzenboy Member Posts: 26
I'm trying to get the mouse cursor's position on the desktop. I'm using SetCapture() and ReleaseCapture() from my app. The only problem is that I can only get the CPoint coords from within my application window and not the coords from the desktop... well I get them but I'm getting numbers like 36667 and 32235.

Can anybody point me in the right direction? ...pun intended : )


Comments

  • grahamojgrahamoj Member Posts: 366
    : I'm trying to get the mouse cursor's position on the desktop. I'm using SetCapture() and ReleaseCapture() from my app. The only problem is that I can only get the CPoint coords from within my application window and not the coords from the desktop... well I get them but I'm getting numbers like 36667 and 32235.
    :
    : Can anybody point me in the right direction? ...pun intended : )
    :
    :
    :

    hiya don't know if this would work for desktop,maybe worth a try anyway, sorry can't help more.

    // to save point of coordinates
    CPoint cp;

    GetCursorPos( &cp ); // get cursor coordinates


  • zenboyzenboy Member Posts: 26
  • Chris BrownChris Brown USAMember Posts: 4,624 ✭✭

    _ { http://forcoder.org } free ebooks and video tutorials about | C#, Visual Basic .NET, JavaScript, Go, C, Assembly, Scratch, Ruby, MATLAB, Perl, Visual Basic, C++, PHP, PL/SQL, R, Python, Java, Swift, Delphi, Objective-C Bash, Transact-SQL, Dart, Logo, LabVIEW, Awk, F#, Scala, Rust, Clojure, Hack, COBOL, ML, Erlang, FoxPro, Ada, VBScript, Alice, Fortran, Lisp, Lua, Scheme, SAS, Julia, D, ABAP, Prolog, Crystal, Kotlin, Apex | ___________

Sign In or Register to comment.