📄 winuser.h
字号:
HBITMAP
WINAPI
LoadBitmapA(
HINSTANCE hInstance,
LPCSTR lpBitmapName);
HBITMAP
WINAPI
LoadBitmapW(
HINSTANCE hInstance,
LPCWSTR lpBitmapName);
#ifdef UNICODE
#define LoadBitmap LoadBitmapW
#else
#define LoadBitmap LoadBitmapA
#endif // !UNICODE
// @CESYSGEN ENDIF
// @CESYSGEN IF GWES_WMBASE
/*
* GetSystemMetrics() codes
*/
#define SM_CXSCREEN 0
#define SM_CYSCREEN 1
#define SM_CXVSCROLL 2
#define SM_CYHSCROLL 3
#define SM_CYCAPTION 4
#define SM_CXBORDER 5
#define SM_CYBORDER 6
#define SM_CXDLGFRAME 7
#define SM_CYDLGFRAME 8
#define SM_CXICON 11
#define SM_CYICON 12
// @CESYSGEN IF GWES_ICONCURS
// @CESYSGEN ENDIF
#define SM_CYMENU 15
#define SM_CXFULLSCREEN 16
#define SM_CYFULLSCREEN 17
#define SM_MOUSEPRESENT 19
#define SM_CYVSCROLL 20
#define SM_CXHSCROLL 21
#define SM_DEBUG 22
#define SM_CXDOUBLECLK 36
#define SM_CYDOUBLECLK 37
#define SM_CXICONSPACING 38
#define SM_CYICONSPACING 39
#define SM_CXEDGE 45
#define SM_CYEDGE 46
#define SM_CXSMICON 49
#define SM_CYSMICON 50
#define SM_XVIRTUALSCREEN 76
#define SM_YVIRTUALSCREEN 77
#define SM_CXVIRTUALSCREEN 78
#define SM_CYVIRTUALSCREEN 79
#define SM_CMONITORS 80
#define SM_SAMEDISPLAYFORMAT 81
#define SM_CXFIXEDFRAME SM_CXDLGFRAME
#define SM_CYFIXEDFRAME SM_CYDLGFRAME
// @CESYSGEN ENDIF
// @CESYSGEN IF GWES_MENU
HMENU
WINAPI
LoadMenuA(
HINSTANCE hInstance,
LPCSTR lpMenuName);
HMENU
WINAPI
LoadMenuW(
HINSTANCE hInstance,
LPCWSTR lpMenuName);
#ifdef UNICODE
#define LoadMenu LoadMenuW
#else
#define LoadMenu LoadMenuA
#endif // !UNICODE
BOOL
WINAPI
DrawMenuBar(
HWND hWnd);
HMENU
WINAPI
CreateMenu(
VOID);
HMENU
WINAPI
CreatePopupMenu(
VOID);
BOOL
WINAPI
DestroyMenu(
HMENU hMenu);
DWORD
WINAPI
CheckMenuItem(
HMENU hMenu,
UINT uIDCheckItem,
UINT uCheck);
BOOL
WINAPI
EnableMenuItem(
HMENU hMenu,
UINT uIDEnableItem,
UINT uEnable);
HMENU
WINAPI
GetSubMenu(
HMENU hMenu,
int nPos);
BOOL
WINAPI
InsertMenuA(
HMENU hMenu,
UINT uPosition,
UINT uFlags,
UINT uIDNewItem,
LPCSTR lpNewItem
);
BOOL
WINAPI
InsertMenuW(
HMENU hMenu,
UINT uPosition,
UINT uFlags,
UINT uIDNewItem,
LPCWSTR lpNewItem
);
#ifdef UNICODE
#define InsertMenu InsertMenuW
#else
#define InsertMenu InsertMenuA
#endif // !UNICODE
BOOL
WINAPI
AppendMenuA(
HMENU hMenu,
UINT uFlags,
UINT uIDNewItem,
LPCSTR lpNewItem
);
BOOL
WINAPI
AppendMenuW(
HMENU hMenu,
UINT uFlags,
UINT uIDNewItem,
LPCWSTR lpNewItem
);
#ifdef UNICODE
#define AppendMenu AppendMenuW
#else
#define AppendMenu AppendMenuA
#endif // !UNICODE
BOOL
WINAPI RemoveMenu(
HMENU hMenu,
UINT uPosition,
UINT uFlags);
BOOL
WINAPI
DeleteMenu(
HMENU hMenu,
UINT uPosition,
UINT uFlags);
BOOL
WINAPI
TrackPopupMenu(
HMENU hMenu,
UINT uFlags,
int x,
int y,
int nReserved,
HWND hWnd,
CONST RECT *prcRect);
typedef struct tagTPMPARAMS
{
UINT cbSize; /* Size of structure */
RECT rcExclude; /* Screen coordinates of rectangle to exclude when positioning */
} TPMPARAMS;
typedef TPMPARAMS FAR *LPTPMPARAMS;
BOOL
WINAPI
TrackPopupMenuEx(
HMENU hmenu,
UINT uFlags,
int x,
int y,
HWND hwnd,
LPTPMPARAMS lptpm);
#define TrackPopupMenu(hm,u,x,y,r,hw,p) \
TrackPopupMenuEx((hm),(u),(x),(y),(hw),0)
// WINCE doesn't support a system menu, but in order
// to maintain application compatibility we provide this
// macro to allow disabling of the close box on the caption.
#define GetSystemMenu(hwnd, bRevert) ((HMENU)(hwnd))
/* return codes for WM_MENUCHAR */
#define MNC_IGNORE 0
#define MNC_CLOSE 1
#define MNC_EXECUTE 2
#define MNC_SELECT 3
#define MIIM_STATE 0x00000001
#define MIIM_ID 0x00000002
#define MIIM_SUBMENU 0x00000004
#define MIIM_CHECKMARKS 0x00000008
#define MIIM_TYPE 0x00000010
#define MIIM_DATA 0x00000020
typedef struct tagMENUITEMINFOA
{
UINT cbSize;
UINT fMask;
UINT fType; // used if MIIM_TYPE
UINT fState; // used if MIIM_STATE
UINT wID; // used if MIIM_ID
HMENU hSubMenu; // used if MIIM_SUBMENU
HBITMAP hbmpChecked; // used if MIIM_CHECKMARKS
HBITMAP hbmpUnchecked; // used if MIIM_CHECKMARKS
DWORD dwItemData; // used if MIIM_DATA
LPSTR dwTypeData; // used if MIIM_TYPE
UINT cch; // used if MIIM_TYPE
} MENUITEMINFOA, FAR *LPMENUITEMINFOA;
typedef struct tagMENUITEMINFOW
{
UINT cbSize;
UINT fMask;
UINT fType; // used if MIIM_TYPE
UINT fState; // used if MIIM_STATE
UINT wID; // used if MIIM_ID
HMENU hSubMenu; // used if MIIM_SUBMENU
HBITMAP hbmpChecked; // used if MIIM_CHECKMARKS
HBITMAP hbmpUnchecked; // used if MIIM_CHECKMARKS
DWORD dwItemData; // used if MIIM_DATA
LPWSTR dwTypeData; // used if MIIM_TYPE
UINT cch; // used if MIIM_TYPE
} MENUITEMINFOW, FAR *LPMENUITEMINFOW;
#ifdef UNICODE
typedef MENUITEMINFOW MENUITEMINFO;
typedef LPMENUITEMINFOW LPMENUITEMINFO;
#else
typedef MENUITEMINFOA MENUITEMINFO;
typedef LPMENUITEMINFOA LPMENUITEMINFO;
#endif // UNICODE
typedef MENUITEMINFOA CONST FAR *LPCMENUITEMINFOA;
typedef MENUITEMINFOW CONST FAR *LPCMENUITEMINFOW;
#ifdef UNICODE
typedef LPCMENUITEMINFOW LPCMENUITEMINFO;
#else
typedef LPCMENUITEMINFOA LPCMENUITEMINFO;
#endif // UNICODE
WINUSERAPI
BOOL
WINAPI
GetMenuItemInfoA(
HMENU,
UINT,
BOOL,
LPMENUITEMINFOA
);
WINUSERAPI
BOOL
WINAPI
GetMenuItemInfoW(
HMENU,
UINT,
BOOL,
LPMENUITEMINFOW
);
#ifdef UNICODE
#define GetMenuItemInfo GetMenuItemInfoW
#else
#define GetMenuItemInfo GetMenuItemInfoA
#endif // !UNICODE
WINUSERAPI
BOOL
WINAPI
SetMenuItemInfoA(
HMENU,
UINT,
BOOL,
LPCMENUITEMINFOA
);
WINUSERAPI
BOOL
WINAPI
SetMenuItemInfoW(
HMENU,
UINT,
BOOL,
LPCMENUITEMINFOW
);
#ifdef UNICODE
#define SetMenuItemInfo SetMenuItemInfoW
#else
#define SetMenuItemInfo SetMenuItemInfoA
#endif // !UNICODE
/*
* Flags for TrackPopupMenu
*/
#define TPM_LEFTALIGN 0x0000L
#define TPM_CENTERALIGN 0x0004L
#define TPM_RIGHTALIGN 0x0008L
#define TPM_TOPALIGN 0x0000L
#define TPM_VCENTERALIGN 0x0010L
#define TPM_BOTTOMALIGN 0x0020L
#define TPM_HORIZONTAL 0x0000L /* Horz alignment matters more */
#define TPM_VERTICAL 0x0040L /* Vert alignment matters more */
#define TPM_NONOTIFY 0x0080L /* Don't send any notification msgs */
#define TPM_RETURNCMD 0x0100L
// @CESYSGEN ENDIF
// @CESYSGEN IF COREDLL_ACCEL_C
/*
* Defines for the fVirt field of the Accelerator table structure.
*/
#define FVIRTKEY TRUE /* Assumed to be == TRUE */
#define FNOINVERT 0x02
#define FSHIFT 0x04
#define FCONTROL 0x08
#define FALT 0x10
/* The resource entries in the module each have an extra word of padding
between accelerator entries. Win95 and WinNT both change the
resource loading process to make the resulting memory image have 24-bits
but we just add the extra padding to the structure. */
typedef struct tagACCEL {
BYTE fVirt; /* Also called the flags field */
WORD key;
WORD cmd;
WORD pad; /* Different from Win95 and WinNT */
} ACCEL, *LPACCEL;
HACCEL
WINAPI
LoadAcceleratorsA(
HINSTANCE hInstance,
LPCSTR lpTableName);
HACCEL
WINAPI
LoadAcceleratorsW(
HINSTANCE hInstance,
LPCWSTR lpTableName);
#ifdef UNICODE
#define LoadAccelerators LoadAcceleratorsW
#else
#define LoadAccelerators LoadAcceleratorsA
#endif // !UNICODE
HACCEL
WINAPI
CreateAcceleratorTableA(
LPACCEL, int);
HACCEL
WINAPI
CreateAcceleratorTableW(
LPACCEL, int);
#ifdef UNICODE
#define CreateAcceleratorTable CreateAcceleratorTableW
#else
#define CreateAcceleratorTable CreateAcceleratorTableA
#endif // !UNICODE
BOOL
WINAPI
DestroyAcceleratorTable(
HACCEL hAccel);
// @CESYSGEN ENDIF
// @CESYSGEN IF GWES_WINMGR
BOOL
WINAPI
SetSysColors(
int cElements,
CONST INT * lpaElements,
CONST COLORREF * lpaRgbValues);
// @CESYSGEN ENDIF
// @CESYSGEN IF COREDLL_RECTAPI
BOOL
WINAPI
SetRect(
LPRECT lprc,
int xLeft,
int yTop,
int xRight,
int yBottom);
BOOL
WINAPI
SetRectEmpty(
LPRECT lprc);
BOOL
WINAPI
CopyRect(
LPRECT lprcDst,
CONST RECT *lprcSrc);
BOOL
WINAPI
InflateRect(
LPRECT lprc,
int dx,
int dy);
BOOL
WINAPI
IntersectRect(
LPRECT lprcDst,
CONST RECT *lprcSrc1,
CONST RECT *lprcSrc2);
BOOL
WINAPI
UnionRect(
LPRECT lprcDst,
CONST RECT *lprcSrc1,
CONST RECT *lprcSrc2);
BOOL
WINAPI
OffsetRect(
LPRECT lprc,
int dx,
int dy);
BOOL
WINAPI
IsRectEmpty(
CONST RECT *lprc);
BOOL
WINAPI
EqualRect(
CONST RECT *lprc1,
CONST RECT *lprc2);
BOOL
WINAPI
PtInRect(
CONST RECT *lprc,
POINT pt);
BOOL
WINAPI
SubtractRect(
LPRECT prcDst,
CONST RECT *prcSrc1,
CONST RECT *prcSrc2);
// @CESYSGEN ENDIF
// @CESYSGEN IF GWES_WINMGR
int
WINAPI
MapWindowPoints(
HWND hWndFrom,
HWND hWndTo,
LPPOINT lpPoints,
UINT cPoints);
HWND
WINAPI
WindowFromPoint(
POINT Point);
HWND
WINAPI
ChildWindowFromPoint(
HWND hWndParent,
POINT Point);
BOOL
WINAPI
ClientToScreen(
HWND hWnd,
LPPOINT lpPoint);
BOOL
WINAPI
ScreenToClient(
HWND hWnd,
LPPOINT lpPoint);
typedef struct _PAINTSTRUCT {
HDC hdc; /* display DC to be used for painting */
BOOL fErase; /* Indicates whether background needs erased */
RECT rcPaint; /* Rectangle where painting required */
BOOL fRestore; /* RESERVED */
BOOL fIncUpdate; /* RESERVED */
BYTE rgbReserved[32]; /* RESERVED */
} PAINTSTRUCT;
typedef PAINTSTRUCT *LPPAINTSTRUCT;
typedef PAINTSTRUCT *PPAINTSTRUCT;
typedef const PAINTSTRUCT *LPCPAINTSTRUCT;
typedef const PAINTSTRUCT *PCPAINTSTRUCT;
BOOL
WINAPI
SetWindowTextA(
HWND hWnd,
LPCSTR lpString);
BOOL
WINAPI
SetWindowTextW(
HWND hWnd,
LPCWSTR lpString);
#ifdef UNICODE
#define SetWindowText SetWindowTextW
#else
#define SetWindowText SetWindowTextA
#endif // !UNICODE
int
WINAPI
GetWindowTextA(
HWND hWnd,
LPSTR lpString,
int nMaxCount);
int
WINAPI
GetWindowTextW(
HWND hWnd,
LPWSTR lpString,
int nMaxCount);
#ifdef UNICODE
#define GetWindowText GetWindowTextW
#else
#define GetWindowText GetWindowTextA
#endif // !UNICODE
HDC
WINAPI
BeginPaint (
HWND hwnd,
LPPAINTSTRUCT pps
);
BOOL
WINAPI
EndPaint (
HWND hwnd,
LPPAINTSTRUCT pps
);
BOOL
WINAPI
GetUpdateRect(
HWND hWnd,
LPRECT lpRect,
BOOL bErase);
int
WINAPI
GetUpdateRgn(
HWND hWnd,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -