Reprinted from: https://www.cnblogs.com/huhu0013/p/3944569.html
CRect rect;
GetDlgItem(Control ID)->GetWindowRect(&rect);//Get the screen coordinates of the control
ScreenToClient(&rect);//Convert to client coordinates on the dialog
Reprinted from: https://www.cnblogs.com/huhu0013/p/3944569.html
CRect rect;
GetDlgItem(Control ID)->GetWindowRect(&rect);//Get the screen coordinates of the control
ScreenToClient(&rect);//Convert to client coordinates on the dialog