热情软件屋

 

如何自己实现拖放


编号:QA003700
建立日期: 2000年12月24日 最后修改日期:2000年12月24日
所属类别:

chaos:
    操作系统:windows NT
    编程工具:Visual C++
    问题:如何自己实现拖放?看了MSDN,知道需要自己编写一个从COleDropTarget的派生的类,也许还要派生COleDropSource的子类,可是在生成自己的类的时候,如何实现其中的数据源?即COleDropTarget::OnDrop中的CDataSource *由何而来?如何自己实现?
    水平: 中级

回答:

    first,the window you want to support drag&drop, you should add your dragdrop target object in the window class,and register the dragdrop operation use COleDropTarget::Register(your class). and in your own class derived from COleDropTarget, do the operation you want to do. the data transfering is done by the system. Of course,you should prepare your own data.

此问题由Sunhao回答。

 
把这个问题推荐给朋友
   
   
您的意见类别
您的名字
您的电子邮件
您的建议(请尽可能详细)
 
 

版权所有 1997-2008 热情软件屋
如果您有任何建议和意见, 请给我发个电子邮件 askpro@china-askpro.com
Web Designed by ZebraStudio