【お知らせ】この部分は英語原文のみでの提供となります。何卒ご了承ください。
2.2.6.13.8 Edit::ReplaceSel
Contents
Description
Replaces the current selection in this Edit control with specified text.
Syntax
void ReplaceSel( LPCTSTR lpcszNewText, BOOL bCanUndo = FALSE )
Parameters
- lpcszNewText
- Pointer to a null-terminated string containing the replacement text.
- bCanUndo
- To specify that this function can be undone, set the value of this parameter to TRUE. The default value is FALSE.
Return
void
Examples
EX1
#include <..\OriginLab\DialogEx.h> #define IDC_EDIT1 1001 void Edit_ReplaceSel(Dialog& MyDlg) { Edit ed = MyDlg.GetItem(IDC_EDIT1); ed.SetSel(32000, 32000); // move to end of all text string str = "Sample"; ed.ReplaceSel(str); }
Remark
See Also
Header to Include
Control.h