Who can give me a detailed explanation to GetWindowRect?
-
Hi all I always confused with the GetWindowRect and ScreenToClient. What's the exact region when use the CWnd::GetWindowRect? and what's the region of one control's(like a textbox) GetWindowRect? and Why it always uses the ScreenToClient after using the control's GetWindowRect. If possiable,show me with a graph. Thanks. Nothend
-
Hi all I always confused with the GetWindowRect and ScreenToClient. What's the exact region when use the CWnd::GetWindowRect? and what's the region of one control's(like a textbox) GetWindowRect? and Why it always uses the ScreenToClient after using the control's GetWindowRect. If possiable,show me with a graph. Thanks. Nothend
Nothend wrote:
If possiable,show me with a graph.
Not sure how you expected that. GetWindowRect gets the rectangle that the windows takes up. ScreenToClient takes co-ordinates that relate to the entire screen, and converts them to co-ordinates that are relative to the top left corner of the client program specified.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog