我使用showwindow(sw_hide)将窗口隐藏,但在程序运行瞬时仍能够看到窗口瞬间一闪才消失。请教高手是否有办法使这一闪而过也不出现,实现完全隐藏。

解决方案 »

  1.   

    void CMainFrame::ActivateFrame(int nCmdShow) 
    {
    // filter the first time of ActivateFrame,which be called 
    // in CTApp::InitInstance() during following code
    // OnFileNew();
    // bring a flash on screen,so filter it here. static BOOL bFirstTime = TRUE;
    if(bFirstTime)
    {
        bFirstTime = FALSE;
        return;
              } CFrameWnd::ActivateFrame(nCmdShow);
    }