The CreateIC function 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.
HDC CreateIC(
LPCTSTR lpszDriver, // pointer to string specifying driver name
LPCTSTR lpszDevice, // pointer to string specifying device name
LPCTSTR lpszOutput, // pointer to string specifying port or file
// name
CONST DEVMODE *lpdvmInit
// pointer to optional initialization data
);
If the function succeeds, the return value is the handle to an information context.
If the function fails, the return value is NULL.
Windows NT: To get extended error information, call GetLastError.
An error occurs if an application calls a GDI drawing function and supplies a handle identifying an information context.
When you no longer need the information device context, call the DeleteDC function to delete it.
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in wingdi.h.
Import Library: Use gdi32.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT.
Device Contexts Overview, Device Context Functions, DeleteDC, DocumentProperties, DEVMODE, GetDeviceCaps