Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - Problem with CXTPReportRecordItemPreview
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Problem with CXTPReportRecordItemPreview

 Post Reply Post Reply
Author
Message
Paddy View Drop Down
Groupie
Groupie


Joined: 28 July 2003
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote Paddy Quote  Post ReplyReply Direct Link To This Post Topic: Problem with CXTPReportRecordItemPreview
    Posted: 05 January 2007 at 5:41am
Hi,

there seems to be a problem when using CXTPReportRecordItemPreviews (V10.4.0)

To reproduce:
1) enable preview with "Toggle Preview Mode".
2) After doing several clicks in some rows I always get a crash at " InternalAddRef();" in "void CXTPReportRecordItem::OnClick(XTP_REPORTRECORDITEM_CLICKARGS* pClickArgs)"

Apart from that a question:

    m_pPreviewItem = new CXTPReportRecordItemPreview(m_HintText);
    m_pPreviewItem->SetBold(true);
    m_pPreviewItem->SetTextColor(RGB(255,0,0));

    SetPreviewItem((CXTPReportRecordItemPreview*)m_pPreviewItem);

SetBold and SetTextColor have no influence for the preview display. Does this makes sense? Or do I have to change the metrics for display??

Greets,

Patrik

Back to Top
Paddy View Drop Down
Groupie
Groupie


Joined: 28 July 2003
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote Paddy Quote  Post ReplyReply Direct Link To This Post Posted: 05 January 2007 at 8:18am
Hi again,

got the solution:

there was no column for a preview item - so I've modified the onclick method:

    if (pClickArgs->pRow != NULL)
        pClickArgs->pRow->InternalAddRef();
    if (pClickArgs->pColumn != NULL)
        pClickArgs->pColumn->InternalAddRef();
    InternalAddRef();
    pClickArgs->pControl->InternalAddRef();

....   
    if (pClickArgs->pRow != NULL)
        pClickArgs->pRow->InternalRelease();
    if (pClickArgs->pColumn != NULL)
        pClickArgs->pColumn->InternalRelease();
    InternalRelease();
    pClickArgs->pControl->InternalRelease();


But I'm not sure if there could be other problems after the change!

Greets,

Patrik


Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 05 January 2007 at 4:54pm
Yes, your code is fine. Something like this will be included into the next release.

--
WBR,
Serge
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.188 seconds.