Is there an API for configuring the calibration screen? Do we have any documentation for it? If nothing else, do we have code we can share with a customer to invoke the calibration screen? I tried searching with little result. Thanks in advance
Calibration Screen API// Expert user has replied. |
5 Replies
Charlie, Two problems, 1) the example referenced by the customer is for Windows CE 6 - Windows Mobile is based on CE 5, however, even assuming that a similar example is available in Platform Builder for CE5 problem 2) it is for driver development (DDK). The standard touch calibration UI (calibrui) is provided by Microsoft and the OEM provides a driver that provides hooks for the UI tool to set the calibration information and calibrate RAW points (TouchPanelCalibrateAPoint, TouchPanelSetCalibration, etc). To accomplish what the customer is asking would require a custom driver for each of the devices the app is to run on (as the each have different touch screen haredware) - not very likely. The OS localization resources (which includes the calibration screen) are stored in resource only dlls for the language of the OS (for example the US english coredll.dll resources are stored in coredll.dll.0409.mui where 0409 is the code page for USEN). As these resource dlls are quite large only those for the installed language are included in the OS image and switching them on the fly (without changing the OS language) would be problematic at best.
Thanks for the quick reply, however my customer now states:
We are already using ::TouchCalibrate() and have done so on MC50s , MC70s and now on MC75A0s. It works fine on MC50s and MC70s but on MC75A0s it has a bug and the prompts run off the screen and are not readable which is a bug. Your development team knows about this and has implemented a workaround for this bug in two places in the MC75A0:
The Motorola \Windows\Welcome.EXE program runs after a CLEAN BOOT and shows a completely different Align screen than what you see by running ::TouchCalibrate(). The colors are completely different.
The ‘Align’ command in the Control Panel System/Screen runs the same Align screen as (a).
I am not sure what API function the Welcome.EXE is calling so I tried simply running the Welcome.EXE itself but ran into issues doing that. Sometimes it shows the Align screen and sometimes it doesn’t. Since that doesn’t work, I need to get a sample of the code that the Welcome.EXE runs so that I can invoke the same system Align screen shown elsewhere on the MC75A0.
Would you please have one of your developers extract a sample of that code and send it to me.
Charlie, Can you have the customer verify that they observe the wrong calibration screen with the attached executable. I tested this on MC75A0 (6.5.3) and MC75A6 (6.5.2); it functions exactly the same as the ctrl panel and the Welcome.exe. If the issue does not occur in the utility attached, have them change/set the linker option in their project for the subsystem to be windowsce,4.20 (see attached screenshot in linker.jpg)
Thanks again Maverick, however, the customer has once again thrown a wrench in things:
I built my own too and when I changed the Linker option from ‘/subsystem:windowsce,4.2.0/machine:ARM /ARMPADCODE’ to ‘/subsystem:windowsce,5.2.0/machine:ARM /ARMPADCODE’ then it showed the same screen as Welcome.EXE. The problem with this approach is that this compiled .EXE may no longer work on MC50s which is unacceptable for us.
I tried linking the ::TouchCalibrate() dyncamically using ::GetProcAddress( ::LoadLibrary(_T("\\Windows\\CoreDll.DLL"), _T("TouchCalibrate") ) and that also displayed the same screen as Welcome.EXE so that has solved my immediate problem.
HOWEVER, I have another Align Screen problem which relates to translation:
We are porting our application to run in French, German and Italian on the standard MC75A0 International English platform. The problem is that when you launch the Align Screen then it always displays its prompts in English.
We would like to be able to display the Align Screen in English, French, German or Italian, all on the same standard MC75A0 platform but I don’t want to have to retest and re-certify our software on the various language versions of this platform.
The ::TouchCalibrate() call must write directly to the display buffer because there is no window that can be accessed and overridden with translated content and there is no way to override its English UI on the English version of the platform.
In order to be able to display translated strings on the Align Screen, I would need software that implements the same touch panel calls as the ::TouchCalibrate() function. Apparently, there is an code sample in the Microsoft DDK that does this but I have installed the Windows Mobile 6.5 SDK and it’s not there:
\WINCE600\PRIVATE\TEST\BASEOS\DRIVERS\TOUCH\API_FUNCTION\TOUCHTEST\winmain.cpp
Can one of your engineers come up with this TouchTest DDK sample and forward it to me, or send me instructions on how I can retrieve this?
Do we have any such thing for this customer?
There is an undeclared function coredll.dll that will invoke the TouchScreen UI Below is some sample C++ code to invoke: extern "C" BOOL WINAPI TouchCalibrate( void ); void invokeTouch( void ) { TouchCalibrate(); }