MOBILE中程式開啟隱藏

來源:互聯網
上載者:User

在這裡我首先要感謝劉晨龍經理, 他在我工作上的支援,做人不能忘本.

 

1. 對InitInstance重新處理

BOOL CStartupHideDialogApp::InitInstance()
{

      //CStartupHideDialogDlg dlg;
      //m_pMainWnd = &dlg;
      //INT_PTR nResponse = dlg.DoModal();
     //if (nResponse == IDOK)
     //{
     //}

    

    //更改為如下:

    CStartupHideDialogDlg dlg;
    if(dlg.Create( CStartupHideDialogDlg::IDD ))
   {
       //dlg.ShowWindow( SW_SHOW );
       m_pMainWnd = &dlg;
       INT_PTR nResponse = dlg.RunModalLoop();
   }

    return FALSE;
}

 

2. 將對話方塊屬性Visable更改為False

3. BOOL CStartupHideDialogDlg::OnInitDialog()
{
     //CDialog::OnInitDialog();    //注釋掉此句

 

     //change to this method. 下面其它對CDialog::OnInitDialog()部分的重載,具體您可以跟蹤下

     //OnInitDialog和處理方法, 其中有個變數會一直會返回TRUE, 而變數為TRUE時, 就會調用  

    //ShowWindow(SW_SHOW)顯示出來.
     BOOL bDlgInit;
     if (m_lpDialogInit != NULL)
        bDlgInit = ExecuteDlgInit(m_lpDialogInit);
     else
        bDlgInit = ExecuteDlgInit(m_lpszTemplateName);

    

     if (!bDlgInit)
     {
          TRACE(traceAppMsg, 0, _T("Warning: ExecuteDlgInit failed during dialog init./n"));
          EndDialog(-1);
         return FALSE;
     }

 

     // transfer data into the dialog from member variables
     if (!UpdateData(FALSE))
     {
         TRACE(traceAppMsg, 0, _T("Warning: UpdateData failed during dialog init./n"));
         EndDialog(-1);
         return FALSE;
     }

 

     SHINITDLGINFO shidi;
     ZeroMemory(&shidi, sizeof(SHINITDLGINFO));
  
      shidi.dwMask = SHIDIM_FLAGS;
      shidi.dwFlags = SHIDIF_DONEBUTTON | SHIDIF_SIPDOWN |         SHIDIF_SIZEDLGFULLSCREEN | SHIDIF_EMPTYMENU;
      shidi.hDlg = m_hWnd;
      AYGSHELL::SHInitDialog(&shidi);

 

      SetIcon(m_hIcon, TRUE);   // Set big icon
      SetIcon(m_hIcon, FALSE);  // Set small icon

      return TRUE;  // return TRUE  unless you set the focus to a control
}

 

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.