WriteableBitmap 不可用?

发布于 2024-07-26 11:12:09 字数 1219 浏览 7 评论 0 原文

我发现什么可能是 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 更新到了 service pack 1,这没有什么区别。

I've discovered what may be the perfect answer to a question on buffered drawing, but for some reason my version of VS2008 doesn't seem to have a WriteableBitmap? I've tried including the relevent namespaces as per the documentation:

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

But that just gives me errors:

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

Do I have an older version of .net installed or something? Is there any way to tell what version visual studio is using? I've updated VS to service pack 1 which made no difference.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

何必那么矫情 2024-08-02 11:12:09

您必须以 .Net Framework 3.0 或 3.5 为目标才能获得此功能。 您还需要添加对PresentationCore.dll 的引用。

You must target .Net framework 3.0 or 3.5 to get this. Also you will need to add a ref to PresentationCore.dll.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文