#0042
#0043 CScribbleApp theApp;
#0044
#0045 ////////////////////////////////////////////////////////////////
#0046 // CScribbleApp initialization
#0047
#0048 BOOL CScribbleApp::InitInstance()
#0049 {
#0050 // Standard initialization
#0051 // If you are not using these features and wish to reduce the size
#0052 // of your final executable; you should remove from the following
#0053 // the specific initialization routines you do not need。
#0054
#0055 #ifdef _AFXDLL
#0056 Enable3dControls(); // Call this when using MFC in a shared DLL
#0057 #else
#0058 Enable3dControlsStatic(); // Call this when linking to MFC statically
#0059 #endif
#0060
#0061 LoadStdProfileSettings(); // Load standard INI file options (including MRU)
#0062
#0063
#0064 // Register the application"s document templates。 Document templates
#0065 // serve as the connection between documents; frame windows and views。
876
…………………………………………………………Page 939……………………………………………………………
附錄B Scribble Step5 完整原始碼
#0066
#0067 CMultiDocTemplate* pDocTemplate;
#0068 pDocTemplate = new CMultiDocTemplate(
#0069 IDR_SCRIBBTYPE;
#0070 RUNTIME_CLASS(CScribbleDoc);
#0071 RUNTIME_CLASS(CChildFrame); // custom MDI child frame
#0072 RUNTIME_CLASS(CScribbleView));
#0073
#0074 AddDocTemplate(pDocTemplate);
#0075
#0076 // create main MDI Frame window
#0077 CMainFrame* pMainFrame = new CMainFrame;
#0078 if (!pMainFrame…》LoadFrame(IDR_MAINFRAME))
#0079 return FALSE;
#0080 m_pMainWnd = pMainFrame;
#0081
#0082 // Enable drag/drop open。 We don"t call this in Win32; since a
#0083 // document file extension wasn"t chosen while running AppWizard。
#0084 m_pMainWnd…》DragAcceptFiles();
#0085
#0086 // Enable DDE Execute open
#0087 EnableShellOpen();
#0088 RegisterShellFileTypes(TRUE);
#0089
#0090 // Parse mand line for standard shell mands; DDE; file open
#0091 CmandLineInfo cmdInfo;
#0092 ParsemandLine(cmdInfo);
#0093
#0094 // Dispatch mands specified on the mand line
#0095 if (!ProcessShellmand(cmdInfo))
#0096 return FALSE;
#0097
#0098
#0099 // The main window has been initialized; so show and update it。
#0100 pMainFrame…》ShowWindow(m_nCmdShow);
#0101 pMainFrame…》UpdateWindow();
#0102
#0103 return TRUE;
#0104 }
#0105
#0106 /////////////////////////////////////////////////////////////////
#0107 // CAboutDlg dialog used for App About
#0108
#0109 class CAboutDlg : public CDialog
#0110 {
#0111 public:
877
…………………………………………………………Page 940……………………………………………………………
第五篇 附錄
#0112 CAboutDlg();
#0113
#0114 // Dialog Data
#0115 //{{AFX_DATA(CAboutDlg)
#0116 enum { IDD = IDD_ABOUTBOX };
#0117 //}}AFX_DATA
#0118
#0119 // ClassWizard generated virtual function overrides
#0120 //{{AFX_VIRTUAL(CAboutDlg)
#0121 protected:
#0122 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
#0123 //}}AFX_VIRTUAL
#0124
#0125 // Implementation
#0126 protected:
#0127 //{{AFX_MSG(CAboutDlg)
#0128 // No message handlers
#0129 //}}AFX_MSG
#0130 DECLARE_MESSAGE_MAP()
#0131 };
#0132
#0133 CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
#0134 {
#0135 //{{AFX_DATA_INIT(CAboutDlg)
#0136 //}}AFX_DATA_INIT
#0137 }
#0138
#0139 void CAboutDlg::DoDataExchange(CDataExchange* pDX)
#0140 {
#0141 CDialog::DoDataExchange(pDX);
#0142 //{{AFX_DATA_MAP(CAboutDlg)
#0143 //}}AFX_DATA_MAP
#0144 }
#0145
#0146 BEGIN_MESSAGE_MAP(CAboutDlg; CDialog)
#0147 //{{AFX_MSG_MAP(CAboutDlg)
#0148 // No message handlers
#0149 //}}AFX_MSG_MAP
#0150 END_MESSAGE_MAP()
#0151
#0152 // App mand to run the dialog
#0153 void CScribbleApp::OnAppAbout()
#0154 {
#0155 CAboutDlg aboutDlg;
#0156 aboutDlg。DoModal();
#0157 }
878
…………………………………………………………Page 941
小说推荐
- Java编程思想第4版[中文版](PDF格式)
- -Page 1-Page 2《Thinking In Java》中文版作者:Bruce Eckel主页:http/BruceEckel.编译:Trans Bot主页:http/memberease~transbot致谢-献给那些直到现在仍在孜孜不倦创造下一代计算机语言的人们!指导您利用万维网的语言进
- 其他
- 最新章:第295章
- VB2008从入门到精通(PDF格式英文版)
- -Page 1(R)The eXperT’s Voice inBeginningVB 2008From Novice to ProfessionalChristian Gross-Page 2-Page 3-Beginning VB 2008From Novice to Professional■C
- 其他
- 最新章:第214章
- oracle从入门到精通(PDF格式)
- -Page 1-Oracle 从入门到精通-Page 2-资源来自网络,仅供学习 Oracle 从入门到精通一、SQL 8
- 其他
- 最新章:第37章
- C语言游戏编程从入门到精通(PDF格式)
- -Page 1-Page 2-Page 3-Page 4-Page 5-Page 6-Page 7-Page 8-Page 9-Page 10-Page 11-Page 12-Page 13-Page 14
- 其他
- 最新章:第4章
- 深入浅出
- 《深入浅出》作者:白小骨晋江VIP20140610完结+1番外非V章节总点击数:67370 总书评数:209 当前被收藏数:764 文章积分:11,386,657文案:每个前男友都是女人掉过的坑,从何典阳这个坑里往外爬的梁温暖一脸血表示,何典阳他这个深坑实在太坑爹。何典阳:我是坑?梁温暖…别看我,我
- 激情
- 最新章:第74章
- 深入浅出[娱乐圈]
- 文案【忠犬影帝攻X傲娇明星受,1V1轻松甜文,前期互相试探,38章在一起后甜甜甜,两人都有细微的变化和成长~这也是我用心构思攻受感情发展的文,但数据有点太惨了,没入V可以全文免费看,还是想求点收藏呀,数据好看点吧,让我开心一下(笑哭.jpg)流量偶像白漾和影帝顾瑜祁关系很僵,传言两人出道时不合而互相
- 激情
- 最新章:第59章
- JMS简明教程(PDF格式)
- -Page 1-JMS1.1规范中文版卫建军2007‐11‐22-Page 2
- 其他
- 最新章:第28章
- SQL语言艺术(PDF格式)
- -Page 1-SQLSSQQLL语言艺术内容介绍本书分为12章,每一章包含许多原则或准则,并通过举例的方式对原则进行解释说明。这些例子大多来自于实际案例,对九种SQL经典查询场景以及其性能影响讨论,非常便于实践,为你数据库应用维护人员阅读。资深 SQL 专家 Stéphane Faroult倾力打
- 其他
- 最新章:第27章
- C语言实例教程(PDF格式)
- -Page 1-前 言Visual C+是开发运行于Windows 95和Windows NT环境下的Win32应用程序的可视化编程工具中最重要的成员之一,它为软件开发人员提供了完整的编辑、编译和调试工具和建立于Win32 API(ApplicationProgramming Interface)基
- 其他
- 最新章:第143章