Lib "gdi32" Alias "CreateICA" (ByVal lpDriverName As String, ByVal lpDeviceName As String, ByVal lpOutput As String, lpInitData As DEVMODE) As Long
C++:
HDC CreateIC(
_In_ LPCTSTR lpszDriver,
_In_ LPCTSTR lpszDevice,
LPCTSTR lpszOutput,
_In_ constDEVMODE *lpdvmInit
);
[]
[说明]
为专用设备创建一个信息场景。信息场景可用来快速获取某设备的信息而无须创建设备场景这样的系统开销。它可作为参数传递给GetDeviceCaps一类的信息函数以替代设备场景参数
[From MSDN :]
The CreateICfunction creates an information context for the specified device. The information context provides a fast way to get information about the device without creating a device context (DC). However, GDI drawing functions cannot accept a handle to an information context.
[]
lpDriverName --- String,用vbNullString,除非:1、用DISPLAY,是获取整个屏幕的设备场景;2、用WINSPOOL,则是访问打印驱动
lpDeviceName --- String,所用专门设备的名称。该名由打印管理器分配显示
lpOutput ------- String,用vbNullString传递null值给该参数
lpInitData ----- DEVMODE,这个结构保存初始值
[From MSDN :]
• lpszDriver[in]
• A pointer to a null-terminated character string that specifies the name of the device driver (for example, Epson).
• lpszDevice[in]
• A pointer to a null-terminated character string that specifies the name of the specific output device being used, as shown by the Print Manager (for example, Epson FX-80). It is not the printer model name. ThelpszDeviceparameter must be used.
• lpszOutput
• This parameter is ignored and should be set toNULL. It is provided only for compatibility with 16-bit Windows.
• lpdvmInit[in]
• A pointer to aDEVMODEstructure containing device-specific initialization data for the device driver. TheDocumentPropertiesfunction retrieves this structure filled in for a specified device. ThelpdvmInitparameter must beNULLif the device driver is to use the default initialization (if any) specified by the user.
[返回值]
Long,执行成功为信息场景句柄,失败则为零
[From MSDN :]
If the function succeeds, the return value is the handle to an information context.
If the function fails, the return value is NULL.
Long,不用时一定要用DeleteDC函数删除设备场景。进一步的说明参考CreateDC函数
[From MSDN :]
When you no longer need the information DC, call the DeleteDCfunction.
Minimum supported : Windows 2000 platform.
Unicode and ANSI names: CreateICW(Unicode) and CreateICA(ANSI)
Copyright 2023 fuwu029.com赣ICP备2022008914号-4