BTW, the reason that VAX gets the initial refactoring wrong so commonly is something like:
CPoint cursor;
VERIFY(GetCursorPos(&cursor));
ScreenToClient(&cursor);
HWND hChild = ::ChildWindowFromPoint(m_hWnd, cursor);
UINT id = hChild ? ::GetDlgCtrlID(hChild) : 0;
Asking for the above, it assumes no return value - but id (UINT) is the return value - it's the sum total from that function, and useless to keep it inside the refactored code!
It would be grand if it looked at unused side-effects and decided that they were the likely output from the refactored code. ;)