Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Widgets - General questions or Mixed problems » Could RichEdit print using default selected printer?
Could RichEdit print using default selected printer? [message #30091] Wed, 08 December 2010 10:00 Go to next message
JoseB is currently offline  JoseB
Messages: 37
Registered: March 2009
Member
Could RichEdit print using default selected printer, without showing printer dialog?
I just see the Print() on it...

Thank you

JoseB
Re: Could RichEdit print using default selected printer? [message #30095 is a reply to message #30091] Wed, 08 December 2010 23:08 Go to previous message
mirek is currently offline  mirek
Messages: 11844
Registered: November 2005
Ultimate Member
Yes. You will have to supply your own print button...

Then, follow "normal" print, except do not invoke Execute for PrinterJob. Something like:

void PrintDefault(const RichText& text, const Rect& page, int currentpage, const char *name)
{
	PrinterJob pj(name);
	pj.CurrentPage(currentpage);
	pj.PageCount(text.GetHeight(page).page + 1);
	pj.Landscape(page.GetWidth() > page.GetHeight());
	Print(pj, text, page, pj.GetPages());
}


Mirek
Previous Topic: printing RichEditWithToolBar rotated 90 degrees?
Next Topic: GetDefaultPrinter Call does not compile
Goto Forum:
  


Current Time: Thu Apr 25 11:59:29 CEST 2019

Total time taken to generate the page: 0.00791 seconds