c++ - TouchPanelSetCalibration not updating calibration -
problem
our product providing wizard calibrate touch screen. special requirement need verify every new calibration made wizard. verification quite simple tho. after touch screen has been calibrated new screen containing 4 touch targets (buttons) shown, if user able hit each target within given time frame calibration considered successful. if time runs out, calibration data in registry shall restored , touch driver shall restored without restarting.
approach
- backup of
hkey_local_machine\hardware\devicemap\touch\calibrationdata - show windows ce built-in calibration ui using:
touchcalibrate() - show custom verification screen described above.
- if verification failed restore registry , call
touchpanelsetcalibration(...)using old calibration data.
when calling touchpanelsetcalibration(...) following output:
maximum allowed error 54: calibration results: screen => mapped ( 240, 136) => ( 240, 130) ( 96, 54) => ( 93, 57) ( 96, 218) => ( 99, 218) ( 384, 218) => ( 381, 220) ( 384, 54) => ( 387, 55) maximum error (square of euclidean distance in screen units) = 36
the registry restored , considering output i'm assuming calibration data forwarded driver.
but somehow touch calibration not restored without restarting system.
do need signal change somehow sending message or firing event? need make additional api calls? ...any appreciated
thanks.
~sambuca
i posted question on msdn forums. here's answer got there:
the touch driver entrypoint
touchpanelsetcalibrationmust called gwes calibration data updated. when called user application, api update data held inside application process.but there other approach implement touch calibration wizard.
the touch calibration ui (calibrui) shown
touchcalibrate()can customized. basically, you'd need replace default confirmation screen own implementation.the instructions on how clone default calibrui can found:
- for windows ce 5.0 in msdn: http://msdn.microsoft.com/en-us/library/aa452834.aspx
- for ce 6.0 , compact 7: http://guruce.com/blogpost/cloning-calibrui-in-windows-ce-60
Comments
Post a Comment