首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VC/MFC >

CWindow:CenterWindow函数解决方法

2014-05-31 
CWindow::CenterWindow函数C/C++ codeCWindow::CenterWindow函数体温msdn:Usually called from CDialog::O

CWindow::CenterWindow函数

C/C++ code
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他们的拥有者。奇怪,父窗口和拥有者不是一样的吗???


[解决办法]
CHILD类型的创建它的即它的父窗口
POPUP类型创建它的不一定是它的父窗口
[解决办法]
呵呵
多测试一下
你的问题我觉得多半和刷新有关

热点排行