我发现了可能是完美的答案的上缓冲绘图的一个问题,但由于某些原因我的VS2008的版本似乎不具有的 WriteableBitmap ?我已经尝试包括培训相关的命名空间按文档:

using namespace System::Windows::Media;
using namespace System::Windows::Media::Imaging;

但是,这只是给我的错误:

d:\experiments\graphicscontrols\graphicscontrollib\GraphicsControlLibControl.h(9) : error C2039: 'Media' : is not a member of 'System::Windows'
d:\experiments\graphicscontrols\graphicscontrollib\GraphicsControlLibControl.h(10) : error C3083: 'Media': the symbol to the left of a '::' must be a type
d:\experiments\graphicscontrols\graphicscontrollib\GraphicsControlLibControl.h(10) : error C2039: 'Imaging' : is not a member of 'System::Windows'
d:\experiments\graphicscontrols\graphicscontrollib\GraphicsControlLibControl.h(52) : error C2065: 'WriteableBitmap' : undeclared identifier

我已经安装或更旧版本的.NET的东西吗?有没有办法告诉什么版本的Visual Studio是使用?我已经更新VS到服务包1,其并没有区别。

有帮助吗?

解决方案

您必须针对.NET Framework 3.0或3.5,以得到这个。你还需要一个引用添加到PresentationCore.dll中。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top