Made by Aistė Augustinaitė Software Engineering 3 group

Slides:



Advertisements
Similar presentations
What Was I Thinking??. Key Terms 1. Control 1. Control 2. Design Mode 2. Design Mode 3. Event 3. Event 4. Form 4. Form 5. Interface 5. Interface 6. Properties.
Advertisements

Tutorial 12: Enhancing Excel with Visual Basic for Applications
The Web Warrior Guide to Web Design Technologies
XP Tutorial 9 New Perspectives on Microsoft Windows XP 1 Microsoft Windows XP Exploring Your Network Tutorial 9.
Advanced Workgroup System. Printer Admin Utility Monitors printers over IP networks Views Sharp and non-Sharp SNMP Devices Provided Standard with Sharp.
1 Chapter Overview Understanding Printer Administration Managing Printers Managing Documents Administering Printers Using a Web Browser Troubleshooting.
Automating Tasks With Macros
By Rashid Khan Lesson 7-Preparing for Output: Printer Configuration and Management.
9.1 © 2004 Pearson Education, Inc. Exam Managing and Maintaining a Microsoft® Windows® Server 2003 Environment Lesson 9: Installing and Configuring.
Automating Tasks With Macros. 2 Design a switchboard and dialog box for a graphical user interface Database developers interact directly with Access.
MCDST : Supporting Users and Troubleshooting a Microsoft Windows XP Operating System Chapter 12: Network Printing and Offline Files.
A+ Guide to Software, 4e Chapter 11 Supporting Printers and Scanners.
Configuring Print Services Lesson 7. Skills Matrix Technology SkillObjective DomainObjective # Deploying a Print ServerConfigure and monitor print services.
Printing Terminology. Requirements for Network Printing At least one computer to operate as the print server Sufficient RAM to process documents Sufficient.
Microsoft Office Word 2013 Expert Microsoft Office Word 2013 Expert Courseware # 3251 Lesson 4: Working with Forms.
COMPREHENSIVE Excel Tutorial 8 Developing an Excel Application.
1 Module 17 Printing from Windows NT. 2  Overview Windows NT Printing Process Printing from MS-DOS-based Applications Windows NT Printing Components.
Guide to MCSE , Second Edition, Enhanced1 Objectives Understand Windows XP print terminology and architecture Work with the Windows XP print subsystem.
Windows Server 2008 Chapter 6 Last Update
9.1 © 2004 Pearson Education, Inc. Exam Managing and Maintaining a Microsoft® Windows® Server 2003 Environment Lesson 9: Installing and Configuring.
Working with Drivers and Printers Lesson 6. Skills Matrix Technology SkillObjective DomainObjective # Understanding Drivers and Devices Install and configure.
WORKING WITH MACROS CHAPTER 10 WORKING WITH MACROS.
WINDOWS SERVICES. Introduction You often need programs that run continuously in the background Examples: – servers –Print spooler You often need.
CSCI 6962: Server-side Design and Programming Introduction to AJAX.
Tutorial 10 Adding Spry Elements and Database Functionality Dreamweaver CS3 Tutorial 101.
Chapter 6 Configuring Windows Server 2008 Printing
1 Managing Printers (Week 12, Monday 3/26/2007) © Abdou Illia, Spring 2007.
Department of Mechanical Engineering, LSUSession VII MATLAB Tutorials Session VIII Graphical User Interface using MATLAB Rajeev Madazhy
B&W Default Settings Instructions for setting your Windows PC Ricoh printer default to B&W Click your mouse or press your “Down Arrow” key to advance Instructions.
Prepared by Fareeha Lecturer DCS IIUI 1 Windows API.
Course ILT Printer and virus management Unit objectives Perform various printing tasks, including installing printer drivers, printing documents, monitoring.
Module 9: Preparing to Administer a Server. Overview Introduction to Administering a Server Configuring Remote Desktop to Administer a Server Managing.
XPS Rasterization Service in Windows 7
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved CheckWriter Application Introducing Graphics and Printing.
JavaScript - A Web Script Language Fred Durao
Module 5: Implementing Printing. Overview Introduction to Printing in the Windows Server 2003 Family Installing and Sharing Printers Managing Access to.
Creating Graphical User Interfaces (GUI’s) with MATLAB By Jeffrey A. Webb OSU Gateway Coalition Member.
Getting Started with OPC.NET OPC.NET Software Client Interface Client Base Server Base OPC Wrapper OPC COM Server Server Interface WCF Alternate.
Presentation Outline Introduction Painting and Repainting GDI.
11 WORKING WITH PRINTERS Chapter 10. Chapter 10: WORKING WITH PRINTERS2 THE WINDOWS SERVER 2003 PRINTER MODEL  Locally attached printers Printers that.
Chapter2: Drawing a Window. Review: Introducing MFC.
XP New Perspectives on Microsoft Office Access 2003 Tutorial 10 1 Microsoft Office Access 2003 Tutorial 10 – Automating Tasks With Macros.
Slide 1 Using Menu Bar & Common Dialog Boxes. Slide 2 Setting Up the Main Items v First open the form on which you want the menu located v Then start.
Ⅰ. PS Driver ML-4050N Series PostScript, Driver ML-4050N Series PostScript, Driver.
ERICSON BRANDON M. BASCUG Alternate - REGIONAL NETWORK ADMINISTRATOR HOW TO TROUBLESHOOT TCP/IP CONNECTIVITY.
Processes and Threads MICROSOFT.  Process  Process Model  Process Creation  Process Termination  Process States  Implementation of Processes  Thread.
Microsoft Office 2008 for Mac – Illustrated Unit D: Getting Started with Safari.
Visual Basic.NET BASICS Lesson 14 Menus and Printing.
9.1 © 2004 Pearson Education, Inc. Exam Managing and Maintaining a Microsoft® Windows® Server 2003 Environment Lesson 9: Installing and Configuring.
Configuring Print Services Lesson 7. Print Sharing Print device sharing is another one of the most basic applications for which local area networks were.
JavaScript, Sixth Edition
Presentation Outline Introduction Painting and Repainting GDI.
Module 9: Preparing to Administer a Server
Running a Forms Developer Application
Windows Calls Applications (windows.applicationmodel.calls)
MANAGING LOCAL AND NETWORK PRINTERS
Working with Dialogs and Controls
Chapter 1: An Introduction to Visual Basic 2015
Copyright © 2008 Pearson Prentice Hall. All rights reserved.
Windows Development Dynadata Copyright, 2014 © DynaData S.A. 1/10.
Lesson 14 Sharing Documents
COMMON CONTROLS A control is a child window that an application uses in conjunction with another window to enable user interaction. Controls are most often.
Windows Programming Lecture 13
Training Module Introduction to the TB9100/P25 CG/P25 TAG Customer Service Software (CSS) Describes Release 3.95 for Trunked TB9100 and P25 TAG Release.
Building a Win32API Application
Chapter 11 Supporting Printers and Scanners
Windows Development Dynadata Copyright, 2014 © DynaData S.A. 1/10.
Channel Access Concepts
Module 9: Preparing to Administer a Server
Creating Additional Input Items
Presentation transcript:

