|  | 
| How to disable Drag/Drop | 
| Post Reply   | 
| Author | |
| KumarCJ   Groupie     Joined: 02 April 2007 Location: India Status: Offline Points: 96 |  Post Options  Thanks(0)  Quote  Reply  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, | |
|  | |
| SuperMario   Senior Member     Joined: 14 February 2004 Status: Offline Points: 18057 |  Post Options  Thanks(0)  Quote  Reply  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; } } .... ////////////////////////////////////////////////////////////////////////// | |
|  | |
| Post Reply   | |
| Tweet | 
| Forum Jump | Forum Permissions  You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |