思路:按下f11時轉換全屏顯示方式
全屏時需要記錄視窗當前位置
記錄工具欄、狀態列的顯示屬性
隱藏/顯示選單欄
隱藏/顯示標題欄
最大化/最小化視窗
技術要點:
為view新增keydown事件,當nchar==122時新增處理**。
在mainframe中新增狀態等變數: public:
bool m_bfullscreenmode;
cmenu m_menumainwnd;
private:
bool m_bstatusbarwasvisible, m_b*******wasvisible;
crect m_mainrect;
在mainframe的oncreate事件中初始化變數值: this->m_menumainwnd.loadmenu(idr_mainframe);
this->setmenu(&m_menumainwnd);
在mainframe的建構函式中初始化全屏狀態為false:this->m_bfullscreenmode = false;
在mainframe中新增開關函式:fullscreenmodeswitch
在mainframe中新增全屏的開關函式:fullscreenmodeon、fullscreenmodeoff
核心**:
void cmainframe::fullscreenmodeon()
void cmainframe::fullscreenmodeoff()
void cmainframe::fullscreenmodeswitch()
else
}
MFC單文件程式架構解析
首先我們了解到的是 圖 一 圖 二 csingledoctemplate pdoctemplate pdoctemplate new csingledoctemplate idr mainframe,runtime class cmainframe main sdi frame windon 這裡體...
MFC單文件程式架構解析
mfc單文件程式架構解析 這裡我以科院楊老師的單文件程式來分析一下mfc單文件的程式架構,純屬個人見解,不當之處煩請指教!首先我們了解到的是 圖 一 圖 二 csingledoctemplate pdoctemplate pdoctemplate new csingledoctemplate idr...
MFC學習(七) 單文件程式
1 mfc單文件程式的主要類 1 文件類 document 即應用程式處理的資料物件,文件一般從 mfc 中 cdocument 中派生。cdocument 類用於相應資料檔案的讀取以及儲存 cview 類所需要觀察和處理的資訊。2 視類 view 視相當於文件在應用程式中的觀察視窗,它確定了使用者...