Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - Migrating old code to visual studios 2012
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Migrating old code to visual studios 2012

 Post Reply Post Reply
Author
Message
grantguglielmo View Drop Down
Newbie
Newbie
Avatar

Joined: 28 June 2017
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote grantguglielmo Quote  Post ReplyReply Direct Link To This Post Topic: Migrating old code to visual studios 2012
    Posted: 28 June 2017 at 2:14pm
I am trying to migrate an old application(~2008) to compile in visual studios 2012, but it seems like the newest version of toolkit pro doesn't support some of the old reportcontrol code. Specifically i get errors like:

1>c:\products_complete\app\dumpview.cpp(210): error C2661: 'CXTPReportRow::InitRow' : no overloaded function takes 2 arguments
1>c:\products_complete\app\dumpview.cpp(334): error C2065: 'm_nPopulatedRecordsCount' : undeclared identifier
1>c:\products_complete\app\dumpview.cpp(362): error C2065: 'm_pRecords' : undeclared identifier
1>c:\products_complete\app\dumpview.cpp(689): error C2065: 'm_arrScreenRows' : undeclared identifier

Here is line 362 for the m_pRecords error:
((CVirtualRecords *)m_pRecords)->SetVirtualMode(pVirtualRecord, nCount);

Is there any sort of documentation that list changes that broke support for older versions? If not, does anyone know how to fix errors like these?
Back to Top
olebed View Drop Down
Admin Group
Admin Group
Avatar

Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 567
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 30 June 2017 at 7:54am
Hello,

CXTPReportRow::InitRow(CXTPReportControl* pControl, CXTPReportRecord* pRecord)  replaced with 
InitRow(CXTPReportControl *pControl, CXTPReportSection *pSection, CXTPReportRecord  *pRecord)

m_nPopulatedRecordsCount  allocated in CXTPReportSection  (Source\ReportControl\XTPReportSection.h)
Geter is CXTPReportSection::GetPopulatedRecordsCount()

for SetVirtualMode  use  CXTPReportControl::SetVirtualMode(CXTPReportRecord* pVirtualRecord, int nCount, int nFields)

m_arrScreenRows  moved to CTXPReportRows
CXTPReportScreenRows *pScreenRows = pControl->GetRows()->GetScreenRows();
or
pRow = pSection->GetRows()->GetScreenRows()->HitTest(pt);


Regards,
 Oleksandr Lebed
Back to Top
grantguglielmo View Drop Down
Newbie
Newbie
Avatar

Joined: 28 June 2017
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote grantguglielmo Quote  Post ReplyReply Direct Link To This Post Posted: 08 August 2017 at 11:45am
Thanks, for the help. I had another question about the Draw function in CTXPReportRow, it looks like a lot of new arguments were added. What were the changes to the new Draw?
Back to Top
olebed View Drop Down
Admin Group
Admin Group
Avatar

Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 567
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 08 August 2017 at 12:08pm
Hello,

Only CRect rcClip  was added to Draw method from 2008 year.

CXTPReportRow::Draw(CDC *pDC, CRect rcRow, CRect rcClip, int nLeftOffset, CXTPReportRecordMergeItems &mergeItems)

Instead of 
CRect rcClipBox = m_pControl->GetReportRectangle(); in code below.

It is for properly support of drawing fixed (frozen) rows.

Regards,
 Oleksandr Lebed
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.108 seconds.