Print Page | Close Window

How to disable Drag/Drop

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Calendar
Forum Description: Topics Related to Codejock Calendar
URL: http://forum.codejock.com/forum_posts.asp?TID=13556
Printed Date: 18 July 2025 at 10:43pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to disable Drag/Drop
Posted By: KumarCJ
Subject: How to disable Drag/Drop
Date 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

 



Replies:
Posted By: SuperMario
Date 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;
}
}
....
//////////////////////////////////////////////////////////////////////////



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net