如何使窗体一启动时就最大化(使用的是单文档窗体)

解决方案 »

  1.   

    在你CApplication应用的InitInstance()函数中将原来的m_pMainWnd->ShowWindow(SW_SHOW);
    替换为:
    m_pMainWnd->ShowWindow(SW_SHOWMAXIMIZED);
    m_pMainWnd->UpdateWindow();
      

  2.   

    泡泡龙:
        如果不是单窗体的怎么办?比如是一个project底下的一个dialoge。
      

  3.   

    BOOL CAboutDlg::OnInitDialog() 
    {
    CDialog::OnInitDialog();

    // TODO: Add extra initialization here
    //Just add only one code line in here ,Everything is OK!
    this->ShowWindow(SW_SHOWMAXIMIZED);//加上这句
    return TRUE;  // return TRUE unless you set the focus to a control
                  // EXCEPTION: OCX Property Pages should return FALSE
    }