This function cuts an array list of marks and places it on the clipboard.
Copy Code
|
|
---|---|
AT_ERRCOUNT ART_edit_cut( HIGEAR hIGear, LPART_MARK_INDEX lpMarkIndex, UINT nMarkCount ); |
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. |
Returns the number of ImageGear errors that occurred during the function call.
All pixel formats supported by ImageGear for C and C++.
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; |
An error is set if any of the following conditions are met: