Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - GetItemMetrics of the CXTPReportRow is NOT virtual
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

GetItemMetrics of the CXTPReportRow is NOT virtual

 Post Reply Post Reply
Author
Message
Kukis View Drop Down
Newbie
Newbie


Joined: 24 May 2006
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kukis Quote  Post ReplyReply Direct Link To This Post Topic: GetItemMetrics of the CXTPReportRow is NOT virtual
    Posted: 05 September 2006 at 5:06am
I wanted to customize my control and noticed that CXTPReportRow class has not virtual GetItemMetrics method.
Original GetITemMetrics method has lines which overwrite my custom color settings.
.....

if (GetControl()->HasFocus())

{

pItemMetrics->clrForeground = pPaintManager->m_clrHighlightText;

pItemMetrics->clrBackground = pPaintManager->m_clrHighlight;

}

else if (!pPaintManager->m_bHideSelection)

{

pItemMetrics->clrForeground = pPaintManager->m_clrBtnText;

pItemMetrics->clrBackground = pPaintManager->m_clrBtnFace;

}

....
I wanted to to remove lines which set text color and made my own row class. But because GetItemMetrics is not virtual my code is never called (only at that moment I've noticed that it is not virtual)
 
Could you give my some ideas how to overcome this problem (leave text color of the selected item lets say green)? Change library code? overwrite ondrawcaption of the reportrecorditem?
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 September 2006 at 3:05pm
Hi,

You can make CXTPReportRow::GetItemMetrics() as virtual in your toolkit sources and rebuild it. This change will be included in 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.141 seconds.