PRB: CWnd::m_nMsgDragList Not Exported by the MFC DLL (189382)



The information in this article applies to:

  • The Microsoft Foundation Classes (MFC), when used with:
    • Microsoft Visual C++, 32-bit Enterprise Edition 5.0
    • Microsoft Visual C++, 32-bit Professional Edition 5.0

This article was previously published under Q189382

SYMPTOMS

When you use the protected CWnd member m_nMsgDragList in an application or DLL that is linked to the MFC shared DLL, a LNK2001 unresolved external error occurs.

This error does not occur when you link to the static MFC library.

CAUSE

CWnd::m_nMsgDragList is not exported from the MFC DLL.

RESOLUTION

To workaround this problem, call RegisterWindowMessage with the DRAGLISTMSGSTRING message and use the value returned instead of CWnd::m_nMsgDragList. For example:
   UINT nMsgDragList = ::RegisterWindowMessage(DRAGLISTMSGSTRING);
				

STATUS

This behavior is by design.

MORE INFORMATION

CWnd::m_nMsgDragList is an undocumented member of the CWnd class and is subject to change. The most common use of CWnd::m_nMsgDragList occurs when you override OnChildNotify in a CWnd derived class.

Modification Type:MajorLast Reviewed:11/18/2003
Keywords:kbArchitecture kbDLL kbprb KB189382