亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? tchwnd.cpp

?? The touch screen driver reads input from touch screen hardware and converts it to touch events that
?? CPP
字號:
//
// 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.
//
/*++

TCHWND
--*/

#include    <windows.h>
#include	<tchar.h>
#include	<types.h>

//#include	   "debug.h"
#include	   "pegc_def.h"
#include    "tchddi.h"

#ifdef __cplusplus
extern "C"{
#endif 
#include    "tchstub.h"

// Local and external functions
HWND	FindForegroundFocusWindow(HWND hForegroundWnd);
LRESULT CALLBACK TchStubWndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
void TouchCreateEventInternal(int begX, int begY);
void
StubCallback2(
	DWORD dwtick0,
   TOUCH_PANEL_SAMPLE_FLAGS	Flags,
	INT	X,
	INT	Y
    );


DWORD WINAPI TchWindowThread(DWORD dwParameter)
{
 WNDCLASSW wc;
 HWND hWnd;
 MSG msg;
 HANDLE	hInst = reinterpret_cast<HANDLE>(dwParameter);

   wc.style = 0; //CS_HREDRAW | CS_VREDRAW; //|  CS_DBLCLKS;
   wc.lpfnWndProc = (WNDPROC) TchStubWndProc;
   wc.cbClsExtra = 0;
   wc.cbWndExtra = 0;
   wc.hInstance = reinterpret_cast<HINSTANCE>(hInst);
   wc.hIcon = 0;
   wc.hCursor = 0;
   wc.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH);
   wc.lpszMenuName = 0;
   wc.lpszClassName = TOUCHSTUB_WNDCLASSNAME;
   Sleep(4000);
   if (RegisterClass(&wc) == FALSE ) 
      {
     	  MYERRORMSG(1,
			(TEXT("Could not register window class for TouchStub Window.\r\n")));
         return 0;
      }

   if((hWnd=CreateWindowEx(0, TOUCHSTUB_WNDCLASSNAME, L"", 0,
             0, 0, 1 , 1, NULL, NULL, reinterpret_cast<HINSTANCE>(hInst), NULL))==0)
      {
		   MYERRORMSG(1,
			   (TEXT("Could not create TouchStub Window.\r\n")));
         return 0;
      }
   ShowWindow(hWnd, SW_HIDE);   

   while(1)
      {
         if(GetMessage(&msg, NULL, 0, 0) == FALSE) 
            break;
         TranslateMessage(&msg);
         DispatchMessage(&msg);
      }
   return 0;
}


// The point of this routine is to get the focus window in the client proc (ie, pWord, etc).
//
//  Since the Focus window of the foreground proc is not the same as the foreground window, we do this by
//  creating a window parented to the foreground window, then calling GetFocus() on that window, then
//  destroying the temp window we created.
//  If creating the window fails, we return hForegroundWnd - not perfect, but the best we can do.
//  The GWE lead developer warns that this could break with future versions of the OS.  The alternative is to //  sublcass the foreground wnd, then on that subclassed thread check to see who has focus, then
//  undo the sublcass, returning the result (the code used to do that).
HWND	FindForegroundFocusWindow(HWND hForegroundWnd)
{
	HWND	hWndFocus;
	HWND	hTempWindow;

	// create a window, any window, parented to hForegroundWnd
	hTempWindow = CreateWindowEx(0, TOUCHSTUB_WNDCLASSNAME, L"", 0,
                                 0, 0, 1 , 1, hForegroundWnd, NULL, 
                                 reinterpret_cast<HINSTANCE>(*_phinstDll), NULL);

	if (NULL == hTempWindow)
		return hForegroundWnd;

	// this works because creating a window parented to hForegroundWindow joins the 
	//  input contexts of the message queues temporarily, so we can find which
	//  child of the foreground wnd actually has the focus using the standard API call.
	hWndFocus = GetFocus();

	// destroying the window disconnects my thread input context from the foreground thread
	DestroyWindow(hTempWindow);

	return hWndFocus;

}


