拖放在WINAPI [英] Drag and drop in winapi

查看:160
本文介绍了拖放在WINAPI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一些新的功能,一个纯粹的WINAPI应用。其中一人将最好地实现为两个列表,你可以拖动和拖放(多)的列表之间的元素。新的功能可以被限制在一个单一的对话框。

I have a pure Winapi application that needs a few new features. One of them would best be implemented as two lists where you can drag-and-drop (multiple) elements between the lists. The new feature can be limited to a single dialog.

什么是实现这个最快的方法?
有几个思路:

What would be the quickest way to implement this? A few ideas:


  • 纯WINAPI(是DetectDrag)

  • 一个单独的MFC或.NET的DLL,提供了这一个对话框

  • 嵌入微软WebBrowser控件和使用JQuery

不限应避免这些选项?

任何更好的想法?

什么是最快的实现?

关于如何开始的指针?

Any of these options that should be avoided?
Any better ideas?
What is quickest to implement?
Any pointers on how to get started?

推荐答案

我的建议是,如果应用程序是在纯WINAPI,保持这种方式。

My advice would be that if the application is in pure winapi, keep it that way.

启动.NET框架运行时只与可拖动的项目之一对话框是承载WebBrowser控件,并使用JQuery的一个功能不好的 - 如果你问我,(但话又说回来它至少thedailywtf.com值得,你再没有问我。))

Starting a .NET framework runtime just for one dialog with draggable items is as bad as hosting a WebBrowser control and using JQuery for that one functionality - it's at least thedailywtf.com-worthy if you ask me (but then again, you're not asking me ;) ).

否则,你就会把自己(和潜在的其他人)到一些维护的噩梦和最快捷的方式将成为最有问题的。

Otherwise you will put yourself (and potentially others) into some maintainability nightmare and the quickest way will become the most problematic one.

编辑:的也许那些 2 文章将有助于实现拖放 - 他们即将排列表视图重新排序,但可能会在得到帮助的想法。

Maybe those two articles will help in implementing drag-drop - they're about row reordering in ListViews, but will probably help in getting the idea.

这篇关于拖放在WINAPI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