Print Page | Close Window

CXTPReportControl::SetVirtualMode

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Visual C++ MFC
Forum Description: Topics related to Codejock Visual C++ MFC products
URL: http://forum.codejock.com/forum_posts.asp?TID=13312
Printed Date: 11 December 2024 at 6:41pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPReportControl::SetVirtualMode
Posted By: kubeos
Subject: CXTPReportControl::SetVirtualMode
Date Posted: 02 February 2009 at 11:14am
Maybe I´ve overlook that in the documentation, but I found out
that CXTPReportControl::SetVirtualMode() is deleting the CXTPReportRecord-pointer when called again. So you have to be carefull: this pseudo-code crashes:

CXTPReportRecord* pVirtualRecord = new CXTPReportRecord;

GetRecordCtrl()->SetVirtualMode( pVirtualRecord, 0);
...
GetRecordCtrl()->SetVirtualMode( pVirtualRecord, 1);

use this instead:

CXTPReportRecord* pVirtualRecord = new CXTPReportRecord;
GetRecordCtrl()->SetVirtualMode( pVirtualRecord, 0);
...
pVirtualRecord = new CXTPReportRecord();
GetRecordCtrl()->SetVirtualMode( pVirtualRecord, 1);






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