织梦CMS - 轻松建站从此开始!

罗索

Windows Mobile 触摸屏(Touch Panel)截获(pwinuser.h)

落鹤生 发布于 2010-07-11 16:08 点击:次 
看看微软pwinuser.h的头文件吧,里面有hook的API.
TAG:

看看微软pwinuser.h的头文件吧,里面有hook的API.

 

  1. #ifndef _PRIV_WINUSER_ 
  2. #define _PRIV_WINUSER_ 
  3.  
  4. #ifdef __cplusplus 
  5. extern "C"  { 
  6. #endif 
  7.  
  8. #include <keybd.h> 
  9.  
  10. // Non-Standard CE internal messages. 
  11. #define WM_QM_ACTIVATE        0x60 
  12. #define WM_HOOK_DO_CALLBACK    0x61 
  13. #define WM_SYSCOPYDATA        0x62 
  14.  
  15. // wparam values for WM_SYSCOPYDATA 
  16. #define WMSCD_CHAR_RANKED_ALTS    0x01 
  17. #define WMSCD_DIALOGSCROLLBAR    0x02   
  18.  
  19. /* 
  20.  * Extended Window Styles 
  21.  */ 
  22. #if(WINVER >= 0x0400) 
  23.  
  24. #endif /* WINVER >= 0x0400 */ 
  25.  
  26. // Marker for end of accelerator tables. 
  27. #define FLASTKEY  0x80 
  28.  
  29. // SetWindowPos internal flags 
  30. #define SWP_SYSTEMCAPTURE            0x80000000 
  31. #define SWP_FINDNEWFOREGROUND        0x40000000 
  32. #define SWP_MAXMIN                    0x20000000 
  33.  
  34. // Internal values for hwnd for use in broadcasting messages 
  35. // Must be odd numbered. 
  36. #define HWND_TOPLEVELVISIBLEORPRE30        ((HWND)0xfffd)    // top level windows that are visible on screen or ver < 3.0 
  37. #define HWND_TOPLEVELCHILD                ((HWND)0xfffb)    // top level windows with the WS_CHILD bit set 
  38.  
  39. /* 
  40.  * Predefined Clipboard Formats 
  41.  */ 
  42. #define CF_METAFILEPICT     3 
  43. #define CF_ENHMETAFILE      14 
  44. #define CF_HDROP            15 
  45. #define IMAGE_ENHMETAFILE   3 
  46.  
  47. void WINAPI SystemIdleTimerReset( void ); 
  48.  
  49. HWND WINAPI SetKeyboardTarget( HWND hWnd ); 
  50. HWND WINAPI GetKeyboardTarget( VOID ); 
  51. KEY_STATE_FLAGS WINAPI GetAsyncShiftFlags(UINT VKey); 
  52. WINUSERAPI void WINAPI AccessibilitySoundSentryEvent(void); 
  53. BOOL WINAPI ImmEnableIME(DWORD); 
  54. HKL WINAPI ImmGetKeyboardLayout(DWORD dwThreadId); 
  55.  
  56. /* 
  57.  * ImmAssociateValueWithGwesMessageQueue flags 
  58.  * 
  59.  * These is not hard & fast rule for the #s given below - just 
  60.  * that they are ordered in pairs of get/set operations 
  61.  */ 
  62. #define IMM_GETTHREADHKL                        1 
  63. #define IMM_SETTHREADHKL                        2 
  64. #define IMM_GETTHREADPREVHKL                    3 
  65. #define IMM_SETTHREADPREVHKL                    4 
  66.  
  67. #define IMM_SETPROCESSHKL                        6 
  68.  
  69. #define IMM_SET_THREAD_IME_DEFAULT_HWND              8 
  70. #define IMM_GET_LAYMGR_STATUS                                    9 
  71.  
  72.   
  73.  
  74. void AudioUpdateFromRegistry(void); 
  75.  
  76. /* Values for NotifyWinUserSystem */ 
  77. #define NWUS_DOUBLE_TAP_CHANGED    1 
  78. #define NWUS_KEYBD_REPEAT_CHANGED 2 
  79. #define NWUS_MAX_IDLE_TIME_CHANGED 3 
  80.  
  81. #define SPI_SETNOSEHFORVALIDATION    250 
  82.  
  83. #define MOD_KEYUP_ALWAYS 0x2000 
  84.  
  85. typedef struct tagPLATFORMVERSION { 
  86.     DWORD dwMajor; 
  87.     DWORD dwMinor; 
  88. } PLATFORMVERSION, *PPLATFORMVERSION; 
  89.  
  90.  
  91. #define SPI_PROJECT1    224 
  92. #define SPI_PROJECT2    225 
  93. #define SPI_PROJECT3    226 
  94. #define SPI_PROJECT4    227 
  95. #define SPI_PROJECT5    228 
  96. #define SPI_PROJECT6    229 
  97. #define SPI_PROJECT7    230 
  98. #define SPI_PROJECT8    231 
  99. #define SPI_PROJECT9    232 
  100. #define SPI_PROJECT10    233 
  101. #define SPI_PROJECT11    234 
  102. #define SPI_PROJECT12    235 
  103. #define SPI_PROJECT13    236 
  104. #define SPI_PROJECT14    237 
  105. #define SPI_PROJECT15    238 
  106. #define SPI_PROJECT16    239 
  107.  
  108. #define SPI_GETPLATFORMVERSION        SPI_PROJECT1    
  109.  
  110. #define VK_APP_LAUNCH1    0xC1 
  111. #define VK_APP_LAUNCH2    0xC2 
  112. #define VK_APP_LAUNCH3    0xC3 
  113. #define VK_APP_LAUNCH4    0xC4 
  114. #define VK_APP_LAUNCH5    0xC5 
  115. #define VK_APP_LAUNCH6    0xC6 
  116. #define VK_APP_LAUNCH7    0xC7 
  117. #define VK_APP_LAUNCH8    0xC8 
  118. #define VK_APP_LAUNCH9    0xC9 
  119. #define VK_APP_LAUNCH10    0xCA 
  120. #define VK_APP_LAUNCH11    0xCB 
  121. #define VK_APP_LAUNCH12    0xCC 
  122. #define VK_APP_LAUNCH13    0xCD 
  123. #define VK_APP_LAUNCH14    0xCE 
  124. #define VK_APP_LAUNCH15    0xCF 
  125.  
  126.   
  127.  
  128.  
  129. void WINAPI NotifyWinUserSystem( UINT    uEvent ); 
  130.  
  131. BOOL WINAPI RegisterTaskBar (HWND hwndTaskbar); 
  132. BOOL WINAPI RegisterTaskBarEx (HWND hwndTaskbar, BOOL bTaskBarOnTop); 
  133. BOOL WINAPI RegisterDesktop (HWND hwndDesktop); 
  134.  
  135. WINUSERAPI BOOL WINAPI RectangleAnimation ( HWND hWnd, LPCRECT prc, BOOL fMaximize ) ; 
  136. void WINAPI ShellModalEnd( void ); 
  137.  
  138. //#define ExitWindows(dwReserved, Code) ExitWindowsEx(EWX_LOGOFF, 0xFFFFFFFF) 
  139. //WINUSERAPI BOOL WINAPI ExitWindowsEx( UINT uFlags,DWORD dwReserved); 
  140. void GwesPowerOffSystem (void); 
  141. BOOL GwesPowerDown (void); 
  142. void GwesPowerUp (BOOL); 
  143.  
  144. void WINAPI BatteryGetLifeTimeInfo ( LPSYSTEMTIME pstLastChange, DWORD * pcmsCpuUsage, DWORD * pcmsPreviousCpuUsage ); 
  145. LONG WINAPI BatteryDrvrGetLevels ( void ); 
  146. BOOL WINAPI BatteryDrvrSupportsChangeNotification ( void ); 
  147. void WINAPI BatteryNotifyOfTimeChange ( BOOL fForward, FILETIME * pftDelta ); 
  148.  
  149. // A system class built in to GWE for use by everyone 
  150. #define CS_SYSTEMCLASS 0x80000000 
  151.  
  152. /* flags for DrawFrameControl */ 
  153. //#define DFC_CAPTION             1 
  154. #define DFC_MENU                2 
  155. //#define DFC_SCROLL              3 
  156. //#define DFC_BUTTON              4 
  157. #define DFC_SPINNER             6 
  158.  
  159. //#define DFCS_CAPTIONCLOSE       0x0000 
  160. //#define DFCS_CAPTIONMIN         0x0001 
  161. //#define DFCS_CAPTIONMAX         0x0002 
  162. //#define DFCS_CAPTIONRESTORE     0x0003 
  163. //#define DFCS_CAPTIONHELP        0x0004 
  164. //#define DFCS_CAPTIONOKBTN      0x0080 
  165. #define DFCS_CAPTIONROUNDOKBTN_WINCE    0x0010 
  166. #define DFCS_CAPTIONROUNDCLOSE_WINCE    0x0020 
  167. #define DFCS_CAPTIONALL_WINCE           0x00F0 
  168.  
  169. #define DFCS_MENUARROW          0x0000 
  170. #define DFCS_MENUCHECK          0x0001 
  171. #define DFCS_MENUBULLET         0x0002 
  172. #define DFCS_MENUARROWRIGHT     0x0004 
  173.  
  174. //#define DFCS_SCROLLUP           0x0000 
  175. //#define DFCS_SCROLLDOWN         0x0001 
  176. //#define DFCS_SCROLLLEFT         0x0002 
  177. //#define DFCS_SCROLLRIGHT        0x0003 
  178. //#define DFCS_SCROLLCOMBOBOX     0x0005 
  179. #define DFCS_SCROLLSIZEGRIP     0x0008 
  180. #define DFCS_SCROLLSIZEGRIPRIGHT 0x0010 
  181.  
  182. //#define DFCS_BUTTONCHECK        0x0000 
  183. #define DFCS_BUTTONRADIOIMAGE   0x0001 
  184. #define DFCS_BUTTONRADIOMASK    0x0002 
  185. //#define DFCS_BUTTONRADIO        0x0004 
  186. //#define DFCS_BUTTON3STATE       0x0008 
  187. //#define DFCS_BUTTONPUSH         0x0010 
  188.  
  189. #define DFCS_SPINNERUP           0x0000 
  190. #define DFCS_SPINNERDOWN         0x0001 
  191. #define DFCS_SPINNERLEFT         0x0002 
  192. #define DFCS_SPINNERRIGHT        0x0003 
  193. #define DFCS_SPINNERBUTTON       0x0010 
  194. #define DFCS_SPINNERNOBORDER     0x0020 
  195.  
  196. //#define DFCS_INACTIVE           0x0100 
  197. //#define DFCS_PUSHED             0x0200 
  198. //#define DFCS_CHECKED            0x0400 
  199. #define DFCS_ADJUSTRECT         0x2000 
  200. #define DFCS_FLAT               0x4000 
  201. #define DFCS_MONO               0x8000 
  202.  
  203. #define MFT_NONOWNERSTRING      0x80000000L 
  204.  
  205. //WINUSERAPI BOOL    WINAPI DrawFrameControl(HDC, LPRECT, UINT, UINT); 
  206.  
  207. // NC messages 
  208. #define WM_NCCREATE                     0x0081 
  209. #define WM_NCDESTROY                    0x0082 
  210. #define WM_NCCALCSIZE                   0x0083 
  211. #define WM_NCHITTEST                    0x0084 
  212. #define WM_NCPAINT                      0x0085 
  213. #define WM_NCACTIVATE                   0x0086 
  214.  
  215. #define WM_NCMOUSEFIRST                 0x00A0 
  216. #define WM_NCMOUSEMOVE                  0x00A0 
  217. #define WM_NCLBUTTONDOWN                0x00A1 
  218. #define WM_NCLBUTTONUP                  0x00A2 
  219. #define WM_NCLBUTTONDBLCLK              0x00A3 
  220. #define WM_NCRBUTTONDOWN                0x00A4 
  221. #define WM_NCRBUTTONUP                  0x00A5 
  222. #define WM_NCRBUTTONDBLCLK              0x00A6 
  223. #define WM_NCMBUTTONDOWN                0x00A7 
  224. #define WM_NCMBUTTONUP                  0x00A8 
  225. #define WM_NCMBUTTONDBLCLK              0x00A9 
  226.  
  227.  
  228. #define WM_NCXBUTTONDOWN                0x00AB 
  229. #define WM_NCXBUTTONUP                  0x00AC 
  230. #define WM_NCXBUTTONDBLCLK              0x00AD 
  231. #define WM_NCMOUSELAST                  0x00AD 
  232.  
  233. #ifdef FAREAST 
  234. /* Class style for IME UI window */ 
  235. #define CS_IME      0x00010000 
  236. #endif // FAREAST 
  237.  
  238. #ifdef _WIN32_WCE_EMULATION 
  239. #ifdef CS_IME 
  240. #undef CS_IME 
  241. #endif 
  242. #define CS_IME      0x00010000 
  243. #endif 
  244.  
  245. /* For internal APIs "exposed" to other internal pieces. */ 
  246. #ifdef __cplusplus 
  247.     #define EXTERN_C    extern "C" 
  248. #else 
  249.     #define EXTERN_C    extern 
  250. #endif /*__cplusplus*/ 
  251. #define INTAPI  EXTERN_C LONG __stdcall 
  252. #define INTAPI_(type) EXTERN_C type __stdcall 
  253.  
  254. BOOL KeybdGetDeviceInfo( INT iIndex, LPVOID  lpOutput ); 
  255. BOOL KeybdInitStates( KEY_STATE KeyState, void  *pKeybdDriverState ); 
  256.  
  257. UINT32 KeybdVKeyToUnicode( 
  258.     UINT32          VKey, 
  259.     KEY_STATE_FLAGS KeyEventFlags, 
  260.     KEY_STATE       KeyState, 
  261.     void            *KeybdDriverState, 
  262.     UINT32          cBufferSize, 
  263.     UINT32          *pcCharacters, 
  264.     KEY_STATE_FLAGS *pShiftStateBuffer, 
  265.     UINT32          *pCharacterBuffer 
  266.     ); 
  267.  
  268.  
  269. // Maximum # of slots available in preload reg key. 
  270. #define MAX_HKL_PRELOAD_COUNT 15 
  271.  
  272.  
  273. #define WH_JOURNALRECORD    0 
  274. #define WH_JOURNALPLAYBACK  1 
  275. #define WH_KEYBOARD_LL      20 
  276.  
  277.  
  278. /* 
  279.  * Hook Codes 
  280.  */ 
  281. #define HC_ACTION           0 
  282. #define HC_GETNEXT          1 
  283. #define HC_SKIP             2 
  284. #define HC_NOREMOVE         3 
  285. #define HC_NOREM            HC_NOREMOVE 
  286. #define HC_SYSMODALON       4 
  287. #define HC_SYSMODALOFF      5 
  288.  
  289. typedef LRESULT (CALLBACK* HOOKPROC)(int code, WPARAM wParam, LPARAM lParam); 
  290.  
  291. /* 
  292.  * Message Structure used in Journaling 
  293.  */ 
  294. typedef struct tagEVENTMSG { 
  295.     UINT    message; 
  296.     UINT    paramL; 
  297.     UINT    paramH; 
  298.     DWORD    time; 
  299.     HWND    hwnd; 
  300. } EVENTMSG, *PEVENTMSGMSG, NEAR *NPEVENTMSGMSG, FAR *LPEVENTMSGMSG; 
  301.  
  302. typedef struct tagEVENTMSG *PEVENTMSG, NEAR *NPEVENTMSG, FAR *LPEVENTMSG; 
  303.  
  304.  
  305. HHOOK 
  306. WINAPI 
  307. QASetWindowsJournalHook( 
  308.     int         nFilterType, 
  309.     HOOKPROC    pfnFilterProc, 
  310.     EVENTMSG    *pfnEventMsg 
  311.     ); 
  312.  
  313.  
  314. BOOL 
  315. WINAPI 
  316. QAUnhookWindowsJournalHook( 
  317.     int            nFilterType 
  318.     ); 
  319.  
  320.  
  321. BOOL 
  322. WINAPI 
  323. GetMessageWNoWait( 
  324.     PMSG    pMsg, 
  325.     HWND    hWnd, 
  326.     UINT    wMsgFilterMin, 
  327.     UINT    wMsgFilterMax 
  328.     ); 
  329.  
  330. BOOL 
  331. WINAPI 
  332. TouchCalibrate( 
  333.     void 
  334.     ); 
  335.  
  336. int 
  337. WINAPI 
  338. DisableCaretSystemWide( 
  339.     void 
  340.     ); 
  341.  
  342.  
  343. int 
  344. WINAPI 
  345. EnableCaretSystemWide( 
  346.     void 
  347.     ); 
  348.  
  349.  
  350. BOOL 
  351. WINAPI 
  352. EnableHardwareKeyboard( 
  353.     BOOL fEnable 
  354.     ); 
  355.  
  356. BOOL RegisterSIPanel (HWND hwndSIPanel); 
  357.  
  358.  
  359. void WINAPI SetAssociatedMenu ( 
  360.     HWND hwnd, 
  361.     HMENU hmenu 
  362.     ); 
  363.  
  364. HMENU WINAPI GetAssociatedMenu ( 
  365.     HWND hwnd 
  366.     ); 
  367.  
  368.  
  369. BOOL 
  370. WINAPI 
  371. UnregisterFunc1( 
  372.     UINT    fsModifiers, 
  373.     UINT    vk 
  374.     ); 
  375.  
  376.   
  377.  
  378.   
  379.  
  380.   
  381.  
  382. typedef struct tagKBDLLHOOKSTRUCT { 
  383.     DWORD vkCode;        // virtual key code 
  384.     DWORD scanCode;        // scan code    DWORD flags;       // flags 
  385.     DWORD flags;        // unused 
  386.     DWORD time;            // time stamp for this message 
  387.     DWORD dwExtraInfo;    // extra info from the driver or keybd_event 
  388. } KBDLLHOOKSTRUCT, *PKBDLLHOOKSTRUCT; 
  389.  
  390. HHOOK 
  391. WINAPI 
  392. SetWindowsHookExW( 
  393.     int idHook, 
  394.     HOOKPROC lpfn, 
  395.     HINSTANCE hmod, 
  396.     DWORD dwThreadId); 
  397. #define SetWindowsHookEx  SetWindowsHookExW 
  398.  
  399.  
  400. BOOL 
  401. WINAPI 
  402. UnhookWindowsHookEx( 
  403.     HHOOK hhk); 
  404.  
  405. LRESULT 
  406. WINAPI 
  407. CallNextHookEx( 
  408.     HHOOK hhk, 
  409.     int nCode, 
  410.     WPARAM wParam, 
  411.     LPARAM lParam); 
  412.  
  413. typedef struct tagGetForegroundInfo 
  414.     { 
  415.     HWND    hwndActive; 
  416.     HWND    hwndFocus; 
  417.     HWND    hwndMenu; 
  418.     HWND    hwndKeyboardDest; 
  419.     DWORD    fdwConversion; 
  420.     DWORD    fdwSentence; 
  421.     BOOL    fOpen; 
  422.     DWORD    dwCompStrLen; 
  423.     HKL        KeyboardLayoutHandle; 
  424.     } GET_FOREGROUND_INFO; 
  425.  
  426. BOOL 
  427. WINAPI 
  428. GetForegroundInfo( 
  429.     GET_FOREGROUND_INFO    *pgfi 
  430.     ); 
  431.  
  432. HWND GetForegroundKeyboardTarget( 
  433.     void 
  434.     ); 
  435.  
  436. HKL 
  437. GetForegroundKeyboardLayoutHandle( 
  438.     void 
  439.     ); 
  440.  
  441.  
  442. BOOL 
  443. WINAPI 
  444. ImmGetConversionStatusForeground( 
  445.     DWORD    *pfdwConversion, 
  446.     DWORD    *pfdwSentence 
  447.     ); 
  448.  
  449. BOOL 
  450. ShowStartupWindow( 
  451.     void 
  452.     ); 
  453.  
  454. //    This is taken directly from pbt.h.  Not all values are used or supported. 
  455.  
  456. #ifndef WM_POWERBROADCAST 
  457. #define WM_POWERBROADCAST               0x218 
  458. #endif 
  459.  
  460. #define PBT_APMQUERYSUSPEND             0x0000 
  461. #define PBT_APMQUERYSTANDBY             0x0001 
  462.  
  463. #define PBT_APMQUERYSUSPENDFAILED       0x0002 
  464. #define PBT_APMQUERYSTANDBYFAILED       0x0003 
  465.  
  466. #define PBT_APMSUSPEND                  0x0004 
  467. #define PBT_APMSTANDBY                  0x0005 
  468.  
  469. #define PBT_APMRESUMECRITICAL           0x0006 
  470. #define PBT_APMRESUMESUSPEND            0x0007 
  471. #define PBT_APMRESUMESTANDBY            0x0008 
  472.  
  473. #define PBTF_APMRESUMEFROMFAILURE       0x00000001 
  474.  
  475. #define PBT_APMBATTERYLOW               0x0009 
  476. #define PBT_APMPOWERSTATUSCHANGE        0x000A 
  477.  
  478. #define PBT_APMOEMEVENT                 0x000B 
  479.  
  480. #define PBT_APMUSERIDLE                 0x000C 
  481. #define PBT_APMUSERACTIVE               0x000D 
  482.  
  483.  
  484. // @CESYSGEN IF GWES_WINMGR 
  485.  
  486. // Notifications sent by GWES to the shell 
  487.  
  488. // Codes used in WM_SHELLNOTIFY 
  489. #define SHELLNOTIFY_WINDOWCREATED        0x0006 
  490. #define SHELLNOTIFY_WINDOWDESTROYED      0x0007 
  491. #define SHELLNOTIFY_WINDOWACTIVATED      0x0008 
  492. #define SHELLNOTIFY_REDRAW               0x0009 
  493. #define SHELLNOTIFY_LANGUAGE             0x000A 
  494. #define SHELLNOTIFY_CAPSLOCK             0x000B 
  495. #define SHELLNOTIFY_RESERVED0x000C       0x000C 
  496. #define SHELLNOTIFY_RESERVED0x000D       0x000D 
  497.  
  498. // @CESYSGEN ENDIF 
  499.  
  500. #ifdef __cplusplus 
  501. #endif /*__cplusplus*/ 
  502.  
  503. #endif /* _PRIV_WINUSER_ */ 

 

(jinhaijian)
本站文章除注明转载外,均为本站原创或编译欢迎任何形式的转载,但请务必注明出处,尊重他人劳动,同学习共成长。转载请注明:文章转载自:罗索实验室 [http://www.rosoo.net/a/201007/9808.html]
本文出处:CSDN博客 作者:jinhaijian
顶一下
(0)
0%
踩一下
(2)
100%
------分隔线----------------------------
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 验证码:点击我更换图片
栏目列表
将本文分享到微信
织梦二维码生成器
推荐内容