🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: cn.bbs.comp.program
Article #1097

VC FAQ(8)

#1097
From: �ϵ�
Date: Sun, 19 Apr 1998 00:00
76 lines
2926 bytes
2m������:m TMN (������)
2m��  ��:m RAD
2m��  ��:m VC FAQ(8)
2m����վ:m '3m�Ͻ�ɺ�m' (Wed Apr  8 08:15:50 1998) , 5mվ���ż�m

[������ҳ] [����������] [ȫ��������]

------------------------------------------ 
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 


  

                         [������ҳ] [����������] [ȫ��������]

--
m;31m�� ��Դ:���Ͻ�ɺ� bbs.njupt.edu.cn��[FROM: pc05.info.njupt]m

--
�� ��Դ:���ϴ�С�ٺ���Ϣ����վ bbs.nju.edu.cn��[FROM: a507yjh.nju.edu]
Technical Details
Message-ID: <3OAiU9$szF@bbs.nju.edu.cn>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: fc86e,29898f184ab61221,start
X-Google-Attributes: gidfc86e,public
From: mendy.bbs@bbs.nju.edu.cn (�ϵ�)
Subject: VC FAQ(8)
Date: 1998/04/19
Message-ID: <3OAiU9$szF@bbs.nju.edu.cn>
X-Deja-AN: 345966152
X-Filename: Programming/M.893022633.A
Organization: nju_bbs
Newsgroups: cn.bbs.comp.program