Re: Problem using wxHtmlEasyPrinting

David Connet <[email protected]>
Newsgroups gmane.comp.lib.wxwindows.general
Message-ID <[email protected]>
On 5/15/2023 3:57 PM, Vadim Zeitlin wrote:
> On Mon, 15 May 2023 15:54:47 -0700 David Connet wrote:
>
> DC> On 5/15/2023 9:55 AM, David Connet wrote:
> DC> > Something happened between 3.2.2 and trunk - I can no longer bring up
> DC> > the print dialog on Windows (10 and 11) when clicking 'Print' from the
> DC> > Preview window. Tracing in, I can see in printdlg.cpp that it has
> DC> > changed from calling PrintDlg to PrintDlgEx - when that is called, I
> DC> > get an E_INVALIDARG return code. I've tried tracing, but got lost...
> DC> >
> DC> > Any ideas on what to look for?
> DC> >
> DC> > Dave
> DC> >
> DC> Ah ha!
> DC>
> DC> In the past, I did not set the from/to range (or min/max) - and
> DC> defaulted to all-pages. With moving to PrintDlgEx, that no longer works.
>
>   Thanks for finding this, I was just going to reply that this is probably
> related to the page range changes.
>
> DC> This is something that should probably be called out in release notes...
>
>   I think this should rather be fixed as there is no reason to break the
> existing code, especially as this is non-obvious to fix. Could you please
> open an issue for this? If you could attach a patch to the printing sample
> showing how to break it with the current master, it would be very useful
> too.
>
>   TIA!
> VZ
>
I'm not sure how to break the sample... I just tried commenting out all 
the wxPrintDialogData settors (in OnPrint), but that still worked. There 
must be some subtlety to how I was creating mine...

I'll create a bug, but I'm not sure how to create a test case for that. 
(I mean I can point to my github repo, but that's definitely not a 
simple program!) In the bug, I'll suggest adding a debug (assert?) for 
when E_INVALIDARG  is returned so it can at least give the programmer a 
clue.

Dave

-- 
Please read https://www.wxwidgets.org/support/mlhowto.htm before posting.
--- 
You received this message because you are subscribed to the Google Groups "wx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/wx-users/a51b1719-c802-032b-ff2a-6a003cd64aaa%40agilityrecordbook.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.