I need some help from experiensed users of wxWindows library.
I'm developping dll, where one of the functions must provides simple html printing. And wxWindows looks like the best way to get it.
Realization appears to be simple. One must create wxHtmlEasyPrinting class object and use its PrintFile method to make all job. Unfortunetly this object refuses to be cunstructed outside wxFrame class (as it is in "htmlprinting" sample).
Thus, I wrote
Code: Select all
int _tmain(int argc, _TCHAR* argv[])
{
wxHtmlEasyPrinting *m_Prn;
m_Prn = new wxHtmlEasyPrinting(_("Easy Printing Demo"), NULL);
m_Prn -> SetHeader(wxT(""), wxPAGE_ALL);
m_Prn -> PrintFile("test.html");
return 0;
}
assert "(wxThePrintPaperDatabase != (wxPrintPaperDatabase*) NULL)" failed: wxThePrintPaperDatabase should not be NULL. Do not create global print dialog data objects.
But I do not need any frames or any visual elements to be displayed. I just need to print html transparently.
Thanks in advance.
Best regards,
Khusainov Timur