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

  1. backup of hkey_local_machine\hardware\devicemap\touch\calibrationdata
  2. show windows ce built-in calibration ui using: touchcalibrate()
  3. show custom verification screen described above.
  4. 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 touchpanelsetcalibration must 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:


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -