int cx=GetSystemMetrics(SM_CXSCREEN);
int cy=GetSystemMetrics(SM_CYSCREEN);
CRect rectWindow;
GetWindowRect(&rectWindow);
int w=rectWindow.Width();
int h=rectWindow.Height();
rectWindow.left=cx-w;
rectWindow.top=cy-h;
rectWindow.right=cx;
rectWindow.bottom=cy;
Dialog.MoveWindow(rectWindow,TRUE)