CreateDragImage for multiple selected it - 项目摘要 |
摘要
| 管理 |
论坛 文档
| 软件包 |
|
|
|
项目描述: |
Currently the CreateDragImage method from CListCtrl only supports the generation of drag images of a single selected item (at least I didn't found an alternative in the Win API).   I found one way to create drag images for multiple selections.
The trick is to create a bitmap in a memory dc and paint the drag image from each selected item into it. This bitmap is added to the drag imagelist. The code enhances a derived CListCtrl (CListCtrlEx) with the method CreateDragImageEx. However, it should also work with a few modifications without subclassing the CListCtrl.
目前在 CListCtrl 中的 CreateDragImage 方法只支持普通的对单个选择条目的拖放(至少我还没有发现其它的 Win API)。我找到一种创建可以拖放多个选项的方法。
这种技术是在内存设备环境中创建一个位图,在其中绘制每个被选择的条目。这个位图被增加到拖放 imagelist中。代码增强了一个CListCtrl 的派生类(CListCtrlEx),提供了CreateDragImageEx方法。但它也只可通过一些修改而不用子类化 CListCtrl。
来源: http://www.codeguru.com/listview/MultiDragImg.shtml |
类别: |
|
发布者:
cbd002
|
|
最新发布源码包 |
软件包 |
版本号 |
日期 |
本地下载 |
MultiDragImg |
 1.0  |
2004-04-17 |
下载 |
|
|