WinCE7 for AM3517 电容屏多点触控效果

本文介绍了一个基于Windows Embedded Compact 7 (WEC7) 的多点触控测试程序,该程序使用CETouchFilter.dll 和 focaltech I2C 接口实现最多10点的电容屏触控功能。文章重点讲解了通过dwID来正确区分和处理多个触控点的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

http://v.youku.com/v_show/id_XNDc0NjQ2NDAw.html   ---  优酷的视频链接


Windows Embedded Compact 7 for AM3517, CETouchView.exe测试程序,使用CETouchFilter.dll, focaltech I2C 接口多点电容屏。最多支持10点触控。 国内资料还很少,主要还是看MSDN。


http://msdn.microsoft.com/en-us/library/gg158142.aspx


上报给MDD的函数接口为

s_pfnMddReportSampleSet= pMddIfc->pfnMddReportSampleSet;


处理的关键在于dwID和坐标的对应,dwID在一个按下和弹起的过程中,保持不变,wince7就能正确的识别多个点的情况了。


WinCE下的触控屏驱动程序源代码(MS提供) -------------------------------------------------------------------------------- 时间:2003-1-8 20:15:31 来源:BIPLIP.com 作者:Daric 阅读847次 下载 (32K)  因带宽资源有限,如无法下载,请稍后重试。The touch screen driver reads input from touch screen hardware and converts it to touch events that are sent to the input system. The driver is also responsible for converting uncalibrated coordinates to calibrated coordinates that take into account any hardware anomalies, such as skew or nonlinear sequences. The driver must submit points while the user"s finger or stylus is touching the touch screen. When the user"s finger or stylus is removed from the screen, the driver must submit at least one final event indicating that the user"s finger or stylus tip was removed. The calibrated coordinates must be reported to the nearest one-quarter of a pixel.The following steps detail the basic algorithm for using the touch screen: Call TouchPanelEnable to start the screen sampling. Call TouchPanelGetDeviceCaps to request the number of sampling points. For every calibration point, perform the following steps: Call TouchPanelGetDeviceCaps to get a calibration coordinate. Draw a crosshair at the returned coordinate. Call TouchPanelReadCalibrationPoint to get calibration data. Call TouchPanelSetCalibration to calculate the calibration coefficients. After executing this sequence, any finger or stylus samples generated for the screen are passed to the callback function specified in TouchPanelEnable. The driver may pass either calibrated or uncalibrated points to the callback. If the driver has an efficient calibration algorithm, it can return calibrated points. However, if the calibration is computationally intensive, the driver may choose to return uncalibrated points, rather than perform extensive calculations in the high-priority driver thread. The lower priority thread processing points from the callback can then perform the calibration. You can calibrate your touch screen without the ENTER key. The GWES keyboard code opens HKEY_LOCAL_MACHINEHARDWAREDEVICEMAPKEYBD and looks for a DWORD value called Status. This is a bit mask combining the KBDI_KEYBOARD_XXX values from %_WINCEROOT%PublicCommonSDKINCKeybd.h. If it is not found, GWES assumes KBDI_KEYBOARD_PRESENT | KBDI_KEYBOARD_ENTER_ESC | KBDI_KEYBOARD_ALPHA_NUM. This registry access only occurs once, when the keyboard driver is loaded. This value is the basis for what you get when you call GetKeyboardStatus. GWES will add or subtract the KBDI_KEYBOARD_ENABLED bit based on EnableHardwareKeyboard calls. The KBDI_KEYBOARD_ENABLED bit is set when the keyboard driver is loaded. The UseEnterEsc behavior can be controlled by a registry key.The following table shows the touch screen driver functions.Function Description DdsiTouchPanelAttach Called when the MDD"s DLL entry point gets a DLL_PROCESS_ATTACH message. DdsiTouchPanelDetach Called when the MDD"s DLL entry point gets a DLL_PROCESS_DETACH message. DdsiTouchPanelDisable Disables the touch screen device. DdsiTouchPanelEnable Applies power to the touch screen device and initializes it for operation. DdsiTouchPanelGetDeviceCaps Queries for capabilities of the touch screen device. DdsiTouchPanelGetPoint Returns the most recently acquired point and its associated tip-state information. DdsiTouchPanelPowerHandler Indicates to the driver that the system is entering or leaving the suspend state. DdsiTouchPanelSetMode Sets information about the touch screen device. ErrorAnalysis Provides information on the accuracy of the touch screen calibration. TouchPanelCalibrateAPoint Converts uncalibrated points to calibrated points. TouchPanelDisable Disables the touch screen. TouchPanelEnable Enables and re-enables the touch screen. TouchPanelGetDeviceCaps Returns information about the capabilities of the touch screen. TouchPanelPowerHandler Handles power-state change notifications. TouchPanelReadCalibrationAbort Aborts the currently active call to the TouchPanelCalibrateAPoint function TouchPanelReadCalibrationPoint Initiates the process of getting a calibration point. TouchPanelSetCalibration Initializes calibration information in the vCalcParam global parameter. TouchPanelSetMode Sets mode information for a touch screen device.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值