Print Page | Close Window

First chance exception when calling OnContextMenu

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=16247
Printed Date: 28 September 2024 at 6:13am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: First chance exception when calling OnContextMenu
Posted By: mgampi
Subject: First chance exception when calling OnContextMenu
Date Posted: 22 February 2010 at 3:58am
Hi;
Using latest report control code from forum I get a first chance exception whenever a context menu is opened in the report control instance:

void CPVBar::OnControlItemRClick(NMHDR * pNotifyStruct, LRESULT * /*result*/) {
    XTP_NM_REPORTRECORDITEM* pItemNotify = reinterpret_cast<XTP_NM_REPORTRECORDITEM*>(pNotifyStruct);
    if (pItemNotify->pRow==0)
        return;

    // Cancel edit
    if (Report_->IsEditMode())
        Report_->EditItem(0);

    CMenu menu;
    VERIFY(menu.LoadMenu(IDR_PROCESSEXPLORER_POPUP));
    // track menu
    reinterpret_cast<CMainFrame*>(AfxGetMainWnd())->GetCommandBars()->TrackPopupMenuEx(menu.GetSubMenu(0), TPM_LEFTALIGN|TPM_LEFTBUTTON, pItemNotify->pt.x, pItemNotify->pt.y, this, NULL);
}


First chance exception at 0x7c812afb in XRSMSDispatchConfig.exe: Microsoft C++ exception: CUserException @ 0x0013e2c4.
First chance exception at 0x7c812afb in XRSMSDispatchConfig.exe: Microsoft C++ exception: CUserException @ 0x0013e4e4.
CArchive exception: endOfFile.
First chance exception at 0x7c812afb in XRSMSDispatchConfig.exe: Microsoft C++ exception: CArchiveException @ 0x0013e5a0.
EXCEPTION: CXTPReportControl::OnDragOver() - Es wurde versucht, auf eine Stelle hinter dem Ende von eine unbenannte Datei zuzugreifen.
(Access behind end of unnamed file.)
First chance exception at 0x7c812afb in XRSMSDispatchConfig.exe: Microsoft C++ exception: CUserException @ 0x0013e4e4.

It's the CArchive file used in drag&drop functions of the CXTPReportControl class!


-------------
Martin

Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017



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