vc将对话框移动点屏幕右下角

vc将对话框移动点屏幕右下角

void CXXXDlg::MoveToRightBottom()
{
 int cx = GetSystemMetrics(SM_CXFULLSCREEN); 
 int cy = GetSystemMetrics(SM_CYFULLSCREEN);
 CRect rect;
 GetWindowRect(&rect);
 int x = cx - rect.Width();
 int y = cy - rect.Height();

 SetWindowPos(NULL, x, y, 0, 0, SWP_NOSIZE | SWP_NOZORDER);
}

在OnInitDialog中调用该函数即可

你可能感兴趣的:(vc将对话框移动点屏幕右下角)