GetWindowRect()
gives you the absolute coordinates. Using
ScreenToClient()
is not necessary here (the absolute coordinates are what you probably want):
void CTickCounterDlg::OnMove(int x, int y)
{
CRect dialogRect;
GetWindowRect(&dialogRect);
m_Size.Format(L"Before move: x = %d, y = %d, width = %d, height = %d",
dialogRect.left, dialogRect.top, dialogRect.Width(), dialogRect.Height());
CDialog::OnMove(x, y);
GetWindowRect(&dialogRect);
m_Size.Format(L"After move: x = %d, y = %d, width = %d, height = %d",
dialogRect.left, dialogRect.top, dialogRect.Width(), dialogRect.Height());
}