LRESULT CALLBACK TchStubWndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
 {
  switch (message) 
   {
      case WM_CLOSE:
         return 0;
      case WM_STUB_TABLET:
         StubCallback2(wParam, (TOUCH_PANEL_SAMPLE_FLAGS)(lParam>>26), ((lParam>>13)&0x01FFF), (lParam&0x01FFF));
         break;

      case WM_STUB_GETVERSION:
         return (CGRTOUCH_MAJOR_VERSION*10000+CGRTOUCH_MINOR_VERSION*100+CGRTOUCH_RELEASE);
         //_iTouchStubVersion;

      case WM_STUB_GETLASTTOUCHFOCUSWND:
         return (LRESULT)_hLastTouchFocusWnd;

	  // go to the client process (pWord, etc) and see who has focus there (set _hLastTouchFocusWnd to answer)
      case WM_STUB_GETFOCUSWND:
         {
            HWND hFgrWnd = GetForegroundWindow();

			// if there is no foreground window, no need to go further
            if(hFgrWnd==NULL || !IsWindow(hFgrWnd))
			{
                _hLastTouchFocusWnd = NULL;
                return 0;
			}
			// default to the foreground window in case the explorer has focus
            _hLastTouchFocusWnd = hFgrWnd;	
            
			// if the explorer has focus, return
            TCHAR szClass[128];
            GetClassName( hWnd, szClass, 127);
            if(_tcscmp(szClass, L"DesktopExplorerWindow")==0)
                return 0;

			// Call our routine to find the focus window
			_hLastTouchFocusWnd = FindForegroundFocusWindow(hFgrWnd);
			return reinterpret_cast<long>(_hLastTouchFocusWnd);
		 }
			

      case WM_STUB_EVENT:
         TouchCreateEventInternal((int)wParam, (int)lParam);
         return TRUE;

      case WM_STUB_REGISTWND:
         _hClientWnd = (HWND)wParam;

#ifdef DEBUGTOUCH
         // Show the debug message next time touch driver performance is below.
         _bNoDbgMsg = FALSE;
#endif // DEBUGTOUCH

         return TRUE;
      case WM_STUB_UNREGISTWND:
         if(_hClientWnd == (HWND)wParam)
            _hClientWnd = NULL;

#ifdef DEBUGTOUCH
         // Show the debug message next time touch driver performance is below.
         _bNoDbgMsg = FALSE;
#endif // DEBUGTOUCH

         break;
      case WM_STUB_SETVALUE:
         switch(wParam)
            {
               case STUB_LAST_CLICKTIME:
                  _dwLastSendedTick = lParam;
                  break;
               case STUB_VALUE_REGWND:
                  break;
               case STUB_VALUE_STUBWND:
                  break;
               case STUB_MIN_PAUSE_BEFORE_CLICK:
                  dwMinPauseBeforeClick = lParam;
                  break;
               case STUB_MAX_CLICK_DIST:
                  iMaxClickDist = lParam;
                  break;
               case STUB_MAX_CLICK_TIME:
                  dwMaxClickTime = lParam;
                  break;
               case STUB_MAX_DELAY_DIST:
                  iMaxDelayDist = lParam;
                  break;
               case STUB_MIN_START_DELAY_TIME:
                  dwMinStartDelayTime = lParam;
                  break;
               case STUB_MIN_INTER_DELAY_TIME:
                  dwMinInterDelayTime = lParam;
                  break;
            }
         break;
      case WM_STUB_GETVALUE:
         switch(wParam)
            {
               case STUB_VALUE_REGWND:
                  return (LRESULT)_hClientWnd;
               case STUB_VALUE_STUBWND:
                  return (LRESULT)*_phStubWnd;
               case STUB_MIN_PAUSE_BEFORE_CLICK:
                  return dwMinPauseBeforeClick;
               case STUB_MAX_CLICK_DIST:
                  return iMaxClickDist;
               case STUB_MAX_CLICK_TIME:
                  return dwMaxClickTime;
               case STUB_MAX_DELAY_DIST:
                  return iMaxDelayDist;
               case STUB_MIN_START_DELAY_TIME:
                  return dwMinStartDelayTime;
               case STUB_MIN_INTER_DELAY_TIME:
                  return dwMinInterDelayTime;
               default:
                  return 0;
            }
         break;
      case WM_STUB_RESET:
         if(wParam)
            {
               dwMinPauseBeforeClick         =  1500;
               iMaxClickDist                 =  23;
               iMaxDelayDist                 =  18;
               dwMaxClickTime                =  480;
               dwMinStartDelayTime           =  480;
               dwMinInterDelayTime           =  800;
            }
         _dwLastSendedTick = 0;

      default : return DefWindowProc(hWnd, message, wParam, lParam);
   }

  return DefWindowProc(hWnd, message, wParam, lParam);
}


