GreCloseDC
Appearance
GreCloseDC closes a device context.
This function is supported by the graphics engine.
Syntax
GreCloseDC(hdc, pInstance, lFunction)
Parameters
- hdc (HDC) - input
- Device context handle.
- pInstance (PVOID) - input
- Pointer to instance data.
- lFunction (ULONG) - input
- High-order WORD=flags; low-order WORD=NGreCloseDC.
Return Code
- fSuccess (BOOL) - returns
- Return codes.
On completion, the handling routine must return BOOLEAN (fSuccess).
- TRUE Successful
- FALSE Error
Possible Errors Detected: When an error is detected, the graphics engine calls WinSetErrorInfo to post the condition. Error codes for conditions that the handling routine is expected to check include:
- PMERR_BASE_ERROR
- PMERR_BITMAP_IS_SELECTED
- PMERR_DEV_FUNC_NOT_INSTALLED
- PMERR_EXCEEDS_MAX_SEG_LENGTH
- PMERR_HBITMAP_BUSY
- PMERR_HDC_BUSY
- PMERR_INSUFFICIENT_MEMORY
- PMERR_INV_BITMAP_DIMENSION
- PMERR_INV_CODEPAGE
- PMERR_INV_COORDINATE
- PMERR_INV_DC_TYPE
- PMERR_INV_HBITMAP
- PMERR_INV_HDC
- PMERR_INV_HRGN
- PMERR_INV_ID
- PMERR_INV_IN_AREA
- PMERR_INV_IN_PATH
- PMERR_INV_INFO_TABLE
- PMERR_INV_LENGTH_OR_COUNT
- PMERR_INV_RECT
- PMERR_INV_REGION_CONTROL
- PMERR_INV_SCAN_START
Refer to the "Error Explanations" section of the Presentation Manager Programming Reference for further explanation.
Remarks
If the device context is a memory DC that has a bit map selected, the engine deselects the bit map before destroying the DC. This function deletes any visible regions and clip regions selected into the DC.