Obtain the offset (position) of static control


To obtain the offset of static control I use GetClientRect function.
But This returns only height and weidth of the target conrol.

I heard GetWindowRect function returns the position of static control, but It returns window refernced position, how can I get position of
static control refernced client window?
Who is Participating?
Get the window rect of the control and the parent.  Then get the difference.
Alternatively, get teh window (screen) coords of the control and convert to client coord of the parent.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.