Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Krustys Donuts
|
Apr 24, 2008 - 11:51 AM
|
In OnCreate, I have registered my window as a drop target and registered a unique format (see below). In the OnGbwDataDndDo a
int
{
m_oleDropTarget.Register(
m_nDnDFormat = ::RegisterClipboardFormatA(_T(
} VRTeachpointGrid::OnCreate(LPCREATESTRUCT lpCreateStruct) if (CExtTreeGridWnd::OnCreate(lpCreateStruct) == -1)return -1;this);"VRApproachOrientations"));return 0;COleDataSource object is created and the DoDragDrop method is executed. When executing my code, I do see a call to OnGbwDataDndDo After this I never see a call to OnDragEnter, OnDragLeave, OnDragOver or OnDrop. Is there something I’m missing?
|
|
Technical Support
|
Apr 25, 2008 - 7:54 AM
|
Please check if you invoke ::AfxOleInit() MFC API or ::OleInitialize() Win32 API at your application startup if you want to use the OLE drag-n-drop feature. Important: ::CoInitialize() Win32 API cannot be used here.
You can override the CExtGridBaseWnd::OnGbwDataDnd***() virtual methods and detect where and when the data drag-n-drop should start. They do not perform any drag-n-drop algorithms.
|
|