background image

28

Appendix B - Programming Options

The following example code demonstrates how to obtain Z data. For a complete
example, see the included source code for ZAXIS.EXE.

#include "mmioctl.h"

HANDLE hndFile;

// Win32 handle of "MMDev" device

LONG

IoctlCode;

// Function to perform

ULONG

DataLength;

// Output buffer data length

DWORD

ReturnedLength;

// Actual number of bytes returned

LONG

IOBuffer;

// Input/output system buffer

BOOL

IoctlResult;

// Result of operation

//

// Open Win32 touchscreen device(MMDev)

//

hndFile = CreateFile(

// Open the device "MMDev"

"\\\\.\\MMDev",
GENERIC_READ,
FILE_SHARE_READ,
NULL,
OPEN_EXISTING,
0,
NULL

);

if (hndFile == INVALID_HANDLE_VALUE) {// Was the device opened?

MessageBox(NULL, "Unable to open touchscreen",

"Driver Loaded?", MB_OK);

return(0);
}

// See if controller supports Z before going any further

IOBuffer = 0;
IoctlCode = IOCTL_MM_ZAXIS_SUPPORT;
IoctlResult = 0;
DataLength = 4;

IoctlResult = DeviceIoControl(

hndFile,

// Handle to device

IoctlCode,

// IO Control code for Read

NULL,

// We don't need input data

0,

// No input buffer required, NULL bytes

&IOBuffer,

// Buffer from driver.

DataLength,

// Length of buffer in bytes.

&ReturnedLength,

// Bytes placed in DataBuffer.

NULL

// NULL means wait till op. completes.

);

if (!IoctlResult)

// No z

MessageBox(NULL, "This controller does not support Z reporting

capabilities",

"NO Z", MB_OK | MB_ICONEXCLAMATION);

//
// Call the driver to get Z values
//

IOBuffer = 0;
IoctlResult = 0;
DataLength = sizeof(LONG);

Содержание MonitorMouse FOR WINDOWS NT Version 2.0

Страница 1: ...MonitorMouse FOR WINDOWS NT Version 2 0 Manual Version 2 0...

Страница 2: ...MonitorMouse for Windows NT Version 2 0 User s Guide Manual Version 2 0 Elo TouchSystems Inc 1 800 ELOTOUCH www elotouch com A Raychem Company P N 008013 A DOC SW000081...

Страница 3: ...iven away or sold without additional licenses or fees You may not reproduce distribute or revise the program documentation without expressed written consent from Elo This software and accompanying wri...

Страница 4: ...Mouse for Windows NT 13 Touchscreen Control Panel 13 Running the Touchscreen Control Panel 14 Calibration 14 Mouse Button Emulation Mode 15 Double Clicking 15 Click Sound on Touches 16 Tips on Using t...

Страница 5: ...iv Appendix B Programming Options 27 Z Axis Capabilities 27 Launching the Touchscreen Control Panel 29 Calibrating from Within Your Program 29...

Страница 6: ...ouchscreen driver designed for Windows NT This manual is organized as follows Chapter 1 Describes the software included and the hardware requirements Chapter 2 Describes how to install the MonitorMous...

Страница 7: ...n simulation and training applications Elo touchscreens may be used in a harsh environment not appropriate for a mouse or keyboard With MonitorMouse for Windows NT the touchscreen may be used alone or...

Страница 8: ...mouse driver MOUSE COM on the IBM family of personal computers and 100 compatibles Programs using MOUSE COM MOUSE SYS or compatible versions will work with MonitorMouse ELODEV the Elo touchscreen dri...

Страница 9: ...o BBS Your comments and suggestions are welcome Web www elotouch com BBS 423 482 9840 Downloads only up to 14 4K baud multiple protocols CompuServe GO ELOTOUCH Select Elo from the Messages and Library...

Страница 10: ...6 Installing the Software 6 MonitorMouse for Windows NT Files 9 Modifications to Windows NT Configuration 11 BEFORE YOU BEGIN First be sure Windows NT is installed and operating properly with your mou...

Страница 11: ...are including MonitorMouse for Windows NT Install the Elo touchscreen hardware as described in the AccuTouch Product Manual or IntelliTouch Ultra Product Manual INSTALLING THE SOFTWARE 1 Start your co...

