• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            We do not always find visible happiness in proportion to visible virtue

            夢幻白樺林

            SHARE

              C++博客 :: 首頁 :: 聯(lián)系 :: 聚合  :: 管理
              14 Posts :: 58 Stories :: 62 Comments :: 0 Trackbacks

            公告

            常用鏈接

            留言簿(5)

            搜索

            •  

            最新隨筆

            最新評論

            閱讀排行榜

             全屏

             1 
             2  CMDIChildWnd* pChild=MDIGetActive();
             3  if(!pChild) return;
             4  m_bToolBarWasVisible=(m_wndToolBar.IsWindowVisible()!=0);
             5  m_wndToolBar.ShowWindow(SW_HIDE);//隱藏工具欄
             6  m_bStatusBarWasVisible=(m_wndStatusBar.IsWindowVisible()!=0);
             7  m_wndStatusBar.ShowWindow(SW_HIDE);//隱藏狀態(tài)欄
             8 
             9  // first create the new toolbar
            10  // this will contain the full-screen off button
            11  m_pwndFullScreenBar=new CToolBar;
            12  m_pwndFullScreenBar->Create(this);
            13  m_pwndFullScreenBar->LoadToolBar(IDR_FULLSCREEN);//顯示退出全屏工具欄
            14  m_pwndFullScreenBar->SetBarStyle(m_pwndFullScreenBar->GetBarStyle() |
            15   CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC);
            16  // to look better:
            17  m_pwndFullScreenBar->ModifyStyle(0, TBSTYLE_FLAT);
            18  m_pwndFullScreenBar->EnableDocking(0);
            19 
            20  // place the full-screen off button somewhere:
            21  CPoint pt(300,200);
            22  FloatControlBar(m_pwndFullScreenBar,pt);
            23  
            24  // now save the old positions of the main and child windows
            25  GetWindowRect(&m_mainRect);
            26 
            27  // remove the caption of the mainWnd:
            28  LONG style=::GetWindowLong(m_hWnd,GWL_STYLE);
            29  style&=~WS_CAPTION;
            30  ::SetWindowLong(m_hWnd,GWL_STYLE,style);
            31  int screenx=GetSystemMetrics(SM_CXSCREEN);
            32  int screeny=GetSystemMetrics(SM_CYSCREEN);
            33 
            34  // resize:
            35  SetWindowPos(NULL,0,0,screenx,screeny,SWP_NOZORDER);
            36  //SetWindowPos(NULL,-5,-5,80,80,SWP_NOZORDER);
            37  style=::GetWindowLong(pChild->m_hWnd,GWL_STYLE);
            38  m_bChildMax=(style & WS_MAXIMIZE)?true:false;
            39  // note here: m_bMainMax is not needed since m_hWnd only
            40  // changed its caption
            41  ///***************
            42 
            43  //Save the Original Menu and set menu to NULL
            44     ASSERT(m_OrgMenu.GetSafeHmenu()==NULL);
            45     CMenu* pOldMenu=GetMenu();
            46     m_OrgMenu.Attach(pOldMenu->Detach());
            47     SetMenu((CMenu*)NULL);
            48 
            49  //************
            50  // and maximize the child window
            51  // it will remove its caption, too.
            52   //pChild->
            53  this->ShowWindow (SW_SHOWMAXIMIZED);
            54  style=::GetWindowLong(pChild->m_hWnd,GWL_STYLE);//獲得窗口風格
            55  style&=~WS_CAPTION;
            56  ::SetWindowLong(pChild->m_hWnd,GWL_STYLE,style); 
            57  pChild->ShowWindow(SW_SHOWMAXIMIZED);
            58 
            59  //RecalcLayout();
            60  
            61 
            62 

            退出全屏
             1ASSERT(m_OrgMenu.GetSafeHmenu()!=NULL);
             2    SetMenu(&m_OrgMenu);
             3    m_OrgMenu.Detach();
             4
             5    // You can use SaveBarState() in OnClose(),
             6    // so remove the newly added toolbar entirely
             7    // in order SaveBarState() not
             8    // to save its state. That is why I used dynamic
             9    // allocation
            10    delete m_pwndFullScreenBar;
            11    LONG style=::GetWindowLong(m_hWnd,GWL_STYLE);
            12    style|=WS_CAPTION;
            13    ::SetWindowLong(m_hWnd,GWL_STYLE,style);
            14    if(m_bToolBarWasVisible)
            15        m_wndToolBar.ShowWindow(SW_SHOW);
            16    if(m_bStatusBarWasVisible)
            17        m_wndStatusBar.ShowWindow(SW_SHOW);
            18    MoveWindow(&m_mainRect);
            19    RecalcLayout();
            20    CMDIChildWnd* pChild=MDIGetActive();
            21
            22    style=::GetWindowLong(pChild->m_hWnd,GWL_STYLE);
            23    style|=WS_CAPTION;
            24    ::SetWindowLong(pChild->m_hWnd,GWL_STYLE,style);
            25    // pchild can be NULL if the USER closed all the
            26    // childs during Full Screen Mode:
            27    if(pChild){
            28        if(m_bChildMax)
            29            MDIMaximize(pChild);
            30        else MDIRestore(pChild);
            31    }
            posted on 2007-05-15 22:48 colys 閱讀(1036) 評論(0)  編輯 收藏 引用 所屬分類: C++

            久久精品a亚洲国产v高清不卡| 青青青青久久精品国产| 一本久久精品一区二区| 免费一级做a爰片久久毛片潮| 免费精品久久天干天干| 亚洲国产欧美国产综合久久| 久久精品九九亚洲精品天堂 | 精品无码久久久久久久动漫| 伊人久久综在合线亚洲2019| 欧美亚洲日本久久精品| 伊人久久久AV老熟妇色| 久久精品国产精品亚洲精品| 久久亚洲欧洲国产综合| 国产午夜免费高清久久影院| 欧美国产精品久久高清| 99国产欧美精品久久久蜜芽| 亚洲AV伊人久久青青草原| 国产精品18久久久久久vr| 老男人久久青草av高清| 国产成人精品久久亚洲| 久久综合给合久久狠狠狠97色 | 97超级碰碰碰碰久久久久| 性欧美大战久久久久久久| 国产成人久久精品区一区二区| 亚洲性久久久影院| 国产成人精品久久亚洲高清不卡 国产成人精品久久亚洲高清不卡 国产成人精品久久亚洲 | 无码人妻精品一区二区三区久久久| 99久久精品免费观看国产| 欧洲成人午夜精品无码区久久 | 久久精品国产久精国产思思| 欧美久久久久久精选9999| 9999国产精品欧美久久久久久| 久久精品99久久香蕉国产色戒 | 伊人色综合久久天天人守人婷| 曰曰摸天天摸人人看久久久| 精品久久久久久久无码| 人妻少妇久久中文字幕| 久久人妻少妇嫩草AV无码专区| 无码人妻久久一区二区三区免费丨| 亚洲国产婷婷香蕉久久久久久| 亚洲国产成人久久综合碰|