MFC运行初始如何对话框就能出现在右边位置(而不是居中)

MFC运行初始如何对话框就能出现在右边位置(而不是居中)??

// 对话框靠右
ShowWindow(SW_NORMAL);

CRect rtDesk;

CRect rtDlg;

::GetWindowRect(::GetDesktopWindow(), &rtDesk);

GetWindowRect(&rtDlg);

int iXpos = rtDesk.Width() - rtDlg.Width();

int iYpos = rtDesk.Height() / 2 - rtDlg.Height() / 2;

SetWindowPos(NULL, iXpos, iYpos, 0, 0, SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER);