MSDN:"This class and its members cannot be used in applications that execute in the Windows Runtime"
MSDN: "This class and its members cannot be used in applications that execute in the Windows Runtime"
我在使用 CImage
class 时遇到问题,它是 MFC 的一部分:
void SaveBmp(HBITMAP handle, CString name)
{
CImage image;
image.Attach(handle);
image.Save(name,ImageFormatBMP);
}
符号 ImageFormatBMP
是未声明的标识符。
我进入 MSDN section for the CImage class,在页面顶部看到了这个奇怪的注释:
This class and its members cannot be used in
applications that execute in the Windows Runtime.
有人可以向我解释这个(荒谬的 IMO)注释的含义吗?
除了 Windows 应用程序之外,这个 class 还能用在什么地方???
谢谢。
Windows 运行时 (WinRT) 是一种特殊的 运行 时间,可用于应用程序。这个注释只是告诉你,如果你在 WinRT 下开发一个应用程序到 运行,这个 classes 是不可用的。
引自维基百科:
Windows Runtime (WinRT), is a platform-agnostic application
architecture first introduced in Windows 8 and Windows Server 2012 in
2012. WinRT supports development in C++/CX (Component Extensions, a language based on C++), JavaScript-TypeScript, and the managed code
languages C# and Visual Basic .NET (VB.NET). WinRT applications
natively support both the x86 and ARM processors, and run inside a
sandboxed environment to allow greater security and stability. WinRT
components are designed with interoperability between multiple
languages and APIs in mind, including native, managed and scripting
languages.
https://en.wikipedia.org/wiki/Windows_Runtime
此外,ImageFormatBMP 是 GDIPlus 的一部分,但不是 CImage 的一部分 class。所以使用它需要使用 include GDIplus gdiplus header 和相应的命名空间。
我在使用 CImage
class 时遇到问题,它是 MFC 的一部分:
void SaveBmp(HBITMAP handle, CString name)
{
CImage image;
image.Attach(handle);
image.Save(name,ImageFormatBMP);
}
符号 ImageFormatBMP
是未声明的标识符。
我进入 MSDN section for the CImage class,在页面顶部看到了这个奇怪的注释:
This class and its members cannot be used in
applications that execute in the Windows Runtime.
有人可以向我解释这个(荒谬的 IMO)注释的含义吗?
除了 Windows 应用程序之外,这个 class 还能用在什么地方???
谢谢。
Windows 运行时 (WinRT) 是一种特殊的 运行 时间,可用于应用程序。这个注释只是告诉你,如果你在 WinRT 下开发一个应用程序到 运行,这个 classes 是不可用的。
引自维基百科:
Windows Runtime (WinRT), is a platform-agnostic application architecture first introduced in Windows 8 and Windows Server 2012 in 2012. WinRT supports development in C++/CX (Component Extensions, a language based on C++), JavaScript-TypeScript, and the managed code languages C# and Visual Basic .NET (VB.NET). WinRT applications natively support both the x86 and ARM processors, and run inside a sandboxed environment to allow greater security and stability. WinRT components are designed with interoperability between multiple languages and APIs in mind, including native, managed and scripting languages.
https://en.wikipedia.org/wiki/Windows_Runtime
此外,ImageFormatBMP 是 GDIPlus 的一部分,但不是 CImage 的一部分 class。所以使用它需要使用 include GDIplus gdiplus header 和相应的命名空间。