BOOL testdialogup::OnInitDialog()
{
CDialogEx::OnInitDialog();
CRect rtClient;
GetWindowRect(rtClient);
int nWidth = GetSystemMetrics(SM_CXSCREEN); //屏幕宽度
int nHeight = GetSystemMetrics(SM_CYSCREEN); //屏幕高度
::SetWindowPos(m_hWnd, HWND_TOPMOST, nWidth/2 - rtClient.Width()/2, nHeight/2 - rtClient.Height()/2, rtClient.Width(), rtClient.Height(), SWP_SHOWWINDOW);
return TRUE; // return TRUE unless you set the focus to a control
// 异常: OCX 属性页应返回 FALSE
}