⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pwinuser.h

📁 WINCE5.0 下键盘鼠标钩子源码 注:WINCE6下貌似不能用
💻 H
📖 第 1 页 / 共 2 页
字号:
//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this sample source code is subject to the terms of the Microsoft
// license agreement under which you licensed this sample source code. If
// you did not accept the terms of the license agreement, you are not
// authorized to use this sample source code. For the terms of the license,
// please see the license agreement between you and Microsoft or, if applicable,
// see the LICENSE.RTF on your install media or the root of your tools installation.
// THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES.
//
/*++
THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
PARTICULAR PURPOSE.

Module Name:

ppwinuser.h

Abstract:

Private portion of winuser.h

Notes:


--*/


#ifndef _PRIV_WINUSER_
#define _PRIV_WINUSER_

#ifdef __cplusplus
extern "C"  {
#endif

#include <keybd.h>

// Non-Standard CE internal messages.
#define WM_QM_ACTIVATE          0x60
#define WM_HOOK_DO_CALLBACK     0x61
#define WM_SYSCOPYDATA          0x62


// wparam values for WM_SYSCOPYDATA
#define WMSCD_CHAR_RANKED_ALTS  0x01
#define WMSCD_DIALOGSCROLLBAR   0x02  



/*
 * Extended Window Styles
 */
#if(WINVER >= 0x0400)

#endif /* WINVER >= 0x0400 */

// Marker for end of accelerator tables.
#define FLASTKEY  0x80

// SetWindowPos internal flags
#define SWP_SYSTEMCAPTURE           0x80000000
#define SWP_FINDNEWFOREGROUND       0x40000000
#define SWP_MAXMIN                  0x20000000


// Internal values for hwnd for use in broadcasting messages
// Must be odd numbered.
#define HWND_TOPLEVELVISIBLEORPRE30     ((HWND)0xfffd)    // top level windows that are visible on screen or ver < 3.0
#define HWND_TOPLEVELCHILD              ((HWND)0xfffb)    // top level windows with the WS_CHILD bit set

/*
 * Predefined Clipboard Formats
 */
#define CF_METAFILEPICT     3
#define CF_ENHMETAFILE      14
#define CF_HDROP            15
#define IMAGE_ENHMETAFILE   3

void WINAPI SystemIdleTimerReset( void );

HWND WINAPI SetKeyboardTarget( HWND hWnd );
HWND WINAPI GetKeyboardTarget( VOID );
KEY_STATE_FLAGS WINAPI GetAsyncShiftFlags(UINT VKey);
WINUSERAPI void WINAPI AccessibilitySoundSentryEvent(void);
BOOL WINAPI ImmEnableIME(DWORD);
HKL WINAPI ImmGetKeyboardLayout(DWORD dwThreadId);

/*
 * ImmAssociateValueWithGwesMessageQueue flags
 * 
 * These is not hard & fast rule for the #s given below - just 
 * that they are ordered in pairs of get/set operations
 */
#define IMM_GETTHREADHKL                    1
#define IMM_SETTHREADHKL                    2
#define IMM_GETTHREADPREVHKL                3
#define IMM_SETTHREADPREVHKL                4

#define IMM_SETPROCESSHKL                   6

#define IMM_SET_THREAD_IME_DEFAULT_HWND     8
#define IMM_GET_LAYMGR_STATUS               9



void AudioUpdateFromRegistry(void);

/* Values for NotifyWinUserSystem */
#define NWUS_DOUBLE_TAP_CHANGED     1
#define NWUS_KEYBD_REPEAT_CHANGED   2
#define NWUS_MAX_IDLE_TIME_CHANGED  3

#define SPI_SETNOSEHFORVALIDATION   250

#define MOD_KEYUP_ALWAYS 0x2000

typedef struct tagPLATFORMVERSION {
    DWORD dwMajor;
    DWORD dwMinor;
} PLATFORMVERSION, *PPLATFORMVERSION;


#define SPI_PROJECT1    224
#define SPI_PROJECT2    225
#define SPI_PROJECT3    226
#define SPI_PROJECT4    227
#define SPI_PROJECT5    228
#define SPI_PROJECT6    229
#define SPI_PROJECT7    230
#define SPI_PROJECT8    231
#define SPI_PROJECT9    232
#define SPI_PROJECT10   233
#define SPI_PROJECT11   234
#define SPI_PROJECT12   235
#define SPI_PROJECT13   236
#define SPI_PROJECT14   237
#define SPI_PROJECT15   238
#define SPI_PROJECT16   239

#define SPI_GETPLATFORMVERSION        SPI_PROJECT1    

#define VK_APP_LAUNCH1      0xC1
#define VK_APP_LAUNCH2      0xC2
#define VK_APP_LAUNCH3      0xC3
#define VK_APP_LAUNCH4      0xC4
#define VK_APP_LAUNCH5      0xC5
#define VK_APP_LAUNCH6      0xC6
#define VK_APP_LAUNCH7      0xC7
#define VK_APP_LAUNCH8      0xC8
#define VK_APP_LAUNCH9      0xC9
#define VK_APP_LAUNCH10     0xCA
#define VK_APP_LAUNCH11     0xCB
#define VK_APP_LAUNCH12     0xCC
#define VK_APP_LAUNCH13     0xCD
#define VK_APP_LAUNCH14     0xCE
#define VK_APP_LAUNCH15     0xCF




void WINAPI NotifyWinUserSystem( UINT    uEvent );

BOOL WINAPI RegisterTaskBar (HWND hwndTaskbar);
BOOL WINAPI RegisterTaskBarEx (HWND hwndTaskbar, BOOL bTaskBarOnTop);
BOOL WINAPI RegisterDesktop (HWND hwndDesktop);

WINUSERAPI BOOL WINAPI RectangleAnimation ( HWND hWnd, LPCRECT prc, BOOL fMaximize ) ;
void WINAPI ShellModalEnd( void );

//#define ExitWindows(dwReserved, Code) ExitWindowsEx(EWX_LOGOFF, 0xFFFFFFFF)
//WINUSERAPI BOOL WINAPI ExitWindowsEx( UINT uFlags,DWORD dwReserved);
void GwesPowerOffSystem (void);
BOOL GwesPowerDown (void);
void GwesPowerUp (BOOL);

void WINAPI BatteryGetLifeTimeInfo ( LPSYSTEMTIME pstLastChange, DWORD * pcmsCpuUsage, DWORD * pcmsPreviousCpuUsage );
LONG WINAPI BatteryDrvrGetLevels ( void );
BOOL WINAPI BatteryDrvrSupportsChangeNotification ( void );
void WINAPI BatteryNotifyOfTimeChange ( BOOL fForward, FILETIME * pftDelta );

// A system class built in to GWE for use by everyone
#define CS_SYSTEMCLASS 0x80000000

/* flags for DrawFrameControl */
//#define DFC_CAPTION             1
#define DFC_MENU                2
//#define DFC_SCROLL              3
//#define DFC_BUTTON              4
#define DFC_SPINNER             6

//#define DFCS_CAPTIONCLOSE       0x0000
//#define DFCS_CAPTIONMIN         0x0001
//#define DFCS_CAPTIONMAX         0x0002
//#define DFCS_CAPTIONRESTORE     0x0003
//#define DFCS_CAPTIONHELP        0x0004
//#define DFCS_CAPTIONOKBTN   	  0x0080
#define DFCS_CAPTIONROUNDOKBTN_WINCE    0x0010 
#define DFCS_CAPTIONROUNDCLOSE_WINCE    0x0020
#define DFCS_CAPTIONALL_WINCE           0x00F0

#define DFCS_MENUARROW          0x0000
#define DFCS_MENUCHECK          0x0001
#define DFCS_MENUBULLET         0x0002
#define DFCS_MENUARROWRIGHT     0x0004

//#define DFCS_SCROLLUP           0x0000
//#define DFCS_SCROLLDOWN         0x0001
//#define DFCS_SCROLLLEFT         0x0002
//#define DFCS_SCROLLRIGHT        0x0003
//#define DFCS_SCROLLCOMBOBOX     0x0005
#define DFCS_SCROLLSIZEGRIP     0x0008
#define DFCS_SCROLLSIZEGRIPRIGHT 0x0010

//#define DFCS_BUTTONCHECK        0x0000
#define DFCS_BUTTONRADIOIMAGE   0x0001
#define DFCS_BUTTONRADIOMASK    0x0002
//#define DFCS_BUTTONRADIO        0x0004
//#define DFCS_BUTTON3STATE       0x0008
//#define DFCS_BUTTONPUSH         0x0010

#define DFCS_SPINNERUP           0x0000
#define DFCS_SPINNERDOWN         0x0001
#define DFCS_SPINNERLEFT         0x0002
#define DFCS_SPINNERRIGHT        0x0003
#define DFCS_SPINNERBUTTON       0x0010
#define DFCS_SPINNERNOBORDER     0x0020

//#define DFCS_INACTIVE           0x0100
//#define DFCS_PUSHED             0x0200
//#define DFCS_CHECKED            0x0400
#define DFCS_ADJUSTRECT         0x2000
#define DFCS_FLAT               0x4000
#define DFCS_MONO               0x8000

#define MFT_NONOWNERSTRING      0x80000000L

//WINUSERAPI BOOL    WINAPI DrawFrameControl(HDC, LPRECT, UINT, UINT);

// NC messages
#define WM_NCCREATE                     0x0081
#define WM_NCDESTROY                    0x0082
#define WM_NCCALCSIZE                   0x0083
#define WM_NCHITTEST                    0x0084
#define WM_NCPAINT                      0x0085
#define WM_NCACTIVATE                   0x0086

#define WM_NCMOUSEFIRST                 0x00A0
#define WM_NCMOUSEMOVE                  0x00A0
#define WM_NCLBUTTONDOWN                0x00A1
#define WM_NCLBUTTONUP                  0x00A2
#define WM_NCLBUTTONDBLCLK              0x00A3
#define WM_NCRBUTTONDOWN                0x00A4
#define WM_NCRBUTTONUP                  0x00A5
#define WM_NCRBUTTONDBLCLK              0x00A6
#define WM_NCMBUTTONDOWN                0x00A7
#define WM_NCMBUTTONUP                  0x00A8
#define WM_NCMBUTTONDBLCLK              0x00A9


#define WM_NCXBUTTONDOWN                0x00AB
#define WM_NCXBUTTONUP                  0x00AC
#define WM_NCXBUTTONDBLCLK              0x00AD
#define WM_NCMOUSELAST                  0x00AD

#ifdef FAREAST
/* Class style for IME UI window */
#define CS_IME      0x00010000
#endif // FAREAST

#ifdef _WIN32_WCE_EMULATION
#ifdef CS_IME
#undef CS_IME
#endif
#define CS_IME      0x00010000
#endif

/* For internal APIs "exposed" to other internal pieces. */
#ifdef __cplusplus
    #define EXTERN_C    extern "C"
#else
    #define EXTERN_C    extern
#endif /*__cplusplus*/
#define INTAPI  EXTERN_C LONG __stdcall
#define INTAPI_(type) EXTERN_C type __stdcall

BOOL KeybdGetDeviceInfo( INT iIndex, LPVOID  lpOutput );
BOOL KeybdInitStates( KEY_STATE KeyState, void  *pKeybdDriverState );

UINT32 KeybdVKeyToUnicode(
    UINT32          VKey,
    KEY_STATE_FLAGS KeyEventFlags,
    KEY_STATE       KeyState,
    void            *KeybdDriverState,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -