Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Calendar
  New Posts New Posts RSS Feed - OnBeforeEditOperationNotify
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

OnBeforeEditOperationNotify

 Post Reply Post Reply
Author
Message
Algae View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 January 2007
Location: United States
Status: Offline
Points: 217
Post Options Post Options   Thanks (0) Thanks(0)   Quote Algae Quote  Post ReplyReply Direct Link To This Post Topic: OnBeforeEditOperationNotify
    Posted: 02 April 2008 at 7:44pm
I've been experiencing a crash when deleting a calendar event (right click in calendar, select delete from the popup). Usually I can delete one event without trouble, but the second event I try to delete always crashes.

I traced it to xtpCalendarControl.cpp on about line 2097 in version 10.42 in

BOOL CXTPCalendarControl::DoDeleteEvent(CXTPCalendarViewEvent* pViewEvent)

 where it calls OnBeforeEditOperationNotify (as shown)

    if (!::IsEventExists(pData, pEvent))
    {
        return TRUE;
    }

    //------------------------------------------------------------------------
    BOOL bHandled = FALSE;

    if (m_pActiveView)
    {
        bHandled = m_pActiveView->OnBeforeEditOperationNotify(xtpCalendarEO_DeleteEvent, pViewEvent);
    }

    if (bHandled)
    {
        return TRUE;
    }

The reason it crashes is that pEvent gets clobbered.. (feefee etc)

pEvent is fine before the function, then trash afterwards. To verify, I commented out the OnBeforeEditOperationNotify and it works fine. 

I tried duplicating using the Codejock samples but was unable to do so. I'm using a CXTPCalendarCustomDataProvider with SQL. The project is unicode, statically linked. The problem occurs in both release and debug.

Any hints on what may be going on would be appreciated.

Thank you
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.109 seconds.