// // Copyright (c) Microsoft Corporation. All rights reserved. // // // Use of this source code is subject to the terms of the Microsoft end-user // license agreement (EULA) under which you licensed this SOFTWARE PRODUCT. // If you did not accept the terms of the EULA, you are not authorized to use // this source code. For a copy of the EULA, please see the LICENSE.RTF on your // install media. // #include <windows.h> #include <calibrui.h> #include <calibrrc.h> #define C_CALIBRATION_MSG_BUF_CHARS 128 static TOUCH_CALIBRATE_STATE *s_ptcs; // Current touch calibration State static HINSTANCE s_hinst; #define USE_ENTER_ESC_MASK (KBDI_KEYBOARD_PRESENT|KBDI_KEYBOARD_ENABLED|KBDI_KEYBOARD_ENTER_ESC) static BOOL UseEnterEsc( void ) { return (GetKeyboardStatus() & USE_ENTER_ESC_MASK) == USE_ENTER_ESC_MASK; } /*++ TouchCalibrateUI_Initialize: --*/ void TouchCalibrateUI_Initialize( TOUCH_CALIBRATE_STATE *ptcs, HINSTANCE hinst ) { s_ptcs = ptcs; s_hinst = hinst; } static void TextSize( HDC hdc, PCTSTR pszStr, int cChars, SIZE *pSize ) { if ( !GetTextExtentExPointW( hdc, pszStr, cChars, 0, // nMaxExtent NULL, // lpnFit NULL, pSize) ) { ERRORMSG(1, (TEXT("GetLastError: %d (dec)/r/n"), GetLastError())); AS