m_pMainWnd->ShowWindow(SW_SHOW);
m_pMainWnd->ShowWindow(SW_SHOWMAXIMIZED);
m_pMainWnd->SetWindowPos(NULL,x,y,Width,Height,SWP_NOMOVE);
BOOL CDzyApp::InitInstance()
{
AfxEnableControlContainer();
……
// The one and only window has been initialized, so show and update it.
m_pMainWnd->SetWindowPos(NULL,0,0,750,555,SWP_NOMOVE);//设置窗口的初始大小为750*555
m_pMainWnd->ShowWindow(SW_SHOW);
m_pMainWnd->UpdateWindow();
return TRUE;
}
m_pMainWnd->CenterWindow( GetDesktopWindow() );
CenterWindow( GetDesktopWindow() );
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
return -1;
……
// TODO: Delete these three lines if you don't want the toolbar to
// be dockable
m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
EnableDocking(CBRS_ALIGN_ANY);
DockControlBar(&m_wndToolBar);
CenterWindow( GetDesktopWindow() ); //使窗口打开时处于屏幕正中
return 0;
}
BOOL CTextEditorDoc::OnNewDocument()
{
if (!CDocument::OnNewDocument())
return FALSE;
// TODO: add reinitialization code here
// (SDI documents will reuse this document)
SetTitle("未命名.txt"); //设置文档标题
return TRUE;
}
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
if( !CFrameWnd::PreCreateWindow(cs) )
return FALSE;
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
m_strTitle = _T("文本整理器"); //设置程序标题
return TRUE;
}
AfxGetMainWnd()->SetWindowText("文档标题"+" - "+"程序标题");
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有