CWindow::CenterWindow函数
CWindow::CenterWindow函数体温msdn:Usually called from CDialog::OnInitDialog to center dialog boxes relative to the main window of the application. By default, the function centers child windows relative to their parent window, and pop-up windows relative to their owner. If the pop-up window is not owned, it is centered relative to the screen. To center a window relative to a specific window which is not the owner or parent, the pAlternateOwner parameter may be set to a valid window. To force centering relative to the screen, pass the value returned by CWnd::GetDesktopWindow as pAlternateOwner.这段英文条几个概念:该函数会使子窗口 Centers他们 的父窗口, pop-up窗口Centers他们的拥有者。奇怪,父窗口和拥有者不是一样的吗???