MFC 是否提供了将文本放入剪贴板的快速方法?
我们的代码库中的添加到剪贴板代码非常低级 - 分配全局内存等等。对于简单的情况,我只想将一些纯文本放在剪贴板上,是否有任何例程可以包装所有这些内容?
一个例子是 CRichEditCtrl 有 Copy() & Cut() 方法自动将当前选择放入剪贴板。 MFC 是否可以单独提供此类功能?
更新:创建了一个新问题基于 mwigdahl 的回复
The add-to-clip-board code we have in our code base is quite low-level - allocating global memory and so on. For the simple case I just want to put some plain text on the clipboard, are there any routines which can wrap all that stuff?
An example is that CRichEditCtrl has Copy() & Cut() methods which automatically put the current selection on the clipboard. Does MFC make this kind of functionality available in isolation?
Update: Created a new question based on mwigdahl's response
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不,但自己包裹起来并不难。改编自 Frost 代码(未经测试):
No, but it's not that hard to wrap it yourself. Adapted from Frost Code (and untested):