Страница 12: ...lows you to install the sample touchscreen programming files 7 The Touchscreen Setup dialog box will appear Specify the type of touchscreen controller you are using and how it is connected Also specif...

Страница 13: ...8 Chapter 2 Installing MonitorMouse for Windows NT 10 Click the Start button then click Settings then click Control Panel 11 Double click Elo Touchscreen to run the Touchscreen Control Panel...

Страница 14: ...TXT Text file containing any additions or changes made after this manual was printed _SETUP DLL Setup program component _SETUP LIB Setup program component DATA Z File containing compressed driver file...

Страница 15: ...Touchscreen driver designed for Windows NT Copied to WINNT SYSTEM32 DRIVERS directory MONMOUSE CPL Touchscreen Control Panel program Copied to WINNT SYSTEM32 directory MONMOUSE HLP Touchscreen Contro...

Страница 16: ...pOnOff REG_DWORD 0x1 ComPort dependent on controller ControllerAddress dependent on controller ControllerLength dependent on controller ControllerLevel dependent on controller ControllerModel dependen...

Страница 17: ...12 Chapter 2 Installing MonitorMouse for Windows NT...

Страница 18: ...NT 17 Running DOS Programs from NT 19 Tips on Using the Touchscreen in Windows NT 19 TOUCHSCREEN CONTROL PANEL The MonitorMouse for Windows NT Touchscreen Control Panel allows you to customize the way...

Страница 19: ...een coordinates into image coordinates Besides the differences in touchscreens and controllers calibration also compensates for variations in the video image among displays Calibration is also affecte...

Страница 20: ...mouse pointer to your point of touch and clicks the left button A beep will confirm the click The mouse pointer will not move nor will any other clicks be simulated until your finger is lifted and th...

Страница 21: ...ontal and vertical range for a legitimate double click If you invoke REGDT32 EXE these parameters are located in HKEY_CURRENT_USER under Control Panel in the Mouse area If you do not find the values c...

Страница 22: ...by MonitorMouse for Windows NT Install the invisible cursor file as follows 1 Open the Control Panel and select Mouse 2 Select the Pointers tab 3 Highlight the Normal Select cursor then select Browse...

Страница 23: ...image This effectively enlarges the active touch area of zones on the edges of the image You may touch the edges and corners of the CRT face to easily click on items displayed at the extremes of the...

Страница 24: ...are no icons or menu choices Fingerprints make a system look dirty and unattractive 3 Use a simple point and click interface with large buttons Do not use dragging double clicks scroll bars drop down...

Страница 25: ...and large fonts are ways to catch the eye An attractive kiosk design is also important 10 Other kiosk design tips If forced air ventilation is used position the fan at the top near the monitor s vent...

Страница 26: ...ce of the problem The first step in troubleshooting a touchscreen system is to determine whether the problem is due to the hardware driver software or application software Installation Problems The Se...

Страница 27: ...powered off Internal serial controllers are usually powered by a supply that is separate from the display s power supply but controlled through the display s power switch In this case even if display...

Страница 28: ...ch or jumper settings then displays the touch coordinates as they are received BUSSTAT polls the controller directly rather than being interrupt driven This can help determine if a problem is interrup...

Страница 29: ...another device If you are using the E281 4035 controller it is also possible that the interrupt specified during software setup did not match your jumper placement Select another interrupt and double...

Страница 30: ...lliTouch Product Manual AccuTouch Product Manual and the controller technical reference manuals also detail the data formats If no data is transmitted on touch or if data is transmitted when the touch...

Страница 31: ...26 Appendix A Troubleshooting...

Страница 32: ...tools To access the Z reporting capabilities of the driver in Win32 the device is accessed via its Win32 name MMDev The CreateFile function opens the MMDev device and returns a handle to it This handl...

Страница 33: ...0 NULL if hndFile INVALID_HANDLE_VALUE Was the device opened MessageBox NULL Unable to open touchscreen Driver Loaded MB_OK return 0 See if controller supports Z before going any further IOBuffer 0 Io...

Страница 34: ...ROM WITHIN YOUR PROGRAM You may also call the calibration procedure of the Touchscreen Control Panel directly from your program with the exported function Calibrate Screen It takes two arguments your...

Страница 35: ...30 Appendix B Programming Options...

Отзывы: