2,在里面就可以修改初始窗口大小和窗口名字

BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
if( !CFrameWnd::PreCreateWindow(cs) )
   return FALSE;
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs

cs.cx=500;
cs.cy=500;

cs.style &=~FWS_ADDTOTITLE;
cs.lpszName="决战方块世界";
 
 cs.style &= ~WS_MAXIMIZEBOX; //禁止窗口最大化
 cs.style &= ~WS_MINIMIZEBOX; //禁止窗口最小化
 //cs.style &= ~WS_SYSMENU; //取消Title上的按钮
 cs.style &= ~WS_THICKFRAME;//使窗口不能用鼠标改变大小
 cs.lpszClass = AfxRegisterWndClass(0);

return TRUE;
}

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-10-09
  • 2022-12-23
  • 2021-12-09
  • 2021-08-09
  • 2021-08-13
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-26
相关资源
相似解决方案