drop itemsdropship是什么意思思

关于dropdownlist.Items.Clear()
的问题,不能清空内容
在线急等~~~~~~
[问题点数:200分,结帖人yoooyeeey]
关于dropdownlist.Items.Clear()
的问题,不能清空内容
在线急等~~~~~~
[问题点数:200分,结帖人yoooyeeey]
不显示删除回复
显示所有回复
显示星级回复
显示得分回复
只显示楼主
相关帖子推荐:
2008年1月 扩充话题大版内专家分月排行榜第二
2008年1月 扩充话题大版内专家分月排行榜第二
2010年3月 授予百度VIP勋章
本帖子已过去太久远了,不再提供回复功能。Drag and Drop Listbox Items Without OLE - 不使用 OLE 直接拖放 ListBox Items - 程序员小辉
Drag and Drop Listbox Items Without OLE - 不使用 OLE 直接拖放 ListBox Items
本程序实现 不使用 OLE 直接拖放 ListBox Items(Drag and Drop Listbox Items Without OLE), 如图:
作者 Ali Rafiee
MFC has a CDragListBox that virtually does the same thing. The advantage of this class over MFC's CDragListBox is that it allows the user to insert the item at the end of the list, whereas CDragListBox does not. The concept is very simple: Keep track of the item that is being dragged, indicate where the drop will be when the user is dragging the item around, and finally, insert the item in its new location once the user releases the mouse button.
To accomplish this task, you will need to catch three messages for your listbox window: WM_LBUTTONDOWN, WM_MOUSEMOVE, and WM_LBUTTONUP. The WM_LBUTTONDOWN handler method simply initializes the drag and drop process by finding the item that the user clicked on.
示例代码:
void CDragAndDropListBox::OnLButtonDown(UINT nFlags, CPoint point)
CListBox::OnLButtonDown(nFlags, point);
//clear all the flags
m_MovingIndex = LB_ERR;
m_MoveToIndex = LB_ERR;
m_Captured = FALSE;
m_Interval = 0;
//Find the item that they want to drag and keep track of it.
//Later in the mouse move, we will capture the mouse if this
//value is set.
int Index = ItemFromPoint(point,Outside);
if (Index != LB_ERR && !Outside)
m_MovingIndex = I
SetCurSel(Index);
void CDragAndDropListBox::OnMouseMove(UINT nFlags, CPoint point)
CListBox::OnMouseMove(nFlags, point);
if (nFlags & MK_LBUTTON)
if (m_MovingIndex != LB_ERR && !m_Captured)
SetCapture();
m_Captured = TRUE;
int Index = ItemFromPoint(point,Outside);
//if they our not on a particular item
if (Outside)
CRect ClientR
GetClientRect(&ClientRect);
//If they are still within the listbox window, simply
//select the last it else, if
//they are outside the window, scroll the items.
if (ClientRect.PtInRect(point))
KillTimer(TID_SCROLLDOWN);
KillTimer(TID_SCROLLUP);
m_Interval = 0;
//indicates that the user wants to drop the item
//at the end of the list
Index = LB_ERR;
Outside = FALSE;
DoTheScrolling(point,ClientRect);
KillTimer(TID_SCROLLDOWN);
KillTimer(TID_SCROLLUP);
m_Interval = 0;
if (Index != m_MoveToIndex && !Outside)
DrawTheLines(Index);
void CDragAndDropListBox::OnLButtonUp(UINT nFlags, CPoint point)
if (m_MovingIndex != LB_ERR && m_Captured)
KillTimer(TID_SCROLLDOWN);
KillTimer(TID_SCROLLUP);
m_Interval = 0;
m_Captured = FALSE;
ReleaseCapture();
GetClientRect(&Rect);
//if they are still within the listbox window
if (Rect.PtInRect(point))
InsertDraggedItem();
Invalidate();
UpdateWindow();
m_MovingIndex = LB_ERR;
m_MoveToIndex = LB_ERR;
CListBox::OnLButtonUp(nFlags, point);
// CDragDropListBoxSampleDlg dialog
class CDragDropListBoxSampleDlg : public CDialog
// Implementation
protected:
CDragAndDropListBox
下载地址:
第 1 楼& tt 发表于
不错.正好我有用.多谢!
第 2 楼& yina 发表于
真的是非常感谢
第 3 楼& waterliy 发表于
拜托,我怎么就打不开啊。能下载不能打开工程,我用的VC6.0。是什么原因呢?
第 4 楼& qinyi 发表于
我今天下载了几个源码,非常感谢您的收集。
共有评论 7 条, 显示 4 条。
发表你的评论如果你想针对此文发表评论, 请填写下列表单:
可选 (不会被公开)
网站 / Blog:
反垃圾广告:
为了防止广告机器人自动发贴, 请计算下列表达式的值:7 + 16 =
你可以使用下列标签修饰文字:
[b] 文字 [/b]: 加粗文字
[quote] 文字 [/quote]: 引用文字
建站于 1997 ◇ 做一名最好的开发者是我不变的理想……
Copyright(C) 1997- & All rights reserved
声明:站内所有原创文字,未经许可,均可转载、复制。
转载时必须以链接形式注明作者和原始出处。&}

我要回帖

更多关于 toomanyitems是什么 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信