Export (0) Print
Expand All
MFC
Expand Minimize
0 out of 1 rated this helpful - Rate this topic

CWnd::DragAcceptFiles 

Call this member function from within a window, using a CWnd pointer, in your application's CWinApp::InitInstance function to indicate that the window accepts dropped files from the Windows File Manager or Windows Explorer.


void DragAcceptFiles(
   BOOL bAccept = TRUE 
);

Parameters

BAccept

Flag that indicates whether dragged files are accepted.

Only the window that calls DragAcceptFiles with the bAccept parameter set to TRUE has identified itself as able to process the Windows message WM_DROPFILES. For example, in an MDI application, if the CMDIFrameWnd window pointer is used in the DragAcceptFiles function call, only the CMDIFrameWnd window gets the WM_DROPFILES message. This message is not sent to all open CMDIChildWnd windows. For a CMDIChildWnd window to receive this message, you must call DragAcceptFiles with the CMDIChildWnd window pointer.

To discontinue receiving dragged files, call the member function with bAccept set to FALSE.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.