CreateIC

CreateIC是用於電腦系統的一個函式。

簡介

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)

相關詞條

相關搜尋

熱門詞條

聯絡我們