Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - ReportControl Default Font
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ReportControl Default Font

 Post Reply Post Reply
Author
Message Reverse Sort Order
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Topic: ReportControl Default Font
    Posted: 02 December 2015 at 8:51am
Hello,
See using  XTP_REPORTRECORDITEM_METRICS::pFont  in  CXTPReportRow::GetItemMetrics
pItemMetrics->pFont            = &pPaintManager->m_fontText;
CXTPReportPaintManager::GetTextFont() the same

then in  CXTPReportRow::GetItemMetrics -> CXTPReportRecordItem::GetItemMetrics
pDrawArgs->pItem->GetItemMetrics(pDrawArgs, pItemMetrics);
pItemMetrics->pFont  can be changed to custom font from CXTPReportRecordItem::GetFont 

so you can use next code to get font of ReportRecordItemText
CFont* SomeClass::GetFont(CXTPReportRecordItemText* pItem)
{
if (pItem)
{
if(pItem->GetFont())
return pItem->GetFont();
else if (pItem->IsBold())
return GetReportControl->GetPaintManager()->m_fontBoldText;
else
return GetReportControl->GetPaintManager()->GetTextFont();
}
return NULL;
}

Also note that item's font can be changed on fly when XTP_NM_REPORT_GETITEMMETRICS notification is handled.

Regards,
 Oleksandr Lebed
Back to Top
evamation View Drop Down
Newbie
Newbie


Joined: 02 February 2014
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote evamation Quote  Post ReplyReply Direct Link To This Post Posted: 25 November 2015 at 6:29am
Hello.
I want to know ReportControl's default font information.
for example, if we add item CXTPReportRecordItemText, we can see the text having some font attribute.

How can I get the font information?
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.172 seconds.