12 CWnd
1 CCmdTarget
CCmdTarget::OnCmdMsg()
1111 CMyWinApp
111 CWinApp
1 CCmdTarget
CWnd::DefWindowProc()
202
…………………………………………………………Page 265……………………………………………………………
第3章 MFC 六大關鍵技術之模擬
Frame8 范例程序
MFC。H
#0001 #define TRUE 1
#0002 #define FALSE 0
#0003
#0004 typedef char* LPSTR;
#0005 typedef const char* LPCSTR;
#0006
#0007 typedef unsigned long DWORD;
#0008 typedef int BOOL;
#0009 typedef unsigned char BYTE;
#0010 typedef unsigned short WORD;
#0011 typedef int INT;
#0012 typedef unsigned int UINT;
#0013 typedef long LONG;
#0014
#0015 typedef UINT WPARAM;
#0016 typedef LONG LPARAM;
#0017 typedef LONG LRESULT;
#0018 typedef int HWND;
#0019
#0020 #define WM_MAND 0x0111
#0021 #define WM_CREATE 0x0001
#0022 #define WM_PAINT 0x000F
#0023 #define WM_NOTIFY 0x004E
#0024
#0025 #define CObjectid 0xffff
#0026 #define CCmdTargetid 1
#0027 #define CWinThreadid 11
#0028 #define CWinAppid 111
#0029 #define CMyWinAppid 1111
#0030 #define CWndid 12
#0031 #define CFrameWndid 121
#0032 #define CMyFrameWndid 1211
#0033 #define CViewid 122
#0034 #define CMyViewid 1221
#0035 #define CDocumentid 13
#0036 #define CMyDocid 131
#0037
#0038 #include
#0039
#0040 /////////////////////////////////////////////////////////////////
203
…………………………………………………………Page 266……………………………………………………………
第篇 勿在浮砂築高台
#0041 // Window message map handling
#0042
#0043 struct AFX_MSGMAP_ENTRY; // declared below after CWnd
#0044
#0045 struct AFX_MSGMAP
#0046 {
#0047 AFX_MSGMAP* pBaseMessageMap;
#0048 AFX_MSGMAP_ENTRY* lpEntries;
#0049 };
#0050
#0051 #define DECLARE_MESSAGE_MAP()
#0052 static AFX_MSGMAP_ENTRY _messageEntries'';
#0053 static AFX_MSGMAP messageMap;
#0054 virtual AFX_MSGMAP* GetMessageMap() const;
#0055
#0056 #define BEGIN_MESSAGE_MAP(theClass; baseClass)
#0057 AFX_MSGMAP* theClass::GetMessageMap() const
#0058 { return &theClass::messageMap; }
#0059 AFX_MSGMAP theClass::messageMap =
#0060 { &(baseClass::messageMap);
#0061 (AFX_MSGMAP_ENTRY*) &(theClass::_messageEntries) };
#0062 AFX_MSGMAP_ENTRY theClass::_messageEntries'' =
#0063 {
#0064
#0065 #define END_MESSAGE_MAP()
#0066 { 0; 0; 0; 0; AfxSig_end; (AFX_PMSG)0 }
#0067 };
#0068
#0069 // Message map signature values and macros in separate header
#0070 #include 〃afxmsg_。h〃
#0071
#0072 class CObject
#0073 {
#0074 public:
#0075 CObject::CObject() {
#0076 }
#0077 CObject::~CObject() {
#0078 }
#0079 };
#0080
#0081 class CCmdTarget : public CObject
#0082 {
#0083 public:
#0084 CCmdTarget::CCmdTarget() {
#0085 }
#0086 CCmdTarget::~CCmdTarget() {
204
…………………………………………………………Page 267……………………………………………………………
第3章 MFC 六大關鍵技術之模擬
#0087 }
#0088
#0089 virtual BOOL OnCmdMsg(UINT nID; int nCode);
#0090
#0091 DECLARE_MESSAGE_MAP() // base class no {{ }} macros
#0092 };
#0093
#0094 typedef void (CCmdTarget::*AFX_PMSG)(void);
#0095
#0096 struct AFX_MSGMAP_ENTRY // MFC 4。0
#0097 {
#0098 UINT nMessage; // windows message
#0099 UINT nCode; // control code or WM_NOTIFY code
#0100 UINT nID; // control ID (or 0 for windows messages)
#0101 UINT nLastID; // used for entries specifying a range of control id"s
#0102 UINT nSig; // signature type (action) or pointer to message #
#0103 AFX_PMSG pfn; // routine to call (or special value)
#0104 };
#0105
#0106 class CWinThread : public CCmdTarget
#0107 {
#0108 public:
#0109 CWinThread::CWinThread() {
#0110
小说推荐
- 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章