Made by Aistė Augustinaitė Software Engineering 3 group Windows API Printing Made by Aistė Augustinaitė Software Engineering 3 group

Desktop App Printing WndProc function processes messages from the operating system and provide them to the main window procedure. A native Windows program should be multi- threaded. Program's print job processing need to be performed in a different thread than that which processes user interaction. Printing program uses the XPS (XML Paper Specification) documents for printing.

Printing tasks Collect print job information from user Create progress indicator Start the printing thread Render print job data Monitor print job progress Close print job and terminate printing thread

Retrieve a PrinterDevice Context CreateDC function Print common dialog box.

CreateDC function CreateDC which retrieves a device context to the default display device CreateDC in which the "WINSPOOL" driver is selected and the printer name is specified by name

CreateDC function EnumPrinters function which obtains the exact printer name string to pass to CreateDC.

Print common dialog box PrintDlgEx function (newer dialog box) lppd [in, out] - a pointer to a PRINTDLGEX structure that contains information used to initialize the property sheet. When PrintDlgEx returns, this structure contains information about the user's selections. PrintDlg function (older style dialog box) lppd [in, out] - a pointer to a PRINTDLG structure that contains information used to initialize the property sheet. When PrintDlg returns, this structure contains information about the user's selections.

Displaying Print Job Progress WM_INITDIALOG Initializes the controls that the dialog box uses. WM_SETCURSOR Sets the cursor to a pointer when the user is able to cancel a print job, and to the wait cursor when the print job is at a point where it cannot be cancelled. USER_PRINT_START_PRINTING Sets the progress bar parameters for the print job, and creates the printing thread to start processing the print job. This is an application-specific window message.

USER_PRINT_STATUS_UPDATE WM_COMMAND - IDCANCEL Sets the cancel event to tell the print processing thread to cancel the print job. USER_PRINT_STATUS_UPDATE Updates the progress bar and status text to show the current state of the print job. This is an application-specific window message. USER_PRINT_CLOSING Sets the closing status text in the progress dialog box to indicate that the print job is closing. USER_PRINT_COMPLETE Displays the "Print job complete" message to the user, and releases handles and events that were used in this print job.

Start and Stop a Printing Thread Prepare the data and user interface elements for printing. Start the print processing thread. Call CreateThread to start the processing thread.

Check whether print processing failed on start. Use WaitForSingleObject function. It returns when either the timeout occurs or the thread handle is signaled. STOP There should be a Cancel button in the print progress dialog box that calls the quiteEvent event.

Print APIs that a native Windows application can use

Print Spooler API The Print Spooler API provides an interface to the print spooler for applications to manage printers and print jobs.

Print Ticket API The Print Ticket API provides enables applications to manage and convert print tickets. A print ticket is an XPS document component that contains the preferred printer settings. The print ticket must be validated against the printer's characteristics.

GDI Print API The GDI Print API provides applications with a device- independent printing interface. http://www.dreamincode.net/forums/topic/194320- win32-api-printer-tutorial-using-gdi-functions/

XPS Print API Provides an interface to the print spooler. Applications can use this API to send XPS documents to a printer. Client applications should use the Print Document Package API instead.

Print Document Package API Provides an interface that allows an application to access and manage the print document package.

Literature All the information can be found on: https://msdn.microsoft.com/en-us/library/windows/desktop/ff819274(v=vs.85).aspx

Thank you for your attention!