tags:

views:

22

answers:

1

The MSDN site says:

From your view class's function that handles the WM_CREATE message (typically OnCreate), call the new member variable's Register member function. Revoke will be called automatically for you when your view is destroyed.

But I don't have an OnCreate function in the ChildView class.

I do have OnCreate in the CMainFrame class. Can I register it there? What are the ramifications?

PLEASE NOTE: I have it working for dropping files but I want to drop the text as a file, not at a cursor location like a text cut and paste, but rather I want the application to make a buffer to hold it, and I will treat it like a file.

TIA,

Harvey

A: 

Solved:

In using F1 to get the syntax for OnDrop and the others, MSDN gave me:

virtual BOOL OnDrop(
   CWnd* pWnd,
   COleDataObject* pDataObject,
   DROPEFFECT dropEffect,
   CPoint point 
);

But the correct virtual function does not have the first parameter and should be:

virtual BOOL OnDrop(
   COleDataObject* pDataObject,
   DROPEFFECT dropEffect,
   CPoint point 
);

Same with the others. So I was never actually overriding the default functions.

Harvey