⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 00000019.txt

📁 水木清华BBS站的讨论区精华集锦
💻 TXT
字号:
 
                       --===BBS水木清华站∶精华区===--
 
                        -===BBS水木清华站∶精华区===-
 ------------------------------------------ 
 How use new views with a doc template? 
 ------------------------------------------ 
  
 In an application created with AppWizard, you have two options: change the 
  
 derivation of the current view, or create a new view and use the new view 
 in 
 your MDI application along with the original view. 
  
 To create a new view, use ClassWizard to create a new class derived from 
 CView. After the class has been created, the steps to use the new view or 
 to 
 modify the view provided by App Wizard are the same. 
  
 1.  Modify the header file for the view class to change all references to 
 CView to the name of the desired view class. In this example, the class is 
  
 derived from CScrollView. 
 Usually, this step involves changing the class the view class is derived 
 from 
 as follows: 
  
  
 class CMyView : public CScrollView 
  
  
 2.  Modify the implementation file for the view class to change all 
 references to CView to the name of the desired view class. This involves 
 changing the IMPLEMENT_DYNCREATE line as follows: 
  
 IMPLEMENT_DYNCREATE(CMyView, CScrollView) 
         changing the BEGIN_MESSAGE_MAP as follows: 
  
 BEGIN_MESSAGE_MAP(CMyView, CScrollView) 
  
 and changing any other references to CView to CScrollView. 
  
  
 3.  No further modifications are required if you are modifying a view 
 created 
 by App Wizard. If you create a new view, find the AddDocTemplate() call in 
  
 the CWinApp::InitInstance() function. The third parameter to 
 AddDocTemplate() 
 is       RUNTIME_CLASS(CSomeView). To replace the current view with the new 
  
 view class, change CSomeView to CMyView. In an MDI application, you can use 
  
 multiple view types by adding a second AddDocTemplate() call that changes 
 RUNTIME_CLASS(CSomeView) to RUNTIME_CLASS(CMyView). 
  
 For more information, please see Knowledge Base article Q99562. 
 MSVC Knowledge Base 6/7/95 
 
                        -===BBS水木清华站∶精华区===-

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -