LinePrinter C++ Print Sample

 

 

  1. Sample Overview
  2. Requirements and Dependencies
  3. Topics
  4. Building the Sample
  5. Running the Sample
  6. Notes 

Sample Overview

This sample demonstrates the use of the Intermec LinePrinter ActiveX Control to create a simple report printout.

This project files for this sample, (.vcp, .vcw), only support EVC3.0 at this time.

 

Requirements and Dependencies

There are several files that should be in your development directory when you start this project. They are:

 

File

Description

InkSig.bmp

Sample bitmap file for demo printing.

lineprinter.cpp

Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++.

lineprinter.h

Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++.

LinePtr.h

This always generated file contains the definitions for the interfaces. File created by MIDL compiler version 3.02.88.

PrtDlg.cpp

Report detail lines source code.

PrtDlg.h

DCPrtDlg dialog (Options) definition.

Readme.htm

This file.

ReadMe.txt

Microsoft Developer Studio generated readme file.

Resource.h

Microsoft Developer Studio generated include file used by SampleCE.rc.

SampleCE.cpp

Defines the class behaviors for the application.

SampleCE.h

Main header file for the SAMPLECE application.

SampleCE.ico

EVC generated icon file.

SampleCE.rc

Microsoft Developer Studio generated resource script.

SampleCE.rc2

Resources Microsoft Visual C++ does not edit directly

SampleCE.vcp

EVC project file.

SampleCE.vcw

EVC solution file.

SampleCEDlg.cpp

Dialog implementation file.

SampleCEDlg.h

CSampleCEDlg dialog (Start Print) definition.

StdAfx.cpp

Source file that includes just the standard includes.

StdAfx.h

Include file for standard system include files,

WinCE.ini

LinePtr configuration file.

 

Besides the above, there are three other files PRNPORT.DLL, PRNERR.DLL, and NPCPPORT.DLL which must be loaded on the mobile computing device.  The directory on the mobile computing device they might be found in is either \windows or \Flash File Store\System.  If the files do not appear in either of these directories, the features used in this example may not be supported on this platform.

  

The CE version of the Line Printer Control, LINEPTR.DLL, must be loaded and registered on the executing device before the sample code may be run on the mobile computer.  The DLL will usually be found on the development machine at IntermecRoot \Developer Library\Printing Resource Kit\Runtime\Platform.  Where IntermecRoot is the directory you chose to install the resource kit, usually C:\Program Files\Intermec, and Platform corresponds to whichever platform you are developing for.

 

Once the DLL in on the mobile computer, it may be registered using the Microsoft utility, RegsvrCE.

 

Before you open the project, the desktop version of the Line Printer Control must be registered with the desktop Operating System or the project will not compile and run.  If you have already opened the project and are now checking this file to see what went wrong, you should reinstall this sample. 

To register the desktop version of the control, open a command window and navigate to the directory the desktop version of the Line Printer Control is in.  This will usually be IntermecRoot\Developer Library\ActiveX Design Time.  Now type:

"RegSvr32 lineptr.dll".  This should register the control on the development machine.

 

WinCE.ini must also be moved to the \Windows\Start Menu directory on the mobile computer before the program will run.

Topics

CancelFontSelect NewLine StartLP Write 

Building the Sample

Load the project in Embedded Visual C++ (EVC),download and register files listed above, and select “build”. 

Running the Sample

Make sure the printer is on and connected before pressing Print.

Notes

None.