要做这样一个工具,任务中有几个文件,文件格式是常见的doc,pdf,等,怎么样把这些文件直接提交给打印机?
我查过网上有直接调用windows的 print API,不过我没成功,提示什么 rpn 错误。
在线等待 ……

解决方案 »

  1.   

    有通过MFC里的 GDI 进行打印的方法挺多,但是不知道怎么实现不打开文件而直接打印文件的方法 ?
      

  2.   

    ShellExecute hwnd, "print",。。
      

  3.   

    ShellExecute hwnd, "print" 这样是可以实现全部打印,怎么设置打印功能呢,比如打印范围,横向,纵向?
      

  4.   

    Printing and Print Spooler Functions
    The following functions are used to print.   
     
    AbortDoc  
    DeviceCapabilities  
    EndDoc  
    EndPage  
    Escape  
    ExtEscape  
    SetAbortProc  
    StartDoc  
    StartPage  
    The following functions are used to access the print spooler.   
     
    AbortPrinter  
    AbortProc  
    AddForm  
    AddJob  
    AddMonitor  
    AddPort  
    AddPrinter  
    AddPrinterConnection  
    AddPrinterDriver  
    AddPrinterDriverEx  
    AddPrintProcessor  
    AddPrintProvidor  
    AdvancedDocumentProperties  
    ClosePrinter  
    ConfigurePort  
    ConnectToPrinterDlg  
    DeleteForm  
    DeleteMonitor  
    DeletePort  
    DeletePrinter  
    DeletePrinterConnection  
    DeletePrinterData  
    DeletePrinterDataEx  
    DeletePrinterDriver  
    DeletePrinterDriverEx  
    DeletePrinterKey  
    DeletePrintProcessor  
    DeletePrintProvidor  
    DocumentProperties  
    EndDocPrinter  
    EndPagePrinter  
    EnumForms  
    EnumJobs  
    EnumMonitors  
    EnumPorts  
    EnumPrinterData  
    EnumPrinterDataEx  
    EnumPrinterDrivers  
    EnumPrinterKey  
    EnumPrinters  
    EnumPrintProcessorDatatypes  
    EnumPrintProcessors  
    FindClosePrinterChangeNotification  
    FindFirstPrinterChangeNotification  
    FindNextPrinterChangeNotification  
    FreePrinterNotifyInfo  
    GetForm  
    GetJob  
    GetPrinter  
    GetPrinterData  
    GetPrinterDataEx  
    GetPrinterDriver  
    GetPrinterDriverDirectory  
    GetPrintProcessorDirectory  
    OpenPrinter  
    PrinterMessageBox  
    PrinterProperties  
    ReadPrinter  
    ResetPrinter  
    ScheduleJob  
    SetForm  
    SetJob  
    SetPort  
    SetPrinter  
    SetPrinterData  
    SetPrinterDataEx  
    StartDocPrinter  
    StartPagePrinter  
    WritePrinter   
    Obsolete Functions
      
     
    WaitForPrinterChange