如题,急啊!!!

解决方案 »

  1.   

    在initialDialog里
    ShowWindow(SW_HIDE);
      

  2.   

    添加 WM_SHOWWINDOW 的消息映射     void CTest6Dlg::OnShowWindow(BOOL bShow, UINT nStatus)
         {
              if ( GetStyle() & WS_VISIBLE )
              {
                   CDialog::OnShowWindow(bShow, nStatus);
              }
              else
              {
                   long Style = ::GetWindowLong(*this, GWL_STYLE);
                   ::SetWindowLong(*this, GWL_STYLE, Style | WS_VISIBLE);
                   CDialog::OnShowWindow(SW_HIDE, nStatus);
              }
         }
      

  3.   

    void CMFC_TEMPDlg::OnShowWindow(BOOL bShow, UINT nStatus) 
    {

    if ( GetStyle() & WS_VISIBLE )
        {
    CDialog::OnShowWindow(bShow, nStatus);
    }
    else
    {
    long Style = ::GetWindowLong(*this, GWL_STYLE);
    ::SetWindowLong(*this, GWL_EXSTYLE, WS_EX_TOOLWINDOW); //GWL_STYLE, Style | WS_VISIBLE);
    ::MoveWindow(*this,0,0,0,0,FALSE);
    }


    CDialog::OnShowWindow(bShow, nStatus);

    // TODO: Add your message handler code here

    }