Defines whether the edit control portion is read-only.
C
BOOL WINAPI SftBox_GetReadOnly(HWND hwndCtl); void WINAPI SftBox_SetReadOnly(HWND hwndCtl, BOOL fSet);
C++
BOOL CSftBox::GetReadOnly() const; void CSftBox::SetReadOnly(BOOL fSet);
hwndCtl
The window handle of the combo box control.
fSet
Set to TRUE to make the edit control portion read-only, set to FALSE to allow the user to modify the text.
GetReadOnly returns TRUE if the edit control portion is read-only, otherwise FALSE is returned.
The GetReadOnly and SetReadOnly functions define whether the edit control portion of a simple or dropdown combo box is read-only.
By default, the edit control portion is not read-only (FALSE).
While the edit control portion is read-only, the user cannot type or otherwise modify the text in the edit control portion. The text can still be selected and copied to the clipboard. The user can still select an item in the dropdown portion, which updates the text in the edit control portion.
A read-only edit control portion is displayed using the system color for three-dimensional objects (COLOR_3DFACE) as background color and the system color for grayed text (COLOR_GRAYTEXT) as text color, instead of the colors defined using SetCtlColors (see SFTBOX_COLORS, colorEditBg and colorEditFg).
A dropdown list combo box does not have an edit control portion, so the setting has no effect.
See Also C/C++ API | Categories | Notifications