I have an application in which I call PrintDlg(pd) from several points. I note the following common behaviour when the printer is unavailable.
First time I try to print, the PrintDlg appears and then when I click OK I get an error in my print routine. Nothing strange so far. Then I try to print again. This time the dialog doesn't appear but in its place there's a message box with "The printer could not be found". Again, nothing strange.
The strange thing is the text in the caption bar of the message box, which seems to depend on the pd.hWndOwner member of the PRINTDLGAPI structure passed to the dialog. I see the following.
The thing that really surprises me, and looks very ugly, is the behaviour when the parent window is an edit control. Is this a Windows bug or some mistake on my part?
Keith
------------------
[This message has been edited by Keith Waters (edited September 09, 2001).]
First time I try to print, the PrintDlg appears and then when I click OK I get an error in my print routine. Nothing strange so far. Then I try to print again. This time the dialog doesn't appear but in its place there's a message box with "The printer could not be found". Again, nothing strange.
The strange thing is the text in the caption bar of the message box, which seems to depend on the pd.hWndOwner member of the PRINTDLGAPI structure passed to the dialog. I see the following.
Code:
pd.hWndOwner Message box caption Main application window same as application window A QHTM control "Printer Error" A graphics pane "Printer Error" A multi line edit control the whole contents of the edit control
Keith
------------------
[This message has been edited by Keith Waters (edited September 09, 2001).]
Comment