SDI程序 如何固定启动时的位置?20分 简单的SDI程序,自己做的一些菜单操作,但每次启动程序发现位置不固定。应该在哪控制可以使SDI启动时位置固定。知道的解答下。在线等啊 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 MainFrame里边,OnCreate里,调用CenterWindow,让窗口居中或者MoveWindow,或者SetWindowPos,设置窗口到你指定的位置、大小 BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs){ cs.x = 100; cs.y = 100; if( !CFrameWnd::PreCreateWindow(cs) ) return FALSE; // TODO: Modify the Window class or styles here by modifying // the CREATESTRUCT cs return TRUE;} BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs){ cs.x = 100; // 指定位置 cs.y = 100; // cs.cx, cs.cy 指定大小 if( !CFrameWnd::PreCreateWindow(cs) ) return FALSE; // TODO: Modify the Window class or styles here by modifying // the CREATESTRUCT cs return TRUE;} 请版主把我这两个资源删掉 新手求助 一个特殊窗口的问题? 类动态库调用提示警告,如何去掉警告? 大家谁能帮我,一个孤独的MM,紧急求助 Excel与ACCESS数据互导的问题。(回答就给分) 用alt+f4可以关闭窗口,如何屏蔽它 static 控件中能响应鼠标吗? 关于位图的简单问题,高分求救!200! windows真的过时了吗? CWinThread线程启动,为什么不执行InitInstance()? 关于CFont类的问题
CenterWindow,让窗口居中
或者MoveWindow,或者SetWindowPos,设置窗口到你指定的位置、大小
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
cs.x = 100;
cs.y = 100;
if( !CFrameWnd::PreCreateWindow(cs) )
return FALSE;
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs return TRUE;
}
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
cs.x = 100; // 指定位置
cs.y = 100;
// cs.cx, cs.cy 指定大小
if( !CFrameWnd::PreCreateWindow(cs) )
return FALSE;
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs return TRUE;
}