Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Calendar
  New Posts New Posts RSS Feed - How to disable Drag/Drop
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to disable Drag/Drop

 Post Reply Post Reply
Author
Message
KumarCJ View Drop Down
Groupie
Groupie
Avatar

Joined: 02 April 2007
Location: India
Status: Offline
Points: 96
Post Options Post Options   Thanks (0) Thanks(0)   Quote KumarCJ Quote  Post ReplyReply Direct Link To This Post Topic: How to disable Drag/Drop
    Posted: 03 March 2009 at 3:26am

Hi,

We are having our own drag/drop implementation for calendar.

We want to disable codejock drag drop in our application, because we are using our own drag/drop implementation.

How we can do that?

Thanks in advance,
saket

 
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 03 March 2009 at 11:57am
You have to handle BeforeEditAction for an event. Take a look at sample method: CCalendarDemoView::OnEvent_BeforeEditAction

Below is sample piece of code which does what you need:

void CCalendarDemoView::OnEvent_BeforeEditAction(XTP_NOTIFY_CODE Event,
WPARAM wParam, LPARAM lParam)

if (XTP_NC_CALENDAR_BEFORE_EVENT_EDIT_OPERATION != Event) {
ASSERT(FALSE);
return;
}
  
XTP_EVENT_EDIT_OPERATION_PARAMS* pOPparams = (XTP_EVENT_EDIT_OPERATION_PARAMS*)wParam;
BOOL* pbHandled = (BOOL*)lParam;
ASSERT(pbHandled && pOPparams);

// check is already canceled/handled
if(!pOPparams || !pbHandled || *pbHandled) {
return;
}

if(pOPparams->eOperation == xtpCalendarEO_DragCopy ||
pOPparams->eOperation == xtpCalendarEO_DragMove)
{
XTP_EVENT_DRAG_OPERATION_PARAMS* pParamsDrag = (XTP_EVENT_DRAG_OPERATION_PARAMS*)wParam;
if (pParamsDrag->pDraggingEvent->GetScheduleID() !=
pParamsDrag->pDraggingEventNew->GetScheduleID())
{
*pbHandled = TRUE;
return;
}
}
....
//////////////////////////////////////////////////////////////////////////
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.110 seconds.