I\'ve got the pointer to the control with function
CWnd* CWnd::GetDlgItem(int ITEM_ID)
so i\'ve got CWnd*
pointer which points to
In straight MFC/Win32: (Example of WM_INITDIALOG)
RECT r;
HWND h = GetDlgItem(hwndDlg, IDC_YOURCTLID);
GetWindowRect(h, &r); //get window rect of control relative to screen
POINT pt = { r.left, r.top }; //new point object using rect x, y
ScreenToClient(hwndDlg, &pt); //convert screen co-ords to client based points
//example if I wanted to move said control
MoveWindow(h, pt.x, pt.y + 15, r.right - r.left, r.bottom - r.top, TRUE); //r.right - r.left, r.bottom - r.top to keep control at its current size
Hope this helps! Happy coding :)