EN
此内容没有您的语言版本,但有英语版本。

Status enumeration

Applies to: desktop apps only

The Status enumeration indicates the result of a Windows GDI+ method call.

Syntax

typedef enum  {
  Ok                          = 0,
  GenericError                = 1,
  InvalidParameter            = 2,
  OutOfMemory                 = 3,
  ObjectBusy                  = 4,
  InsufficientBuffer          = 5,
  NotImplemented              = 6,
  Win32Error                  = 7,
  WrongState                  = 8,
  Aborted                     = 9,
  FileNotFound                = 10,
  ValueOverflow               = 11,
  AccessDenied                = 12,
  UnknownImageFormat          = 13,
  FontFamilyNotFound          = 14,
  FontStyleNotFound           = 15,
  NotTrueTypeFont             = 16,
  UnsupportedGdiplusVersion   = 17,
  GdiplusNotInitialized       = 18,
  PropertyNotFound            = 19,
  PropertyNotSupported        = 20,
  ProfileNotFound             = 21 
} Status;

Constants

Ok

Indicates that the method call was successful.

GenericError

Indicates that there was an error on the method call, which is identified as something other than those defined by the other elements of this enumeration.

InvalidParameter

Indicates that one of the arguments passed to the method was not valid.

OutOfMemory

Indicates that the operating system is out of memory and could not allocate memory to process the method call. For an explanation of how constructors use the OutOfMemory status, see the Remarks section at the end of this topic.

ObjectBusy

Indicates that one of the arguments specified in the API call is already in use in another thread.

InsufficientBuffer

Indicates that a buffer specified as an argument in the API call is not large enough to hold the data to be received.

NotImplemented

Indicates that the method is not implemented.

Win32Error

Indicates that the method generated a Win32 error.

WrongState

Indicates that the object is in an invalid state to satisfy the API call. For example, calling Pen::GetColor from a pen that is not a single, solid color results in a WrongState status.

Aborted

Indicates that the method was aborted.

FileNotFound

Indicates that the specified image file or metafile cannot be found.

ValueOverflow

Indicates that the method performed an arithmetic operation that produced a numeric overflow.

AccessDenied

Indicates that a write operation is not allowed on the specified file.

UnknownImageFormat

Indicates that the specified image file format is not known.

FontFamilyNotFound

Indicates that the specified font family cannot be found. Either the font family name is incorrect or the font family is not installed.

FontStyleNotFound

Indicates that the specified style is not available for the specified font family.

NotTrueTypeFont

Indicates that the font retrieved from an HDC or LOGFONT is not a TrueType font and cannot be used with GDI+.

UnsupportedGdiplusVersion

Indicates that the version of GDI+ that is installed on the system is incompatible with the version with which the application was compiled.

GdiplusNotInitialized

Indicates that the GDI+API is not in an initialized state. To function, all GDI+ objects require that GDI+ be in an initialized state. Initialize GDI+ by calling GdiplusStartup.

PropertyNotFound

Indicates that the specified property does not exist in the image.

PropertyNotSupported

Indicates that the specified property is not supported by the format of the image and, therefore, cannot be set.

ProfileNotFound

Indicates that the color profile required to save an image in CMYK format was not found.

Remarks

If you construct a GDI+ object and then immediately call the GetLastStatus method of that object, you can determine whether the constructor succeeded or failed. In such cases, GetLastStatus might return OutOfMemory even though there was plenty of memory available to create the object. Several GDI+ constructors set the status to OutOfMemory when they fail regardless of the reason for failure.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008

Product

GDI+ 1.1

Header

Gdiplustypes.h (include Gdiplus.h)

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

社区附加资源

显示:
© 2014 Microsoft