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?
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?
"Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
Friedrich Nietzsche
"I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
George Best
"If you are going through hell....keep going."
Winston Churchill
>> Then convert to client coods [with] ScreenToClient()
Oh yeah - that's probably the best way.
gg
Thanks, ScreenToClient() method worked.