窗口居中显示:
CenterWindow();
CenterWindow( GetParent() );
CenterWindow( GetDesktopWindow() ); // center to the hpc screen.
使用示例:
AfxGetMainWnd()->CenterWindow();//将主框架窗口居中.
AfxGetMainWnd()->CenterWindow(CWnd::GetDesktopWindow()); //将窗口置于屏幕中央
界面处理相关API&MFC函数(随时更新)
最新推荐文章于 2020-08-10 02:01:15 发布
本文介绍了几种实现窗口居中显示的方法,包括直接调用CenterWindow()函数及其变体。通过这些方法可以轻松地将应用程序的主窗口或其他类型的窗口置于屏幕中央。
1414

被折叠的 条评论
为什么被折叠?



