是否可以在本机C ++中使用GDI +方法MakeTransparent [英] Is it possible to use the GDI+ method MakeTransparent in native C++
问题描述
大家好,
我在试图使用GDI +函数MakeTransparent时遇到了问题。此函数被列为MSDN中Bitmap的成员,并且在Web上使用.NET提供了大量示例。但是,我在MFC中编写ActiveX控件并使用GDI +,并且报告此方法不可用。错误信息是:
错误C2039:'MakeTransparent':不是'Gdiplus :: Bitmap'的成员
我从未遇到像这样的GDI +功能。有谁知道发生了什么?
我在XP SP3上使用VS 2010
非常感谢
Tom
Hi all,
I've hit a problem trying to use the GDI+ function MakeTransparent. This function is listed as being a member of Bitmap in MSDN and there are plenty of examples mentioned on the web using it from .NET. However, I'm writing an ActiveX control in MFC and using GDI+ and this method is reported as not being available. The error message is:
error C2039: 'MakeTransparent' : is not a member of 'Gdiplus::Bitmap'
I've never encountered a GDI+ function not being available like this. Does anyone know what's going on?
I'm using VS 2010 on XP SP3
Many Thanks
Tom
推荐答案
这似乎是为了回答你的问题...
将GDI +与MFC或本机C / C ++结合使用 [ ^ ]
This seems written to answer your question ...
Using GDI+ with MFC or native C/C++[^]
这是正确的,请参阅文档 [ ^ ]。
That's correct, see the documentation[^].
谢谢回应。似乎在.NET中公开的Bitmap类与GDI +公开的Bitmap类完全不同。
Thanks for the responses. It seems the Bitmap class exposed in .NET is simply different to that which is exposed by GDI+.
这篇关于是否可以在本机C ++中使用GDI +方法MakeTransparent的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!