资 源 简 介
粘贴数据比复制更加复杂,因为你需要选择粘贴的格式。
---- 1. 在你的视中,实现OnEditPaste来处理用户从编辑菜单选择粘贴命令的操作。
---- 2. 在OnEditPaste函数中,建立一个COleDataObject对象并且访问它的AttachClipboard成员函数来将这个对象绑定到剪贴板。
---- 3. 访问COleDataObject::IsDataAvailable函数来检查是否可以使用特殊的格式。当然,你也可以通过循环使用COleDataObject::BeginEnumFormats来寻找其它格式直到你找到了最适合的格式。
---- 4. 粘贴数据。
-paste data replication more complicated than that because you need to choose paste format.---- 1. Depending on your, and realize OnEditPaste to users from the edit menu select paste ordered the operation.---- 2. In OnEditPaste function, the establishment of a visit COleDataObject object and its function AttachClipboard members will be bundled with the object to the clipboard.---- 3. Visit COleDataObject : : IsDataAvailable function can be used to check whether a special format. Of course, you can also cycle through the use of COleDataObject : : BeginEnumFormats to find other formats until you find the most suitable format.---- 4. Pasting data.