#ifdef __cplusplus
   }
#endif //ifdef __cplusplus

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
美女一区二区三区| 大桥未久av一区二区三区中文| 久久www免费人成看片高清| 国产成人精品一区二区三区网站观看 | 在线成人高清不卡| 中文字幕免费一区| 青草av.久久免费一区| 在线日韩av片| 国产精品美女久久久久aⅴ国产馆| 性做久久久久久| 91麻豆国产香蕉久久精品| 久久婷婷色综合| 日本不卡中文字幕| 欧美日韩一区二区三区在线看| 国产精品色哟哟| 国产乱子轮精品视频| 91精品国产综合久久精品性色| 亚洲免费观看高清完整版在线观看| 国产在线观看一区二区| 日韩三级视频在线观看| 亚洲一区二区视频| 色成年激情久久综合| 国产精品二区一区二区aⅴ污介绍| 精品亚洲免费视频| 精品欧美久久久| 日韩高清中文字幕一区| 欧美日韩精品久久久| 亚洲黄色免费电影| 色婷婷精品久久二区二区蜜臂av| 国产精品美女久久久久久久网站| 福利一区二区在线| 国产日产欧产精品推荐色| 国产精品一二三四| 国产日产精品一区| 99久久久国产精品| 亚洲欧美一区二区久久| 91丨porny丨最新| 一区二区三区四区在线| 在线精品视频小说1| 亚洲欧美一区二区三区久本道91 | 欧美xxxx老人做受| 蜜臀久久久99精品久久久久久| 91麻豆精品国产自产在线观看一区| 亚洲国产日韩a在线播放性色| 在线观看不卡一区| 亚洲va国产va欧美va观看| 欧美少妇xxx| 免费三级欧美电影| 久久久久久久久伊人| 欧美在线你懂的| 亚洲主播在线播放| 欧美一区二区三区在| 精品中文字幕一区二区小辣椒 | 欧美午夜电影一区| 秋霞av亚洲一区二区三| 久久久久久9999| 91小视频免费看| 日本中文字幕一区二区有限公司| 日韩丝袜情趣美女图片| 国产91精品免费| 亚洲激情在线激情| 欧美一级艳片视频免费观看| 国产成人综合网| 亚洲图片欧美一区| 精品国免费一区二区三区| 国产99久久久精品| 亚洲超碰97人人做人人爱| 久久婷婷久久一区二区三区| 色就色 综合激情| 精品一区二区三区在线视频| 国产精品免费免费| 欧美另类变人与禽xxxxx| 国产一区二区三区| 亚洲午夜国产一区99re久久| www日韩大片| 91丨porny丨国产入口| 奇米色777欧美一区二区| 日韩一区欧美小说| 日韩精品一区二区在线| 91麻豆蜜桃一区二区三区| 久久精品国产99国产精品| 一区在线播放视频| 国产亚洲欧美色| 欧美一区二区三区的| 一本大道久久a久久精品综合| 九色porny丨国产精品| 亚洲高清在线精品| 国产精品乱人伦中文| 精品免费国产一区二区三区四区| 色综合天天综合色综合av| 国产精品自在在线| 青青草视频一区| 亚洲电影中文字幕在线观看| 国产精品美女一区二区在线观看| 亚洲精品在线观| 日韩网站在线看片你懂的| 欧美性xxxxxxxx| 色噜噜偷拍精品综合在线| 成人av电影免费观看| 国产专区欧美精品| 久久精品国产成人一区二区三区 | 久久超碰97中文字幕| 亚洲超碰精品一区二区| 一区二区三区视频在线看| 国产精品女上位| 国产日产精品1区| 久久男人中文字幕资源站| 日韩精品自拍偷拍| 日韩写真欧美这视频| 亚洲免费观看在线视频| 中文字幕精品三区| 亚洲国产电影在线观看| 国产喷白浆一区二区三区| 久久久久久久国产精品影院| 精品国免费一区二区三区| 日韩视频在线一区二区| 日韩三级电影网址| 538在线一区二区精品国产| 欧美肥妇bbw| 欧美一卡二卡三卡| 欧美一区日韩一区| 精品88久久久久88久久久 | 欧美日韩一区精品| 欧美三级在线视频| 欧美一级片在线观看| 日韩一区二区在线看| 欧美精品一区视频| 国产欧美日韩精品一区| 国产精品卡一卡二| 一区二区不卡在线播放| 婷婷国产在线综合| 久久电影网站中文字幕| 国产 日韩 欧美大片| 99国产麻豆精品| 欧美日韩一区三区| 欧美精品一区在线观看| 欧美国产成人精品| 亚洲主播在线播放| 青娱乐精品视频| 国产成人精品免费看| av成人动漫在线观看| 欧美日韩国产成人在线免费| 日韩欧美一区在线| 国产精品污污网站在线观看| 亚洲黄网站在线观看| 久久精品国产网站| 不卡在线视频中文字幕| 欧美日韩一区二区三区视频| 精品免费国产一区二区三区四区| 中文字幕中文字幕一区| 日韩高清一级片| 不卡影院免费观看| 欧美美女一区二区在线观看| 国产日韩欧美亚洲| 亚洲妇女屁股眼交7| 国产精品亚洲午夜一区二区三区| 在线视频中文字幕一区二区| 精品国产电影一区二区| 亚洲黄色免费网站| 丁香婷婷综合色啪| 欧美高清激情brazzers| 国产精品美日韩| 久久99国产精品久久| 在线一区二区视频| 国产蜜臀97一区二区三区| 日本成人超碰在线观看| 91日韩在线专区| 久久人人爽爽爽人久久久| 亚洲成人tv网| 91在线无精精品入口| 久久久亚洲精华液精华液精华液| 亚洲影院免费观看| heyzo一本久久综合| 精品国产成人系列| 日产欧产美韩系列久久99| 91小视频在线观看| 国产精品的网站| 国产精品资源在线看| 日韩一区二区三区视频| 亚洲国产精品久久人人爱蜜臀| 成人动漫视频在线| 久久精品亚洲一区二区三区浴池| 日本不卡123| 7777精品伊人久久久大香线蕉完整版 | 日韩视频一区在线观看| 亚洲一区二区五区| 色94色欧美sute亚洲13| 国产精品第13页| 高清免费成人av| 久久久亚洲国产美女国产盗摄 | 亚洲国产成人av网| 日韩精品一区二区三区在线| 亚洲777理论| 欧美在线视频你懂得| 一区二区三区国产精品| 91蜜桃传媒精品久久久一区二区| 国产精品国产三级国产普通话99| 国产成人精品三级| 欧美韩日一区二区三区四区| 国产精品中文有码|