CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 1999
    Posts
    23

    Simple Printing question



    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

  2. #2

    Re: Simple Printing question





    SendMessage( WM_COMMAND, MAKEWPARAM ( ID_FILE_PRINT_DIRECT, 0 ))


    This will use the current default printer.


    regards

    Hans Wedemeyer


    My Web Site

  3. #3
    Join Date
    Apr 1999
    Posts
    23

    Re: Simple Printing question



    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured