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

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

?? tramousewnd.cpp

?? 這是一個ce5.0下usb hid的驅動源代碼
?? 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	   "..\..\..\..\..\..\..\touch\trnscrbr\pegc_def.h"
#include    "tchddi.h"

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

// Local and external functions
HWND	FindForegroundFocusWindow(HWND hForegroundWnd);
LRESULT CALLBACK MouseStubWndProc (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 MouseWindowThread(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) MouseStubWndProc;
   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 MouseStubWndProc (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;
         return TRUE;
         
      case WM_STUB_UNREGISTWND:
         if(_hClientWnd == (HWND)wParam)
            _hClientWnd = NULL;
         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一区二区三区免费野_久草精品视频
国产成人在线观看免费网站| 一卡二卡三卡日韩欧美| 精彩视频一区二区三区| 欧美成人一区二区三区 | 亚洲女人****多毛耸耸8| 99re成人在线| 五月婷婷综合激情| 欧美一二三四在线| 国产乱淫av一区二区三区 | 久久久美女毛片| 成人性视频免费网站| 成人黄色在线视频| 欧美亚洲日本一区| 国产精品网曝门| 日韩欧美国产一区在线观看| 欧美撒尿777hd撒尿| av在线播放成人| 国产另类ts人妖一区二区| 日本三级亚洲精品| 亚洲一级电影视频| 亚洲免费电影在线| 中文字幕的久久| 2023国产一二三区日本精品2022| 欧美女孩性生活视频| 91免费观看在线| 成人高清免费观看| 国产成人免费视频网站高清观看视频| 精品一区二区三区久久久| 日韩主播视频在线| 亚洲成年人网站在线观看| 一区二区三区国产精华| 亚洲欧美国产77777| 中文字幕一区二区三区四区| 久久久久久久久久久久久夜| 欧美成人伊人久久综合网| 欧美一二三区在线| 欧美一区二区免费视频| 欧美精品自拍偷拍动漫精品| 欧美日韩一区久久| 欧美精品v国产精品v日韩精品| 欧美三级欧美一级| 欧美视频你懂的| 欧美日韩国产影片| 7777精品伊人久久久大香线蕉| 欧美精品在线观看一区二区| 欧美另类一区二区三区| 欧美人狂配大交3d怪物一区| 欧美精品第1页| 日韩午夜激情电影| 久久综合狠狠综合久久综合88| 久久先锋资源网| 国产精品萝li| 亚洲综合视频网| 日韩电影在线免费观看| 美女网站色91| 国产精品亚洲一区二区三区在线| 国产精品一二三四区| 国产aⅴ综合色| 成人av网站免费观看| 成人三级在线视频| 波多野结衣中文字幕一区二区三区| 日本特黄久久久高潮| 日韩av电影免费观看高清完整版 | 美脚の诱脚舐め脚责91| 美腿丝袜亚洲三区| 国模少妇一区二区三区| 久久成人久久爱| 成人黄色小视频在线观看| 成人av免费在线观看| 色激情天天射综合网| 欧美三级电影在线看| 欧美一区日本一区韩国一区| 精品日韩一区二区| 久久久影视传媒| 欧美激情在线免费观看| 亚洲精品v日韩精品| 亚洲资源中文字幕| 日本特黄久久久高潮| 美女www一区二区| 国产电影一区二区三区| 成人免费看片app下载| 91在线视频网址| 欧美日韩免费一区二区三区| 在线不卡中文字幕播放| 欧美mv日韩mv国产网站app| 日本一区二区免费在线观看视频| 中文字幕日本不卡| 天堂资源在线中文精品| 国产乱码精品1区2区3区| 成人性视频免费网站| 91精品欧美久久久久久动漫| 国产日韩欧美激情| 一区二区三区四区在线免费观看| 日韩av不卡在线观看| 丁香婷婷深情五月亚洲| 欧美亚洲国产一区二区三区va | 4438x成人网最大色成网站| 日韩欧美亚洲国产另类| 欧美国产综合一区二区| 亚洲一区二区av在线| 激情欧美一区二区三区在线观看| 欧洲精品视频在线观看| 精品黑人一区二区三区久久| 亚洲欧洲av色图| 麻豆精品视频在线观看免费| 成人精品视频一区| 91 com成人网| 中文字幕一区二区5566日韩| 首页国产丝袜综合| 91丨porny丨首页| 亚洲精品在线观看视频| 亚洲国产色一区| 国产精品99久久久久久久女警 | 久久久久9999亚洲精品| 亚洲综合成人在线视频| 国产高清在线精品| 欧美视频日韩视频在线观看| 91精品国产综合久久国产大片| 中文字幕一区二区三区视频| 狠狠色综合色综合网络| 欧美私模裸体表演在线观看| 中文一区一区三区高中清不卡| 视频一区在线播放| 色综合久久久久久久久久久| 精品欧美一区二区三区精品久久 | 欧美一区在线视频| 亚洲视频狠狠干| 国产毛片精品国产一区二区三区| 欧美日韩激情一区二区三区| 自拍偷拍国产精品| 成人免费毛片aaaaa**| 精品久久久久久久久久久久久久久 | 91老师国产黑色丝袜在线| 国产亚洲人成网站| 久久99精品一区二区三区| 777亚洲妇女| 亚洲二区在线视频| 日本精品免费观看高清观看| 国产精品久久久久桃色tv| 国产乱子伦视频一区二区三区| 日韩一区二区三区在线| 一二三四区精品视频| 国产大陆a不卡| 欧美精品一区二区三区在线播放| 奇米精品一区二区三区在线观看 | 国内精品不卡在线| 日韩免费高清视频| 麻豆久久一区二区| 欧美一区二区三区四区五区| 午夜精品福利一区二区蜜股av| 欧美午夜精品久久久久久孕妇| 亚洲精品免费在线观看| 成人一道本在线| 欧美草草影院在线视频| 久久精品久久精品| 精品国产一区二区三区av性色 | 亚洲18影院在线观看| 欧美视频一二三区| 日本中文字幕不卡| 日韩午夜在线播放| 亚洲午夜一区二区三区| 欧美性视频一区二区三区| 亚洲国产视频在线| 制服丝袜在线91| 美女一区二区久久| 精品国产1区2区3区| 国产激情视频一区二区在线观看| 国产精品午夜春色av| 国产成人av网站| 一个色妞综合视频在线观看| 欧美高清视频一二三区 | 中文字幕制服丝袜成人av | 欧美日韩中文字幕一区| 首页综合国产亚洲丝袜| 91精品国产综合久久蜜臀| 久久99蜜桃精品| 欧美变态tickling挠脚心| 乱中年女人伦av一区二区| 欧美国产日韩一二三区| 91在线免费看| 亚洲日本在线天堂| 欧美精品第1页| 国产高清精品网站| 尤物av一区二区| 色天天综合久久久久综合片| 日韩精品一二三区| 久久久久国色av免费看影院| www.日韩精品| 夜夜嗨av一区二区三区中文字幕| 在线播放欧美女士性生活| 久久99精品久久久久久国产越南| 国产精品久久久久婷婷二区次| 色88888久久久久久影院野外| 午夜成人免费电影| 国产免费成人在线视频| 欧美色图激情小说| 国产精品123| 亚洲乱码日产精品bd| 精品国产91洋老外米糕| 欧美亚洲一区三区|