BCGControlBar Pro for MFC
void CBCGPMaskEdit::EnableSelectByGroup ( BOOL  bEnable = TRUE)
inline

Tells whether the masked edit control allows selecting by group or the whole text.

Use this function to specify whether the masked edit control allows selecting by group or the whole text can be selected.

By default, selection by group is enabled. In this case the user can select only continuous groups of valid characters.

If selection by group is enabled the user will be able to select only 123 or 12 groups (strings). If the group selection is disabled the user will be able to select the whole text (phone number) number as is (123) 123-12-12.

Parameters
bEnableIf TRUE, the masked edit control allows selecting by group only. If FALSE, it allows selecting the whole text.

For example, if the masked edit control used to represent a phone number, the mask should look in the following way:

Copy
m_wndMaskEdit.EnableMask(
L" ddd ddd dd dd", // The mask string
L"(___) ___-__-__", // Literal, "_" char = character entry
' '); // Default char
m_wndMaskEdit.SetValidChars(NULL);
m_wndMaskEdit.SetWindowText(L"(123) 123-12-12"); // the initial phone number