visual c++ 技术内幕 的第一个例子就无法运行? 原因是你的Platform SDK库版本太老,(98年的吧,早就过时了),不支持新函数(如GetWindowLongPtr等),快去Microsoft当一个新的Platform SDK吧。最新版本是今年2月份的! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 to Maple424(枫舞): 谢谢你的参与,不过<<visual c++ 技术内幕>>(第四版) 可是针对 visual c++ 5.0 写的. 那时还没到98年呢(作者 david 97年就死了!) ,恐怕不是你说的原因. 第一个问题:把 bool CMyApp::InitInstance() 改成 BOOL CMyApp::InitInstance()第二个问题:你在录入CMyFrame的类说明时是不是丢了GetMessageMap的说明,或者你录入的程序和潘大哥讲的不对应。 1.请问bool和BOOL都是什么意思?2.录入绝对没问题,你们可以找原书看一下. 有没有把改设置的:在Setting下改成Use MFC as a share dll! c:\program files\microsoft visual studio\myprojects\kk\kk.cpp(14) : error C2509: '_GetBaseMessageMap' : member function not declared in 'CMyFrame' c:\program files\microsoft visual studio\myprojects\kk\kk.h(10) : see declaration of 'CMyFrame'c:\program files\microsoft visual studio\myprojects\kk\kk.cpp(14) : error C2509: 'GetMessageMap' : member function not declared in 'CMyFrame' c:\program files\microsoft visual studio\myprojects\kk\kk.h(10) : see declaration of 'CMyFrame'to fz_zhou(vcfan): 下面就是改后的结果.错误多了几个. c:\program files\microsoft visual studio\myprojects\kk\kk.cpp(14) : warning C4273: 'protected: static struct AFX_MSGMAP const CFrameWnd::messageMap' : inconsistent dll linkage. dllexport assumed.c:\program files\microsoft visual studio\myprojects\kk\kk.cpp(14) : error C2491: 'CMyFrame::CFrameWnd::messageMap' : definition of dllimport static data member not allowedError executing cl.exe. ??很奇怪阿,只要按照fz_zhou(vcfan) 的,我试了试,发现没有这些原因阿 因为这个我试过,MFC是一个当然要用到MFC库了1` 求推荐几本书,谢谢! MFC删除系统菜单项后怎么还显示出来 内容已编辑! 从CEditView继承如何设置字体颜色 背景色 #◎#◎#◎ 急急急, 问关于MDI的问题 ◎#◎#◎# 关于消息的传递 OpenGL贴图问题-请教 请教如何将数据输出到Excel文件? 谢谢! VC中的实现报表控件的问题,请高手帮忙~~~急!在线等! 我做的控件为什么VB不能用? 急!!!这句话怎么翻译:wavelet speech enhancement based on the teager energy operator ★★★十万火急★★★到低怎样用VC发布版编译程序★★★
谢谢你的参与,不过<<visual c++ 技术内幕>>(第四版) 可是针对 visual c++ 5.0 写的.
那时还没到98年呢(作者 david 97年就死了!) ,恐怕不是你说的原因.
把 bool CMyApp::InitInstance() 改成 BOOL CMyApp::InitInstance()第二个问题:
你在录入CMyFrame的类说明时是不是丢了GetMessageMap的说明,或者你录入的程序和潘大哥讲的不对应。
2.录入绝对没问题,你们可以找原书看一下.
c:\program files\microsoft visual studio\myprojects\kk\kk.h(10) : see declaration of 'CMyFrame'
c:\program files\microsoft visual studio\myprojects\kk\kk.cpp(14) : error C2509: 'GetMessageMap' : member function not declared in 'CMyFrame'
c:\program files\microsoft visual studio\myprojects\kk\kk.h(10) : see declaration of 'CMyFrame'
to fz_zhou(vcfan): 下面就是改后的结果.错误多了几个. c:\program files\microsoft visual studio\myprojects\kk\kk.cpp(14) : warning C4273: 'protected: static struct AFX_MSGMAP const CFrameWnd::messageMap' : inconsistent dll linkage. dllexport assumed.
c:\program files\microsoft visual studio\myprojects\kk\kk.cpp(14) : error C2491: 'CMyFrame::CFrameWnd::messageMap' : definition of dllimport static data member not allowed
Error executing cl.exe.
很奇怪阿,只要按照fz_zhou(vcfan) 的,我试了试,发现没有这些原因阿