HeaderPane
Main
Hide

SftMask/DLL 7.0 - Masked Edit Control

Share Link
Print

Windows Messages

In addition to the standard Windows messages (WM_SETFONT, WM_COMMAND, WM_NOTIFY, etc.) that a SftMask control understands as a first-class Windows window, the control defines the following custom messages. Most applications use the SftMask_* helper functions instead of sending these messages directly, but the messages are documented here for applications that need to bypass the helper layer.

Note: use the SetText / GetText functions (SFTMASKM_SETTEXT / SFTMASKM_GETTEXT) instead of WM_SETTEXT / WM_GETTEXT, which operate on the display text.

MessageValueDescription
SFTMASKM_CANUNDOWM_USER+1Return whether an undo operation is possible (CanUndo).
SFTMASKM_EMPTYUNDOWM_USER+2Empty the undo buffer (EmptyUndo).
SFTMASKM_GETCHARINDEXWM_USER+3Return the character index at a position (GetCharIndex).
SFTMASKM_GETCHARPOSWM_USER+4Return the bounding rectangle of a character range (GetCharPos).
SFTMASKM_GETCONTROLINFOWM_USER+5Retrieve the SFTMASK_CONTROL structure (GetControlInfo).
SFTMASKM_GETDESIGNWM_USER+6Return the design-mode flag (GetDesign).
SFTMASKM_GETPOSITIONWM_USER+7Return the bounding rectangle of a control area (GetPosition).
SFTMASKM_GETSELTEXT_AWM_USER+8Retrieve the selected text (ANSI).
SFTMASKM_GETSELTEXT_WWM_USER+9Retrieve the selected text (Unicode).
SFTMASKM_GETTEXTDISPLAY_AWM_USER+10Retrieve the display text (ANSI).
SFTMASKM_GETTEXTDISPLAY_WWM_USER+11Retrieve the display text (Unicode).
SFTMASKM_HITTESTWM_USER+12Determine the control area at a position (HitTest).
SFTMASKM_ISEMPTYWM_USER+13Return whether the control is empty (IsEmpty).
SFTMASKM_ISVALIDWM_USER+14Return whether the contents are valid (IsValid).
SFTMASKM_ISVALID_WITHMSGWM_USER+15Validate the contents, displaying an error message if invalid (IsValidWithMsg).
SFTMASKM_NEXTCONTROLWM_USER+16Move the input focus to the next control (NextControl).
SFTMASKM_OPTIMALPOSITIONWM_USER+17Position the caret at the optimal input position (OptimalPosition).
SFTMASKM_PREVCONTROLWM_USER+18Move the input focus to the previous control (PrevControl).
SFTMASKM_QUERYCHAR_AWM_USER+19Test whether the control accepts a character (ANSI).
SFTMASKM_QUERYCHAR_WWM_USER+20Test whether the control accepts a character (Unicode).
SFTMASKM_SETCONTROLINFOWM_USER+21Apply a SFTMASK_CONTROL structure (SetControlInfo).
SFTMASKM_SETDESIGNWM_USER+22Set the design-mode flag (SetDesign).
SFTMASKM_SETSELTEXT_AWM_USER+23Replace the selected text (ANSI).
SFTMASKM_SETSELTEXT_WWM_USER+24Replace the selected text (Unicode).
SFTMASKM_AUTOCOMPLETE_REFRESHWM_USER+25Open or refresh the autocomplete window (AutoCompleteRefresh).
SFTMASKM_AUTOCOMPLETE_ADDBOTTOMWM_USER+26Add a custom autocomplete entry at the bottom (AutoCompleteAddBottom).
SFTMASKM_AUTOCOMPLETE_ADDTOPWM_USER+27Add a custom autocomplete entry at the top (AutoCompleteAddTop).
SFTMASKM_CALENDAR_SETBOLDDATEWM_USER+28Set a bold date in the popup calendar (SetBoldDate).
SFTMASKM_CONTENTS_GETVALUEWM_USER+29Retrieve a field value (GetValue).
SFTMASKM_CONTENTS_SETVALUEWM_USER+30Set a field value (SetValue).
SFTMASKM_CONTENTS_GETDATETIMEWM_USER+31Retrieve the contents as a date/time value (GetDateTime).
SFTMASKM_CONTENTS_SETDATETIMEWM_USER+32Set the contents from a date/time value (SetDateTime).
SFTMASKM_GETINSERTPOSITIONWM_USER+33Calculate the closest valid insert position (GetInsertPosition).
SFTMASKM_SHOWDROPPOSITIONWM_USER+34Visualize the drop insert location (ShowDropPosition).
SFTMASKM_ACTIVATEINPUTWM_USER+35Activate or deactivate data entry (ActivateInput).
SFTMASKM_ROLLUPWM_USER+36Close any open popup window (Rollup).
SFTMASKM_SETDEFAULTVALUEWM_USER+37Apply the default text to an empty control (SetDefaultValue).
SFTMASKM_GETTEXTWM_USER+38Retrieve the contents (GetText).
SFTMASKM_SETTEXTWM_USER+39Set the contents (SetText).
SFTMASKM_GETTEXT_AWM_USER+40Retrieve the contents (ANSI).
SFTMASKM_SETTEXT_AWM_USER+41Set the contents (ANSI).
SFTMASKM_GETTEXT_WWM_USER+42Retrieve the contents (Unicode).
SFTMASKM_SETTEXT_WWM_USER+43Set the contents (Unicode).
SFTMASKM_SETDARKMODEWM_USER+44Set the dark mode setting (SetDarkMode).
SFTMASKM_GETDARKMODEWM_USER+45Return the dark mode setting (GetDarkMode).
SFTMASKM_ISDARKMODEACTIVEWM_USER+46Return whether dark mode rendering is active (IsDarkModeActive).
SFTMASKM_SETHIGHCONTRASTWM_USER+47Set the high contrast setting (SetHighContrastMode).
SFTMASKM_GETHIGHCONTRASTWM_USER+48Return the high contrast setting (GetHighContrastMode).
SFTMASKM_ISHIGHCONTRASTACTIVEWM_USER+49Return whether high contrast rendering is active (IsHighContrastActive).
SFTMASKM_SETIMAGESCALINGWM_USER+50Set the image scaling setting (SetImageScaling).
SFTMASKM_GETIMAGESCALINGWM_USER+51Return the image scaling setting (GetImageScaling).
SFTMASKM_SETPIXELSCALINGWM_USER+52Set the pixel scaling setting (SetPixelScaling).
SFTMASKM_GETPIXELSCALINGWM_USER+53Return the pixel scaling setting (GetPixelScaling).
SFTMASKM_GETDPIWM_USER+54Return the current monitor DPI (GetDPI).
SFTMASKM_AUTOCOMPLETE_SEEDWM_USER+56Add entries to the autocomplete save file (AutoCompleteSeed).

The charset-neutral SftMask_* macros expand to the _A or _W message variant depending on the build's UNICODE setting.

See Also C/C++ API | Notifications


Last Updated 08/30/2026 - (email)
© 2026 Softel vdm, Inc.