Skip to content
⌘ NSIS Forum Archive

Get X & Y of control C++

3 posts

Afrow UK#

Get X & Y of control C++

Is it possible to get the X and Y coordinates of e.g. a button from the left and top of a window (rather than the screen) in C++?

Neither GetWindowRect nor GetClientRect seem to get it.

Edit: This is for a NSIS plugin I'm writing for some guy.

-Stu
deguix#
Use GetWindowRect to get the child window rectangle, then MapWindowPoints to make it relative to the parent window.