Howdy, Stranger!

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

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Getting cursor coordinates relative to a child window...

SephirothSephiroth Fayetteville, NC, USAPosts: 1,035Member
OK, aside from my grid drawing problem, I also need to figure out how to retrieve my mouse cursor coordinates in a specific child window, not my parent window. How could I do this? The window is a static child window with the ss_bitmap style, and is also the window that I am trying to divide into 50 grid squares. Thanks for any help you can give.


-[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red]

Comments

  • pingpongpingpong Posts: 937Member
    where are u processing the mouse message? if in child window (where it should be), why convert?

    anyways, to convert from one window to another do this..

    say, POINT pt holds the mouse pos, hwndFrom and hwndTo are self-explainary :o)

    ClientToScreen(hwndFrom, &pt);
    ScreenToClient(hwndTo, &pt);


    : OK, aside from my grid drawing problem, I also need to figure out how to retrieve my mouse cursor coordinates in a specific child window, not my parent window. How could I do this? The window is a static child window with the ss_bitmap style, and is also the window that I am trying to divide into 50 grid squares. Thanks for any help you can give.
    :
    : -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red]
    :




Sign In or Register to comment.