Deletedc releasedc deleteobject

Source: Internet
Author: User

Deletedc

 

 

This function deletes the specified device context (DC ).

Prototype:

Bool deletedc (HDCHDC);

Parameters:

HDC: handle of the device context.

Return Value:

If the call succeeds, a non-zero value is returned. If the call fails, zero is returned. Call getlasterror to obtain the extended error message.

Note:

If the handle of a device's context environment is calledGetdcThe application cannot delete the context of the device.ReleasedcFunction to release the device context.

Releasedc

Function releases the device context environment (DC) for use by other applications. The effect of the function is related to the device context type.

Prototype:

Int releasedc (hwndHwnd, HDCHDC);

Parameters:

Hwnd: the handle to the window in which the device context is to be released.

HDC: The handle pointing to the device context environment to be released.

Return Value:

The return value indicates whether the device context environment is released. If the device context environment is released successfully, the return value is 1. If the device context environment is not released successfully, the return value is 0.

Note:

Each callGetwindowdcAndGetdcAfter the function retrieves the context of a public device, the application must callReleasedcFunction to release the device context.

Applications cannot call the releasedc function to releaseCreatedc, createcopatibledcThe device context environment created by the function can only be usedDeletedcFunction.

 

Deleteobject

 

This function deletes a logic pen, paint brush, Font, bitmap, area, or palette, and releases all system resources related to the object. After the object is deleted, the specified handle becomes invalid.

Prototype:

Bool deleteobject (hgdiobj hobject );

Parameters:

Hobject: handle of the logic pen, paint brush, Font, bitmap, area, or palette.

Return Value:

A non-zero value is returned. If the specified handle is invalid or has been selected into the device context, the returned value is zero. Call getlasterror to obtain the extended error message.

Note:

Do not delete a painting object (such as a pen or paint brush) when it is selected as a device context. When a color palette paint brush is deleted, the bitmap associated with the paint brush is not deleted, and the paint must be deleted separately.

Deletedc releasedc deleteobject

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.