MFC如何做到像這樣的切換功能 ???!!!

看板Programming作者時間18年前 (2007/03/28 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/2 (看更多)
有2個程式 或1個程式有2種不同的呈現介面, 在執行期間2個可以互相切換以外 我也要可以 分別去點2個捷徑(同1個程式)去開, 是用不同參數? 這應該是Structure的問題吧, 我猜. 現在我大概的Structure是: SDI, Use MFC in a Shared DLL Interface1: Including Class view1 : public CScrollView, and toolbar1, manubar1 Interface2: Including class view2 : public CListView, and toolbar2, manubar2 CMyAppApp::InitInstance(){ ... CSingleDocTemplate* pDocTemplate; pDocTemplate = new CSingleDocTemplate( IDR_TOOLBAR_VIEWER, RUNTIME_CLASS(CMyAppDoc), RUNTIME_CLASS(CMainFrame), // main SDI frame window RUNTIME_CLASS(Cview1View)); // 因為這裡, 所以目前是只能用view1的介面啟動 AddDocTemplate(pDocTemplate); ... } void SwitchView() // 切換view1和view2 { ... } 現在流程: Start app --> Interface1 <--> Interface2 所以, 如何: Start app ----> Interface1 \ ▲ \ | \ ▼ --> Interface2 謝謝指教 -- ┌─────KKCITY─────┐ ◢ 想要成立班系社團站台嗎? bbs.kkcity.com.tw │ █ KKcity即日起開放BBS站申請囉! └──From:220.131.116.190 ──┘ ◥ ╲ 免程式技術、硬體成本的選擇!! --
文章代碼(AID): #162LlZ00 (Programming)
文章代碼(AID): #162LlZ00 (Programming)