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

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

?? tchwnd.cpp

?? 觸摸屏驅動源碼
?? 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一区二区三区免费野_久草精品视频
成人高清视频免费观看| 激情欧美一区二区三区在线观看| 成人18视频在线播放| 国产精品免费av| 色悠悠亚洲一区二区| 一区二区激情视频| 欧美一区二区三区视频在线| 美女一区二区三区| 欧美国产精品一区二区三区| 色成年激情久久综合| 日韩精品电影在线观看| 亚洲精品一区在线观看| av中文字幕不卡| 亚洲午夜久久久| 日韩情涩欧美日韩视频| 风间由美一区二区av101| 亚洲人成网站在线| 欧美狂野另类xxxxoooo| 国产精品小仙女| 亚洲一区二区三区在线看| 日韩一区二区麻豆国产| 99视频精品免费视频| 天堂成人免费av电影一区| 久久久久久久久岛国免费| 色噜噜狠狠色综合欧洲selulu| 日本午夜一区二区| 国产人伦精品一区二区| 精品视频一区 二区 三区| 精品影院一区二区久久久| 成人免费在线视频观看| 欧美一区二区视频在线观看| a级高清视频欧美日韩| 麻豆精品视频在线| 日韩一区欧美一区| 国产精品久久夜| 日韩欧美色综合网站| 99久久精品情趣| 韩国中文字幕2020精品| 亚洲一区二区三区四区在线| 亚洲精品一区二区三区蜜桃下载| 色综合天天视频在线观看| 国产一区三区三区| 图片区日韩欧美亚洲| 国产精品美女久久久久久久网站| 日韩一区二区免费视频| 欧美四级电影在线观看| 大胆亚洲人体视频| 狠狠色2019综合网| 日韩高清中文字幕一区| 一个色综合av| 中文字幕一区二区三区蜜月| 精品免费日韩av| 3atv一区二区三区| 欧美视频自拍偷拍| 色综合久久中文综合久久97| 国产91露脸合集magnet| 毛片av中文字幕一区二区| 亚洲国产另类av| 亚洲精品视频自拍| 亚洲天堂久久久久久久| 国产农村妇女毛片精品久久麻豆| 日韩精品一区二区三区在线播放| 欧美疯狂做受xxxx富婆| 欧美三级三级三级| 91久久精品国产91性色tv| 99久久伊人久久99| av一区二区不卡| 成人av免费在线观看| 成人天堂资源www在线| 国产成人精品一区二| 麻豆精品一区二区三区| 精品一区二区三区香蕉蜜桃| 日本欧美大码aⅴ在线播放| 日韩电影在线看| 日韩**一区毛片| 奇米777欧美一区二区| 视频一区欧美日韩| 秋霞av亚洲一区二区三| 蜜桃av噜噜一区| 久久av老司机精品网站导航| 激情欧美一区二区| 国产成人自拍高清视频在线免费播放| 91麻豆国产福利精品| 欧美最猛黑人xxxxx猛交| 欧美日韩一区久久| 日韩一区和二区| 久久综合色播五月| 中文字幕成人av| 一区二区三区中文在线| 同产精品九九九| 久久av资源站| 成人综合婷婷国产精品久久蜜臀 | 国产亚洲精品超碰| 欧美国产一区二区| 亚洲欧洲综合另类| 午夜a成v人精品| 韩国中文字幕2020精品| 国产a视频精品免费观看| 94-欧美-setu| 欧美精品久久一区二区三区| 日韩精品一区二区三区四区视频| 久久久不卡影院| 亚洲欧美日韩在线播放| 无码av中文一区二区三区桃花岛| 久久超碰97中文字幕| 成人国产精品免费网站| 欧美日免费三级在线| 精品免费视频.| 亚洲乱码中文字幕| 久久精品国产**网站演员| 国产成人亚洲综合a∨婷婷 | 久久亚洲捆绑美女| ...av二区三区久久精品| 日日夜夜精品视频天天综合网| 九九精品一区二区| 91在线观看视频| 日韩区在线观看| 亚洲精品老司机| 国产一区二区三区最好精华液| 99国产精品久久久久久久久久| 欧美亚一区二区| 中文字幕欧美区| 日韩国产精品大片| 成人国产免费视频| 日韩精品自拍偷拍| 一区二区三区精密机械公司| 精久久久久久久久久久| 在线观看成人免费视频| 国产欧美日韩视频一区二区| 午夜久久久久久久久久一区二区| 国产精品 日产精品 欧美精品| 欧美视频一区二区三区四区 | 91精品国产91热久久久做人人| 久久久久国产精品人| 午夜精品爽啪视频| 97超碰欧美中文字幕| 精品国产电影一区二区| 亚洲国产精品欧美一二99| 成人免费毛片嘿嘿连载视频| 欧美videos大乳护士334| 亚洲一区二区在线免费看| 成人激情免费视频| 精品美女被调教视频大全网站| 亚洲午夜一二三区视频| 不卡的av中国片| 国产调教视频一区| 激情五月婷婷综合网| 8x福利精品第一导航| 一区二区三区欧美日| av中文字幕亚洲| 中文幕一区二区三区久久蜜桃| 激情久久久久久久久久久久久久久久| 在线观看国产一区二区| 亚洲人精品午夜| 99久久精品免费精品国产| 国产农村妇女毛片精品久久麻豆 | 亚洲精品自拍动漫在线| 成人午夜av在线| 国产欧美一区二区精品忘忧草| 久久成人免费日本黄色| 5566中文字幕一区二区电影| 午夜精品一区二区三区免费视频 | 99亚偷拍自图区亚洲| 欧美激情一二三区| 国产成人丝袜美腿| 久久久亚洲精品石原莉奈| 九色综合狠狠综合久久| 久久―日本道色综合久久| 国内精品视频666| 久久久午夜精品| 国产一区二区三区免费播放 | 精品在线免费视频| 久久久久久麻豆| 国产成人av影院| 国产精品婷婷午夜在线观看| 国产不卡免费视频| 亚洲视频一区二区免费在线观看| 成人激情动漫在线观看| 亚洲猫色日本管| 欧美人伦禁忌dvd放荡欲情| 免费欧美在线视频| 日韩精品在线一区二区| 国产精品一二三四区| 国产精品乱人伦中文| 一本到不卡免费一区二区| 亚洲一区二区3| 日韩色视频在线观看| 国产一区二区网址| 国产精品国产三级国产三级人妇| 色综合久久中文字幕| 日韩精品乱码免费| 久久精品视频网| 色婷婷综合五月| 七七婷婷婷婷精品国产| 国产亚洲欧美一级| 欧美午夜片在线看| 国内精品嫩模私拍在线| 亚洲欧美日韩久久| 日韩写真欧美这视频| 成人高清免费在线播放|