Given a rectangle
rcDlg
which contains the rc file coordinates of a dialog resource, use the following code:
CDialog *pDlg = m_pDlg;
pDlg->MapDialogRect(&rcDlg);
::AdjustWindowRectEx(&rcDlg,
pDlg->GetStyle(),
::IsMenu(::GetMenu(pDlg->GetSafeHwnd())),
pDlg->GetExStyle());
pDlg->ClientToScreen(&rcDlg);
P.S. Special thanks goes to Jacques Raphanel for this solution.