Click to See Complete Forum and Search --> : Simple Printing question


Thomas
March 29th, 1999, 08:14 AM
Hi there


i have a sdi-application with a CEditView derived View class.

In App-Wizard I activated Printing/Printing Preview.


So i can print out text just with click on the printer symbol.

So far, so good.


Now i get data in my edit-window which come from outside, serial, parallel, other devices.


The question is: how can i trigger the printing function when automatically.

I want to react on my data coming in, when the transfer is complete i want to print and save automatically.


Do i have to overwrite the print function and do the work on my own, or is there a way to tell the app simply to print (say the app that somebody pressed the print button without pressing it really) ?!?


Hope you understand what I mean.


thanks in advance


thomas

Hans Wedemeyer
March 29th, 1999, 08:41 AM
SendMessage( WM_COMMAND, MAKEWPARAM ( ID_FILE_PRINT_DIRECT, 0 ))


This will use the current default printer.


regards

Hans Wedemeyer


My Web Site

Thomas
March 29th, 1999, 08:57 AM
Thanks a lot


i have found another solution in the meantime.

i am calling CEditView::OnFilePrint

and in the OnPreparePrinting i am modifying the m_bDirect member to 1


this works fine