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

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

?? tchwnd.cpp

?? windows ce 下的觸控屏驅動程序源代碼
?? 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在线| 亚洲丝袜美腿综合| 一区二区免费看| 亚洲午夜影视影院在线观看| 亚洲国产精品一区二区久久| 亚洲国产美女搞黄色| 婷婷综合在线观看| 久久99国产精品尤物| 激情六月婷婷综合| 成人激情开心网| av综合在线播放| 欧美最新大片在线看| 欧美老人xxxx18| 精品福利视频一区二区三区| 国产午夜亚洲精品午夜鲁丝片| 国产精品丝袜黑色高跟| 一区二区三区四区不卡视频| 亚洲成人动漫在线免费观看| 日本成人在线看| 在线免费观看日本欧美| 色婷婷综合久色| 欧美日韩免费观看一区二区三区| 欧美日韩aaaaa| 国产亚洲综合色| 一区二区三区四区不卡视频| 久久精品免费看| 91丨九色丨尤物| 欧美一区二区三区爱爱| 国产精品久久国产精麻豆99网站| 亚洲国产精品一区二区www在线| 久久99国产精品成人| 成人av在线播放网址| 在线播放中文一区| 中文字幕欧美激情| 日本在线不卡视频一二三区| 国产成人精品三级| 欧美男女性生活在线直播观看| wwwwxxxxx欧美| 洋洋成人永久网站入口| 国产在线精品国自产拍免费| 欧美日韩亚洲不卡| 亚洲国产精品99久久久久久久久 | 亚洲成a人片综合在线| 欧美a级理论片| 色欧美日韩亚洲| 久久久99免费| 青青草成人在线观看| 91久久国产综合久久| 欧美激情艳妇裸体舞| 美女性感视频久久| 欧美日韩亚洲丝袜制服| 亚洲女同ⅹxx女同tv| 国产69精品一区二区亚洲孕妇| 666欧美在线视频| 亚洲一区二区精品久久av| 成人性生交大片免费看中文网站| 日韩午夜av电影| 亚洲.国产.中文慕字在线| 色悠悠亚洲一区二区| 三级不卡在线观看| 色视频一区二区| 国产精品久久毛片a| 国产高清不卡一区二区| 精品国产一区二区亚洲人成毛片| 日韩和欧美的一区| 欧美伦理视频网站| 天堂精品中文字幕在线| 91福利精品视频| 悠悠色在线精品| 91免费看`日韩一区二区| 国产精品久久毛片a| 豆国产96在线|亚洲| 国产女人18毛片水真多成人如厕 | 精品国产乱码久久久久久闺蜜| 亚洲成人av一区| 欧美日韩高清一区二区三区| 亚洲色图欧美在线| 91高清在线观看| 婷婷中文字幕综合| 日韩午夜三级在线| 久久av老司机精品网站导航| 久久品道一品道久久精品| 国产一区二区美女| 国产精品萝li| 色88888久久久久久影院野外| 一级做a爱片久久| 欧美日韩高清一区二区不卡| 蜜桃av一区二区三区电影| 日韩免费看网站| 国产激情视频一区二区三区欧美| 国产视频视频一区| 99久久国产综合精品色伊| 亚洲图片欧美一区| 日韩免费性生活视频播放| 国产成人免费在线观看| 亚洲美女淫视频| 日韩亚洲欧美一区| 国产酒店精品激情| 中文字幕在线视频一区| 欧美女孩性生活视频| 国产一区二区91| 一区二区三区欧美在线观看| 日韩亚洲欧美在线观看| 大白屁股一区二区视频| 一区二区欧美在线观看| 精品成人佐山爱一区二区| 成人免费毛片aaaaa**| 亚洲国产精品久久久久秋霞影院| 日韩一级完整毛片| 不卡的电影网站| 美女一区二区三区| 亚洲免费av观看| 久久精品一区二区三区不卡牛牛| 91亚洲精品久久久蜜桃网站 | 精品国产免费久久| 色综合一区二区| 久久er精品视频| 亚洲午夜久久久久中文字幕久| 久久久国产精品麻豆| 在线观看国产91| 国产99久久久精品| 青青草国产精品亚洲专区无| 国产精品福利一区| 久久蜜桃香蕉精品一区二区三区| 欧美色爱综合网| 北条麻妃一区二区三区| 久久99精品久久久久久| 丝袜美腿高跟呻吟高潮一区| 国产精品久久久久久久第一福利 | 欧美国产一区二区在线观看| 中文成人综合网| 欧美日韩黄视频| 91啦中文在线观看| 9l国产精品久久久久麻豆| 国产xxx精品视频大全| 另类欧美日韩国产在线| 午夜视频在线观看一区| 一区二区三区久久| 国产精品久久一卡二卡| 国产喂奶挤奶一区二区三区| 欧美大片在线观看| 欧美电影在哪看比较好| 欧美日韩亚洲综合一区| 欧美亚洲愉拍一区二区| 日本高清免费不卡视频| 91在线一区二区三区| 99re视频精品| 91原创在线视频| 一本色道久久综合精品竹菊| 99久免费精品视频在线观看| 不卡一二三区首页| 91性感美女视频| 91美女在线视频| 日本道色综合久久| 欧美艳星brazzers| 欧美二区乱c少妇| 欧美电影免费观看高清完整版| 在线不卡的av| 欧美电影免费提供在线观看| 2022国产精品视频| 国产欧美综合在线| **欧美大码日韩| 亚洲一区二区3| 免费视频最近日韩| 国产精品1区2区| 成人app在线观看| 91猫先生在线| 7777精品伊人久久久大香线蕉最新版| 91精品一区二区三区久久久久久| 欧美一级片免费看| 亚洲国产精品精华液2区45| 亚洲乱码中文字幕| 粉嫩久久99精品久久久久久夜| 成人av网站在线| 欧美日韩三级一区| 欧美成人免费网站| 国产精品国产馆在线真实露脸| 亚洲一区二区免费视频| 国内精品久久久久影院一蜜桃| 成人午夜电影久久影院| 欧美喷水一区二区| 国产女人18水真多18精品一级做| 亚洲激情欧美激情| 久久精品国产一区二区| 97精品电影院| 日韩女优电影在线观看| 成人欧美一区二区三区视频网页| 亚洲午夜免费电影| 成人永久免费视频| 91麻豆精品国产91久久久久久久久| 国产欧美精品一区aⅴ影院| 亚洲伊人伊色伊影伊综合网| 国产精品一区二区在线观看网站 |