Editor_EditColumn

Moves, copies, deletes, or combines specified columns of the current CSV document. You can use this inline function or explicitly send the EE_EDIT_COLUMN message.

HRESULT Editor_EditColumn( HWND hwnd, UINT nFlags, int iColumnFrom1, int iColumnFrom2, int iColumnTo, LPCWSTR pszInsert, UINT nCombineFlags = 0, LPWSTR pszLocale = NULL );

Parameters

hwnd

Specifies the window handle of the view or frame of EmEditor.

nFlags

You can specify one of the following values.

Value

Meaning

COLUMN_MOVE

Moves columns from iColumn1 through iColumn2 before iColumnTo.

COLUMN_COPY

Copies columns from iColumn1 through iColumn2 before iColumnTo.

COLUMN_CONCAT

Concatenates columns from iColumn1 through iColumn2, optionally using pszInsert as a separator.

COLUMN_COALESCE

Combines columns from iColumn1 through iColumn2 into one column using the first non-empty value.

COLUMN_DELETE

Deletes columns from iColumn1 through iColumn2.

COLUMN_SELECT

Selects columns from iColumn1 through iColumn2.

COLUMN_SELECT_NO_HEADINGS

Selects columns from iColumn1 through iColumn2, excluding headings.

iColumn1

Specifies the first column to apply the message.

iColumn2

Specifies the last column to apply the message.

iColumnTo

Specifies the column to move or copy the columns before if COLUMN_MOVE or COLUMN_COPY is specified. This field is used only when COLUMN_MOVE or COLUMN_COPY is specified.

pszInsert

Specifies a string as a separator when concatenating columns. This field is used only when COLUMN_CONCAT is specified.

nCombineFlags

You can specify a combination of the following values. SORT_ENABLED must be specified to sort strings, and combine with other flags to specify the sort behavior. SORT_DELETE_DUPLICATE must be specified to remove duplicate strings. This parameter is used only if COLUMN_CONCAT is specified in the nFlags parameter. This parameter can be omitted.

Value

Meaning

NORM_IGNORECASE

Case is ignored.

NORM_IGNOREKANATYPE

Hiragana and Katakana characters compare as equal.

NORM_IGNORENONSPACE

Nonspacing characters are ignored.

NORM_IGNORESYMBOLS

Symbols are ignored.

NORM_IGNOREWIDTH

The difference between half-width and full-width characters is ignored.

SORT_BINARY_COMPARISON

Fast binary comparison is used to sort. The locale information is ignored.

SORT_DATE

Sorts date and time.

SORT_DELETE_DUPLICATE

Removes duplicate strings.

SORT_DIGITSASNUMBERS

Digits are sorted as numbers even when sorted by alphabetical order.

SORT_ENABLED

Sorts split strings.

SORT_IGNORE_PREFIX

Leading non-numeric characters are ignored when using Sort Smallest to Largest or Sort Largest to Smallest commands.

SORT_IPV4

Sorts IPv4 addresses.

SORT_IPV6

Sorts IPv6 addresses.

SORT_LENGTH

Sorts strings by the number of characters.

SORT_LENGTH_VIEW

Full width characters are treated as 2 characters when using Sort Shortest to Longest or Sort Longest to Shortest commands.

SORT_NUM

Sorts numbers.

SORT_GROUP_IDENTICAL

Groups identical strings when sorted by occurrence. Must be specified with SORT_OCCURRENCE.

SORT_OCCURRENCE

Sorts by occurrence.

SORT_RANDOM

Sorts randomly.

SORT_REMOVE_EMPTY

Removes empty strings.

SORT_REVERSE

Sorts in reverse order.

SORT_STABLE

Stable sort is used. The stable sort maintains the relative order of records. The stable sort is usually slower.

SORT_STRINGSORT

Punctuation marks are treated the same as symbols.

SORT_TEXT

Sorts text.

SORT_WORDS

Sorts strings by the number of words.

pszLocale

Specifies the locale used to sort. If this is empty or omitted, the locale specified in the Customize dialog box is used.

Return Values

The return value is S_OK if succeeds.

Version

Supported on Version 19.7 or later.