Summary:
How do you disable the dropping of files in RichEdit version 2.0 with the CRichEditCtrl class?
Call the RevokeDragDrop(), passing the pointer to the RichEdit control window, as the parameter. Also, override the OnDropFiles() and return without calling the function of the base class.
More Information:
To prevent a Drag-and-Drop enabled window from accepting files use the RevokeDragDrop() function. Pass the pointer to the target window as the parameter for the function. The WM_DROPFILES message handler must be overriden and control must be returned from it, without calling the OnDropFiles() function of the base class.
You use this function during the initialization, typically, in the InitInstance() function of the window procedure. Handling the WM_DROPFILES message alone, or calling only the RevokeDragDrop() is not sufficient. To successfully prevent the links from being placed in the RichEdit control version 2.0, you must do both of the previously mentioned steps.
from: http://support.microsoft.com/default.aspx?scid=kb;en-us;195421
本文介绍如何通过调用RevokeDragDrop函数并重写WM_DROPFILES消息处理程序来禁用RichEdit 2.0控件中的文件拖放功能。此方法适用于使用CRichEditCtrl类的应用程序。
4738

被折叠的 条评论
为什么被折叠?



