Hi,

I want to know the position of a control, e.g. an edit control. Very easy with API GetWindowRect. But I need the real position, without the border.
Is there an function to detect the high and width of a control border? To get the real control position?

Best regards,
Nordwind64
Posted on 2005-12-20 14:50:34 by Nordwind64
If I understood you well, you want to get the client area position expressed in screen coordinates. So you have to call GetClientRect to get the client are in client coordinates, and then translate them to screen coordinates using ClientToScreen.

Hope that helps! :)
Posted on 2005-12-20 15:21:18 by QvasiModo
Yeah. GetClientRect return the client area, while GetWindowRect return the whole window area.

ClientToScreen and ScreenToClient convert the coordinates from client-area space to desktop space and from desktop space to client-area space, respectively. Please bear in mind that the transformed coordinates may be negative in some cases.
Posted on 2005-12-20 15:55:14 by ti_mo_n
Hi,

thanks!!!
That's, what I was looking for  :D

Best regards,
Nordwind64
Posted on 2005-12-21 14:38:57 by Nordwind64