Touch screen calibration under WinCE
Wince cordll provides the screen calibration function, which is similar to the hook function in my previous article. It forces the DLL to load, obtain the address, and then calls it using the function pointer. Here, Firefox provides the source code.
First, add the function pointer definition to the header file:
Typedef bool (winapi * _ touchcalibrate )();
Then use the following code to display the screen Calibration screen.
Hinstance = loadlibrary (_ T ("coredll. dll "));
If (hinstance = NULL)
{
Afxmessagebox (L "instance = NULL ");
Return;
}
_ Touchcalibrate = NULL;
Touchcalibrate = (_ touchcalibrate) getprocaddress (hinstance, l "touchcalibrate ");
If (touchcalibrate = NULL)
{
Afxmessagebox (L "touchcalibrate = NULL ");
Return;
}
Touchcalibrate (); freelibrary (hinstance); one thing worth mentioning about screen calibration is that, as far as I know, the HKEY_LOCAL_MACHINE \ hardware \ devicemap \ touch calibrationdata item in the registry stores screen calibration data. Therefore, if the registry is based on Ram, the screen calibration results will not be saved, after the system is powered off and restarted, it must be calibrated again (if necessary ). If anyone can save the last screen calibration result without using the hive registry, please do not hesitate to ask.
This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/soulforcemw/archive/2009/05/22/4209476.aspx