注册 登录
编程论坛 C++教室

一个关于BeginDrag函数的问题

lxqlyld 发布于 2012-09-14 14:40, 1899 次点击
在看书中遇到了一些BeginDrag函数,不知道是什么意思,模式都是这样的,BeginDrag(true)或BeginDrag(false).请问各位高手,这些函数都是什么意思啊
5 回复
#2
pangding2012-09-14 20:13
好像是 mfc 里的函数。书里上下文应该有提吧,这个程序是处理什么?如果没提楼主只能自己百度一下了。
#3
zhuanjia02012-09-15 11:55
建议下载MSDN,遇到不懂的函数就查。
#4
lxqlyld2012-09-18 12:30
回复 2楼 pangding
书上没有提示,就直接在程序中出现了,函数处理的是将列表框TListBox中的内容拖到TStringGrid组件中,同时允许将TStringGrid组件单元格中的内容拖到另一个单元格中。程序是BCB中的
#5
peach54602012-09-18 12:34
BOOL BeginDrag(
   int nImage,
   CPoint ptHotSpot
);
Parameters

nImage
Zero-based index of the image to drag.

ptHotSpot
Coordinates of the starting drag position (typically, the cursor position). The coordinates are relative to the upper left corner of the image.

Return Value
Nonzero if successful; otherwise 0.

Remarks
This function creates a temporary image list that is used for dragging. The image combines the specified image and its mask with the current cursor. In response to subsequent WM_MOUSEMOVE messages, you can move the drag image by using the DragMove member function. To end the drag operation, you can use the EndDrag member function.
#6
peach54602012-09-18 12:35
请学会使用google或者baidu
在学会使用MSDN...
1