勇芳软件工作室.汉化:  GDI+ Reference > Structures >

GdiplusStartupInput

Previous pageReturn to chapter overviewNext page

GdiplusStartupInput结构保存GdiplusStartup函数所需的参数块。

 

C++ 语法

 

struct GdiplusStartupInput

{

UINT32 GdiplusVersion;            

DebugEventProc DebugEventCallback;

BOOL SuppressBackgroundThread;

BOOL SuppressExternalCodecs;

 

GdiplusStartupInput(

DebugEventProc debugEventCallback = NULL,

BOOL suppressBackgroundThread = FALSE,

BOOL suppressExternalCodecs = FALSE)

{

GdiplusVersion = 1;

DebugEventCallback = debugEventCallback;

SuppressBackgroundThread = suppressBackgroundThread;

SuppressExternalCodecs = suppressExternalCodecs;

}

};

 

PowerBASIC 语法

 

TYPE GdiplusStartupInput

GdiplusVersion AS DWORD

DebugEventCallback AS DWORD

SuppressBackgroundThread AS LONG

SuppressExternalCodecs AS LONG

END TYPE

 

成员

 

GdiplusVersion

 

指定Microsoft Windows GDI +的版本。必须为1。

 

DebugEventCallback

 

指向GDI +可以在调试版本上为断言和警告调用的回调函数。默认值为NULL。

 

SuppressBackgroundThread

 

指定是否禁止GDI +后台线程的布尔值。如果将此成员设置为TRUE,GdiplusStartup返回(在其输出参数中)指向挂钩函数的指针和指向未挂钩函数的指针。您必须适当地调用这些函数来替换后台线程。如果您不想负责调用挂钩和取消挂钩功能,请将此成员设置为FALSE。默认值为FALSE。

 

SuppressExternalCodecs

 

指定是否要GDI +抑制外部图像编解码器的布尔值。GDI +版本1.0不支持外部图像编解码器,因此该参数将被忽略。

 

备注

 

GdiplusStartupInput结构提供了将GdiplusVersion成员设置为1的构造函数,并允许您为其他三个成员指定值。所有的构造函数参数都是可选的,因此您可以声明一个类型为GdiplusStartupInput的变量,而不将任何参数传递给构造函数,并且所有成员都将使用适当的默认值进行初始化。

 

如果将GdiplusStartupinput参数的SuppressBackgroundThread成员设置为TRUE,则必须调用输出参数中返回的hook和unhook函数。在应用程序的主要消息循环之前和之后调用这些功能;也就是说,在GDI +的生命周期中活动的消息循环。在循环开始之前调用挂钩函数,并在循环结束后调用unhook函数。