以前一直不知道AFX_MSG是什么意思,只是觉得它应该是个消息映射函数,但是具体代表什么意思,会返回一个什么样的值是一点都不清楚,今天查了下资料,把查到的东西放这,以免以后忘了还得再查。 afx_msg 是一个宏 标识是消息映射函数,增加可读性。 在 MSDN里是这样定义的: AFX_MSG remarks ClassWizard and AppWizard insert specially formatted comment delimiters in your source code files to mark the places in your files that ClassWizard can write to. AFX_MSG is used to mark the beginning and end of ClassWizard entries in your header file (.H) related to message maps:
在CSDN 中也有人这样解释: afx_msg是给MFC classwiard作的标记,表示这个.cpp文件中classwiard应该插入代码的地方。 如果把{{//afx_msg ......等类似的符号删了,classwizard 就会报错。 |
关于afx_msg
最新推荐文章于 2020-11-26 23:01:55 发布