Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - First chance exception when calling OnContextMenu
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

First chance exception when calling OnContextMenu

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

Joined: 14 July 2003
Status: Offline
Points: 1201
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post Topic: First chance exception when calling OnContextMenu
    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 22.1.0, new Projects v 24.0.0
Platform: Windows 10 v 22H2 (64bit)
Language: VC++ 2022
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.141 seconds.