随笔-60  评论-262  文章-1  trackbacks-0

http://blog.tinybrowser.net/archives/564

posted on 2009-01-08 15:34 free2000fly 阅读(8974) 评论(18)  编辑 收藏 引用

评论:
# re: 能用于 VC6 的 CImage 类 2009-01-08 16:12 | kuafoo
楼主能不能打个包啊  回复  更多评论
  
# re: 能用于 VC6 的 CImage 类 2009-01-08 16:31 | Layabout
这么复杂?不是包含GDI+就行了嘛  回复  更多评论
  
# re: 能用于 VC6 的 CImage 类 2009-01-08 17:18 | 饭中淹
用VC6的理由有点牵强。。。  回复  更多评论
  
# re: 能用于 VC6 的 CImage 类 2009-01-08 17:44 | lwan
可以使用IImgCtx或者OleLoadImage(这个名字不一定正确),IImgCtx除了alpha通道不支持,其他尚可。  回复  更多评论
  
# re: 能用于 VC6 的 CImage 类 2009-01-08 20:11 | free2000fly
@kuafoo
对不起, 目的就是用这么长的代码撑门面, 呵呵  回复  更多评论
  
# re: 能用于 VC6 的 CImage 类 2009-01-09 10:50 | 肥仔
强,支持
对VC6这东西太有感情,完全不可割舍。  回复  更多评论
  
# re: 能用于 VC6 的 CImage 类 2009-01-09 13:46 | 回复
却一定要在 VC6 的圈子里混(因为编译出来的可执行文件不用带一大堆什么.Net框架

谁说的VC7、8、9编译出来的东西一定要带.NET的RUNTIME
  回复  更多评论
  
# re: 能用于 VC6 的 CImage 类 2009-01-09 14:51 | free2000fly
@回复
你真可爱  回复  更多评论
  
# re: 能用于 VC6 的 CImage 类 2009-04-25 10:00 | phcole
前几天就在想办法让VC6能用上CImage,没想到就找到了您的文章……不过写的太模糊了,能不能贴个实例出来呢?先谢过了。  回复  更多评论
  
# re: 能用于 VC6 的 CImage 类 2009-05-29 18:50 | hufz
试了一下,编译总是出错,能不能给出个实例啊.谢谢  回复  更多评论
  
# re: 能用于 VC6 的 CImage 类 2009-12-10 14:45 | wwjjjj
USES_ATL_SAFE_ALLOCA、USES_CONVERSION_EX、T2CW_EX等未定义,楼主能否解决一下  回复  更多评论
  
# re: 能用于 VC6 的 CImage 类 2009-12-17 11:26 | mzwang123
楼主,blog左上角的小老鼠flash特别可爱,能否给我传一个。感激不尽。mzwang123@163.com  回复  更多评论
  
# re: 能用于 VC6 的 CImage 类 2009-12-17 13:32 | free2000fly
# re: 能用于 VC6 的 CImage 类 2010-01-13 09:00 | janeyre
不能用的
比如前面的几行

#pragma once

//#include
#include
//#include
//#include
//#include

#ifndef __TSTRING__
#define __TSTRING__
#include
namespace std {
typedef basic_string _tstring;
}; // namespace std
#endif // __TSTRING__

这是什么语法,#include后面是空的  回复  更多评论
  
# re: 能用于 VC6 的 CImage 类 2010-01-13 10:40 | free2000fly
@janeyre
I'm sorry, 只能通过"查看源码"取得源码. 网页编辑器的问题.  回复  更多评论
  
# re: 能用于 VC6 的 CImage 类 2010-01-31 23:15 | Turtle
我按照您的设定完成之后
从这里copy下来的atlimage.h 檔经过 VC6 compile
会发生以下的error message
C:\Program Files\Microsoft Visual Studio\VC98\ATL\INCLUDE\ATLIMAGE.H(435) : error C2065: 'InterlockedExchangePointer' : undeclared identifier
C:\Program Files\Microsoft Visual Studio\VC98\ATL\INCLUDE\ATLIMAGE.H(435) : error C2440: 'static_cast' : cannot convert from 'int' to 'struct HDC__ *'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
C:\Program Files\Microsoft Visual Studio\VC98\ATL\INCLUDE\ATLIMAGE.H(453) : error C2440: 'static_cast' : cannot convert from 'int' to 'struct HDC__ *'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
Error executing cl.exe.

请问一下该如何解决?
  回复  更多评论
  
# re: 能用于 VC6 的 CImage 类 2010-11-09 13:40 | Turtle
@free2000fly

Actually, it is beacuse the VC6 compliler didn't recognize the identifier "InterlockedExchangePointer," which is claimed in 'Wdm.h."

So we can find the header file, and then copy the code in regarding of the "InterlockedExchangePointer" and then paste into atlimage.h.

Here is the code:
#ifndef InterlockedExchangePointer
// NT's new InterlockedExchangePointer() takes care of 32 bit/64 bit pointers.
// whereas the old InterlockedExchange() only work on 32 bit pointers.
//
__inline PVOID InterlockedExchangePointer( PVOID *Target, PVOID Value ) {
return (PVOID) InterlockedExchange( (LPLONG)Target, (LONG)Value );
}
#endif

I have placed in the head of the file "atlimage.h" and it can pass the compilation.

F.Y.I.  回复  更多评论
  

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理