ImageGear for C and C++ on Linux v20.0 - Updated
ART_edit_cut
API Reference Guide > ART Component API Reference > ART Component Functions Reference > Edit Clipboard Functions > ART_edit_cut

This function cuts an array list of marks and places it on the clipboard.

Declaration:

 
Copy Code
AT_ERRCOUNT ART_edit_cut(
        HIGEAR hIGear, 
        LPART_MARK_INDEX lpMarkIndex, 
        UINT nMarkCount
);

Arguments:

Name Type Description
hIGear HIGEAR HIGEAR handle to the image.
lpMarkIndex LPART_MARK_INDEX A far pointer to an array list of mark identifiers.
nMarkCount UINT A variable of type UNIT which tells ART the number of marks in the list.

Return Value:

Returns the number of ImageGear errors that occurred during the function call.

Supported Raster Image Formats:

All pixel formats supported by ImageGear for C and C++.

Example:

 
Copy Code
HIGEAR hIGear; /* HIGEAR handle of image */
AT_ERRCOUNT nErrcount; /* tally of IG errors on stack */
DWORD dwMarkCount; /* number of marks selected */
HGLOBAL hGlobal; /* Windows handle to  */
/* memory area  */
ART_MARK_INDEX lpMarkIndex; /* index to mark(s) */
HWND hWnd;  /* Windows handle to  */
/* image window  */
case ID_EDIT_CUT:
nErrcount = ART_mark_select_count(hIGear,
   &dwMarkCount);
hGlobal = GlobalAlloc(GMEM_MOVEABLE, dwMarkCount *
sizeof(ART_MARK_INDEX));
lpMarkIndex = (LPART_MARK_INDEX)GlobalLock(hGlobal);
nErrcount = 
ART_mark_selected_first(hIGear,lpMarkIndex);
for (i = 1; i < (INT)dwMarkCount; i++)
{
lpMarkIndex[i] = lpMarkIndex[i - 1];
nErrcount = ART_mark_selected_next(hIGear,
lpMarkIndex + i);
}
nErrcount = ART_edit_cut(hIGear, lpMarkIndex, 
dwMarkCount);
nErrcount = ART_GUI_mark_paint(hIGear, IG_GRP_DEFAULT, 
ART_INVALID_ID, hWnd, TRUE);
GlobalUnlock(hGlobal);
GlobalFree(hGlobal);
break;

Remarks:

The cut marks are visible until the screen is repainted. Use ART_GUI_mark_paint() function.

An error is set if any of the following conditions are met:

Is this page helpful?
Yes No
Thanks for your feedback.