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

CWnd::OnCopyData 

This member function is called by the framework to copy data from one application to another.


afx_msg BOOL OnCopyData(
   CWnd* pWnd,
   COPYDATASTRUCT* pCopyDataStruct 
);

Parameters

pWnd

A pointer to a CWnd object that is sending the data.

pCopyDataStruct

A pointer to a COPYDATASTRUCT structure that contains the data being sent.

Returns TRUE if the receiving application successfully accepts the data. Otherwise, returns FALSE.

The data being passed must not contain pointers or other references to objects not accessible to the application receiving the data.

While the data is being copied, it must not be changed by another thread of the sending process.

The receiving application should consider the data read-only. The structure pointed to by the parameter pCopyDataStruct is valid only during the transfer of data; however, the receiving application should not free the memory associated with the structure.

If the receiving application needs access to the data after this function returns, it must copy the data received to a local buffer.

NoteNote

This member function is called by the framework to allow your application to handle a Windows message. The parameters passed to your function reflect the parameters received by the framework when the message was received. If you call the base-class implementation of this function, that implementation will use the parameters originally passed with the message and not the parameters you supply to the function.

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

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.