TE Edit Control Win32 / Win64 Help
Product page

TerSetUndoRef

Set or retrieve undo reference id.

int TerSetUndoRef(hWnd, UndoRef)
HWND hWnd;Window handle to access
int UndoRef;The undo reference id. Set this parameter to -1 to simply retrieve the current undo reference id.

Comment: This function can be used to connect multiple API calls to one undo buffer. You would first call this function before any API is called to retrieve the current undo reference count. You would then call this function before each API call to reset the undo reference to the initial value.

Return Value: This function returns the previous value of the undo reference id when successful. Otherwise it returns -1.