EM_REPLACESEL message

本文介绍了一个用于替换编辑控件或富文本编辑控件中选定文本的消息,详细解释了参数的作用,包括是否允许撤销操作及替换文本,并说明了在没有选中文本时的行为以及在不同系统版本中的兼容性。

Replaces the selected text in an edit control or a rich edit control with the specified text.

Parameters

wParam

Specifies whether the replacement operation can be undone. If this is TRUE, the operation can be undone. If this isFALSE , the operation cannot be undone.

lParam

A pointer to a null-terminated string containing the replacement text.

Return value

This message does not return a value.

Remarks

Use the EM_REPLACESEL message to replace only a portion of the text in an edit control. To replace all of the text, use the WM_SETTEXT message.

If there is no selection, the replacement text is inserted at the caret.

Rich Edit: Supported in Microsoft Rich Edit 1.0 and later. For information about the compatibility of rich edit versions with the various system versions, see About Rich Edit Controls.

In a rich edit control, the replacement text takes the formatting of the character at the caret or, if there is a selection, of the first character in the selection.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Winuser.h (include Windows.h)
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值