Hey!
I can get the child window's length and height with GetClientRect(), but the x and y coordinates are 0.
GetWindowRect() gets the coordinates relative to the whole screen.
How to get these coordinates relative to child's parent?
Printable View
Hey!
I can get the child window's length and height with GetClientRect(), but the x and y coordinates are 0.
GetWindowRect() gets the coordinates relative to the whole screen.
How to get these coordinates relative to child's parent?
You do some math on the GetWindowRect() coords of the parent and the child. Draw it out on paper - that's what I do.
gg
Don't have an IDE here....
Can you get the screen coods ( GetWindowRect() ) of the client object/window
Then convert to client coods (ScreenToClient() ) using the parents HWND?
>> Then convert to client coods [with] ScreenToClient()
Oh yeah - that's probably the best way.
gg
Thanks, ScreenToClient() method worked.