MCPcopy Create free account
hub / github.com/AutoHotkey/AutoHotkey / LV_Delete

Method LV_Delete

source/script2.cpp:15668–15683  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15666
15667
15668ResultType GuiControlType::LV_Delete(ResultToken &aResultToken, int aID, int aFlags, ExprTokenType *aParam[], int aParamCount)
15669// Returns: 1 on success and 0 on failure.
15670// Parameters:
15671// 1: Row index (one-based when it comes in).
15672{
15673 if (ParamIndexIsOmitted(0))
15674 _o_return(SendMessage(hwnd, LVM_DELETEALLITEMS, 0, 0)); // Returns TRUE/FALSE.
15675
15676 // Since above didn't return, there is a first parameter present.
15677 int index = ParamIndexToInt(0) - 1; // -1 to convert to zero-based.
15678 if (index > -1)
15679 _o_return(SendMessage(hwnd, LVM_DELETEITEM, index, 0)); // Returns TRUE/FALSE.
15680 else
15681 // Even if index==0, for safety, it seems best not to do a delete-all.
15682 _o_throw_param(0);
15683}
15684
15685
15686

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected