Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 4 of 6

PTC-1800 Software Development Kit Programming Guide: PTC-1800 Programming Overview

Pages 21 to 28 of 48, from PTC-1800 Software Development Kit Programming Guide

The original document is the PDF (346 KB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the Telxon PTC-1800

Page 21

'LVSOD\

PTC-1800 Programming Overview This section will define how to program different devices on the PTC-1800.

Display The display on the PTC-1800 is 160 x 240 (1/ 8 VGA). The Status Bar will take up 26 pixels on the top of the screen leaving a screen size of 160 x 214 pixels.

26 pixels

STATUS BAR

240 pixels

160 pixels

PTC-1800 SDK Programming Guide

13

Page 22

Use the Windows CE call SystemParametersInfo to get the screen size and use SetWindowPos to set your window size to the full work area on window creation.

Contrast The contrast control of the display can be programmed. For details, see section on “PTC-1800 Programming Details.”

Keyboard The PTC-1800 is basically a Windows device. Although it does not have a mouse, all selects and entries are done with the keyboard. See the PTC-1800 Product Reference Guide document which defines the necessary key sequences needed to accomplish this. In general, you use the Softkey 1 key (tab key) to move to the control that you wish to activate. In most cases, the control is activated but not always. In those cases, the best you can do is to test to see whether the control you want has focus (the focus rectangle may be visible). Navigating on property sheets is a bit more difficult. The property sheet tabs themselves are one control that is included in the tab order. Tab order is important. The focus rectangle is not visible when selected. After selecting the tabs, you can move between them with the cursor using the right/left keys (arrow keys).

14

PTC-1800 SDK Programming Guide

Page 23

'LVSOD\

Hot Keys The Phone, Msg, and Talk keys are defined as application hot keys and are reserved for defined applications. The Data key may be used by a programmer. A programmer can set the WM_HOTKEY message to be sent to a given window by using the RegisterHotKey function call. The fsModifier flag should be set to MOD_WIN and the vk parameter set to 0xC2 for the Data key. Typically, this is used to bring the application into the foreground.

PTC-1800 SDK Programming Guide

15

Page 24

Serial Ports The PTC-1800 Windows CE image supports three communication ports: COM1:, COM4:, and COM5:. When opening a driver in Windows CE be sure that the “:” is included in the driver name.

COM1: COM1: communicates with the scanner decode chip.

COM4: COM4: is the raw infrared (raw IR) port. If IrDA is not needed, then a programmer may use this port. See Microsoft’s Windows CE documentation about programming a raw IR port.

COM5: COM5: is the IrCOMM port. See Microsoft’s Windows CE documentation about programming an IrCOMM port.

16

PTC-1800 SDK Programming Guide

Page 25

,U'$

IrDA Windows CE-based devices have three options for implementing infrared communications: raw infrared (raw IR), IrCOMM, and Infrared Sockets (IrSock). See the section above for raw IR and IrCOMM information. For more information about IrSock, see Microsoft’s CE documentation about programming Windows Sockets.

Scanner A programmer may either use COM1: to program the scanner directly or use the scanner keyboard wedge program to implement scanner input as keystroke data.

Scanner Keyboard Wedge The Scanner Keyboard Wedge program will always send an F9 key down and up events before the beginning of scanner data. It will always send an F10 key down and up events at the end of scanner data. This allows a programmer to take advantage of the scanner data for any processing needed.

PTC-1800 SDK Programming Guide

17

Page 26

Backlight The backlight control of the display may be programmed to be turned on and off. For details, see section on “PTC-1800 Programming Details.”

Vibrator (Motor) The vibrator (motor) can be programmed to turn on and off. For details, see section on “PTC-1800 Programming Details.”

Buzzer The buzzer may be programmed to be on or off. Turning the buzzer on allows audio streams to be played on the system buzzer along with the current system receiver (either internal or as headset). For details, see section on “PTC-1800 Programming Details.”

18

PTC-1800 SDK Programming Guide

Page 27

Persistent Registry Windows CE allows several methods to be used for saving the registry to persistent (nonvolatile) storage. This allows the registry to be restored if the unit needs to be cold booted. The PTC-1800 supports the RegCopyFile function call to save the registry contents to the file \harddisk\saved.reg. It will restore this file to the registry on a cold boot.

RegCopyFile This function saves a copy of the current Windows CE RAM-based registry to a specified file, defined in PTC1800.h header file included in PTC1800 C/C++ Software Development Kit. Syntax BOOL RegCopyFile (LPCWSTR lpCopyFileName). Parameters LpCopyFileName specifies the name of the file to which the registry is saved. For the PTC-1800, it should be \harddisk\saved.reg. Return Values TRUE indicates success. FALSE indicates failure. To obtain extended error information, call GetLastError.

PTC-1800 SDK Programming Guide

19

Page 28

Remarks The saved registry (.reg) file can exist on any mounted file system that is accessible by the operating system. RegCopyFile always attempts to create the specified file and open it exclusively for read/write access.

20

PTC-1800 SDK Programming Guide