ImageGear for C and C++ on Windows v21.0 - Updated
API Reference Guide / Core Component API Reference / Core Component Functions Reference / Clipboard Functions / IG_clipboard_paste_available_ex
In This Topic
    IG_clipboard_paste_available_ex
    In This Topic

    This function tells you whether the clipboard contains a valid image or region of interest (ROI) that can be pasted into an image.

    Declaration:

     
    Copy Code
    AT_ERRCOUNT ACCUAPI IG_clipboard_paste_available_ex (
            LPBOOL lpPasteStatus,
            LPAT_MODE lpRegionType
    );
    

    Arguments:

    Name Type Description
    lpPasteStatus LPBOOL A far pointer that returns TRUE if the clipboard contains a region of interest that can be pasted into an image.
    lpRegionType LPAT_MODE A far pointer that returns the type of region stored in the clipboard. Currently the valid values are IG_REGION_IS_RECT, IG_REGION_IS_NON_RECT, IG_REGION_IS_NOT_AVAIL.

    Return Value:

    Returns the number of ImageGear errors that occurred during this function call. If there are no errors, the return value is IGE_SUCCESS.

    Supported Raster Image Formats:

    This function does not process image pixels.

    Sample:

    Image Processing

    Example:

     
    Copy Code
    AT_ERRCOUNT nErrcount;
    HIGEAR hIGear;
    BOOL bNRpasteAvail; /* TRUE if a pasteable image is on clipboard */
    AT_MODE nRegionType; /* type of region on the clipboard */
    nErrcount = IG_clipboard_paste_available_ex(&bNRpasteAvail, &nRegionType);
    if (bNRpasteAvail)
            (...)
    

    Remarks:

    It also returns the type of region contained in the clipboard: rectangular, non-rectangular, or not available. If the clipboard does contain a valid ROI, lpPasteStatus returns TRUE; if lpPasteStatus returns FALSE, the region type returned is IG_REGION_IS_NOT_AVAIL.

    A return value of FALSE does not necessarily mean that the clipboard is empty. It could mean that the clipboard contains non-valued ROI data or text, or that it contains multimedia data.

    To paste a rectangular or non-rectangular ROI into the current image, call IG_clipboard_paste_merge_ex().