Warning: This function causes memory access violations, do not use.
int deleteCtlItems(int n)
Returns false if the control number is out of range, not in use, or not a LISTBOX, COMBOBOX or TAB control.
Deletes all items in a LISTBOX, COMBOBOX or a TAB control.
Please do not use this function. Note that there is currently a bug in this function that causes memory access violations, resulting in a crash in the host application when used with listboxes & comboboxes. As a workaround, use setCtlText(n,"") instead to reset the text contents to zero, which is the same as what FilterMeister does internally (or at least, is meant to).
%fml ctl[0]: LISTBOX(VSCROLL), Text="Harry\nLarry\nSally\nCarrie" ctl[4]: PUSHBUTTON, Text="Delete Everyone", Size=(100,*) ctl[7]: PUSHBUTTON, Text="Add Everyone", Size=(100,*) OnCtl(n): { if (n==4 && e == FME_CLICKED) { // Due to a bug, this next line // causes a memory access violation //deleteCtlItems(0); // As a workaround, do this instead setCtlText(0, ""); } if (n==7 && e == FME_CLICKED) { setCtlText(0, "Harry\nLarry\nSally\nCarrie"); } return false; }