Article ID: 150571 - Last Review: November 21, 2006 - Revision: 3.1

FIX: CWnd::DragAcceptFiles() in Books Online

This article was previously published under Q150571
Expand all | Collapse all

SYMPTOMS

The documentation for CWnd::DragAcceptFiles() in Books Online states:
Call this member function from within the main window in your application's CWinApp::InitInstance function to indicate that your main window and all child windows accept dropped files from the Windows File Manager.
This information is not correct. The message is not propagated to the child windows.

MORE INFORMATION

Since DragAcceptFiles() is a member function of CWnd class, a CWnd pointer is needed to call this function in CWinApp::InitInstance(). The window that calls DragAcceptFiles() with the bAccept parameter set to TRUE has identified itself as able to process the WM_DROPFILES message from Windows File Manager.

For example, in an MFC 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 need to call DragAcceptFiles() with the CMDIChildWnd window pointer.

The correct documentation is also found in Windows API DragAcceptFiles() function in Books Online.

APPLIES TO
  • Microsoft Foundation Class Library 4.2, when used with:
    • Microsoft Visual C++ 1.5 Professional Edition
    • Microsoft Visual C++ 1.51
    • Microsoft Visual C++ 1.52 Professional Edition
    • Microsoft Visual C++ 5.0 Enterprise Edition
    • Microsoft Visual C++ 2.0 Professional Edition
    • Microsoft Visual C++ 2.1
    • Microsoft Visual C++ 6.01 Professional Edition
    • Microsoft Visual C++ 4.0 Professional Edition
    • Microsoft Visual C++ 4.1 Subscription
    • Microsoft Visual C++ 5.0 Professional Edition
    • Microsoft Visual C++ 5.0 Learning Edition
Keywords: 
kbbug kbdocs kbfix kbnoupdate kbvc600fix KB150571
Retired KB ArticleRetired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
 

Article Translations