TE Edit Control Win32 / Win64 Help
Product page

TerApplyComment

Apply comment to the selected text.

int TerApplyComment(hWnd, ShowDialog, AuthorName, AuthorInitials, CommentText, repaint)
HWND hWnd;The handle of the window to be accessed
BOOL ShowDialog;Set to TRUE to show a dialog to accept the author information and the comment text. Set to false to use the information from the remaining parameters passed to this method
LPBYTE AuthorName;The author name for the comment
LPBYTE AuthorInitials;Author initials
LPBYTE CommentText;Comment text. Use the cr/lf sequence to include a paragraph break.
BOOL repaint;refresh the screen after this operation

Comment: Some text must be selected before calling this method. The comment is applied to the selected text. The selected text is highlighted and pointed to the comment text in the right-margin area. The comments are displayed horizontally when the right-margin is sufficiently wide. Otherwise, it is displayed vertically.

Return Value: This function returns the comment-id when successful, otherwise it returns a -1 value.