Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - Report Control stopped printing Icons
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Report Control stopped printing Icons

 Post Reply Post Reply
Author
Message
PanicMan View Drop Down
Groupie
Groupie
Avatar

Joined: 20 July 2006
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote PanicMan Quote  Post ReplyReply Direct Link To This Post Topic: Report Control stopped printing Icons
    Posted: 11 May 2021 at 10:45am
Hello,

since some time, we don't know for sure since when, because an customer reported it, XTP Report Control stopped printing out icons, just an small dot is printed out.
We have v16.3 out at the customers, I tested here with 16.3 and 17.3 both have the same issue.
18.6 and 19.1 I have also here, but can't test as all the solution files are missing. Confused
Tested here with the Report Control Sample, unmodified, It also don't print out the Icons:

What is really interesting, Glyphs are printed out, everything else not:

Here the printout:

Tested it with several real printers, also PDF printers, all the same...
My System: Windows 10 x64 20H2 with all Updates installed.

Is anyone also have that error?
I tried to replace the report imagelist with glyphs image list, works well in the sample, but printout is the same...

Tried to debug the source, everything fine, no assertions, no errors, StretchBlt in the CXTPImageManagerResource::Draw Method returns true, so everything works fine, but still no Icons...

Any Ideas?

Greetings Jack
Back to Top
PanicMan View Drop Down
Groupie
Groupie
Avatar

Joined: 20 July 2006
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote PanicMan Quote  Post ReplyReply Direct Link To This Post Posted: 12 May 2021 at 4:51am
I found something out...

in the CXTPReportPaintManager::DrawItemBitmap Function, there is a difference between printing or not:
	// draw image
	if (pDrawArgs->pDC->IsPrinting())
	{
		CBitmap bmp;
		bmp.CreateCompatibleBitmap(pDrawArgs->pDC, szImage.cx, szImage.cy);
		CXTPCompatibleDC dcMem(NULL, &bmp);
		dcMem.FillSolidRect(0, 0, szImage.cx, szImage.cy, pDrawArgs->pDC->GetBkColor());
 
		pIcon->Draw(&dcMem, CPoint(0, 0), pIcon->GetIcon());
		pDrawArgs->pDC->BitBlt(ptIcon.x, ptIcon.y, szImage.cx, szImage.cy, &dcMem, 0, 0, SRCCOPY);
	}
	else
	{
		pIcon->Draw(pDrawArgs->pDC, ptIcon, pIcon->GetIcon(), 0, pDrawArgs->pRow->IsSelected() ? GetXtremeColor(COLOR_HIGHLIGHT) : CLR_NONE, pDrawArgs->pRow->IsSelected() ? GetXtremeColor(COLOR_HIGHLIGHT) : CLR_NONE, pDrawArgs->pRow->IsSelected() ? ILD_SELECTED : 0);
	}


For printing out Glyphs, there is no difference and when I comment out the IsPrinting Block out, everything works fine.
So the question is, is that important? I tested on two printers plus PDF Printer, everything fine.
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.156 seconds.