积极答复者
Cimage类的问题

问题
-
很早的代码,在VC6环境下的,头文件是 #include <image.h>
现在VS2008,编译由于找不到 image.h
我猜测性的把它变成 #include<atlimage.h>
于是有:
error C2039: 'ReadFile' : is not a member of 'ATL::CImage'
error C2039: 'Stretch' : is not a member of 'ATL::CImage'
error C2039: 'GetEffWidth' : is not a member of 'ATL::CImage'
error C2039: 'GetDepth' : is not a member of 'ATL::CImage'
error C2039: 'GetRGB' : is not a member of 'ATL::CImage'请问怎么回事啊?
答案
-
beyard 写: 很早的代码,在VC6环境下的,头文件是 #include <image.h>
现在VS2008,编译由于找不到 image.h
我猜测性的把它变成 #include<atlimage.h>
于是有:
error C2039: 'ReadFile' : is not a member of 'ATL::CImage'
error C2039: 'Stretch' : is not a member of 'ATL::CImage'
error C2039: 'GetEffWidth' : is not a member of 'ATL::CImage'
error C2039: 'GetDepth' : is not a member of 'ATL::CImage'
error C2039: 'GetRGB' : is not a member of 'ATL::CImage'请问怎么回事啊?
其实Cl.exe(C++编译器已经告诉怎么回事了)
打开MSDN,索引,输入"C2039",不要忽视你身边的专家呀,
-
MSDN中CImage并没有以上接口
http://msdn.microsoft.com/en-us/library/bwea7by5(VS.80).aspx
没用过这个CImage,不知道你用得是否是MFC的CImage,也可能在VC8中对接口进行了修改。或者CImage不是MFC公开的接口。
不过在http://www.codeproject.com/KB/graphics/cximage.aspx
找到了一个CXImage类,第三方模块,不知道是否对你有所帮助。
全部回复
-
beyard 写: 很早的代码,在VC6环境下的,头文件是 #include <image.h>
现在VS2008,编译由于找不到 image.h
我猜测性的把它变成 #include<atlimage.h>
于是有:
error C2039: 'ReadFile' : is not a member of 'ATL::CImage'
error C2039: 'Stretch' : is not a member of 'ATL::CImage'
error C2039: 'GetEffWidth' : is not a member of 'ATL::CImage'
error C2039: 'GetDepth' : is not a member of 'ATL::CImage'
error C2039: 'GetRGB' : is not a member of 'ATL::CImage'请问怎么回事啊?
其实Cl.exe(C++编译器已经告诉怎么回事了)
打开MSDN,索引,输入"C2039",不要忽视你身边的专家呀,
-
MSDN中CImage并没有以上接口
http://msdn.microsoft.com/en-us/library/bwea7by5(VS.80).aspx
没用过这个CImage,不知道你用得是否是MFC的CImage,也可能在VC8中对接口进行了修改。或者CImage不是MFC公开的接口。
不过在http://www.codeproject.com/KB/graphics/cximage.aspx
找到了一个CXImage类,第三方模块,不知道是否对你有所帮助。