📄 windows.h
字号:
/* If defined, the following flags inhibit definition
of the indicated constants.
NOGDICAPMASKS CC_*, LC_*, PC_*, CP_*, TC_*, RC_
NOVIRTUALKEYCODES VK_*
NOWINMESSAGES WM_*
NONCMESSAGES WM_NC* and HT*
NOWINSTYLES WS_*, CS_*, ES_*, LBS_*
NOSYSMETRICS SM_*
NODRAWFRAME DF_*
NOMENUS MF_*
NOICON IDI_*
NOKEYSTATE MK_*
NOSYSCOMMANDS SC_*
NORASTEROPS binary and tertiary raster ops
NOSHOWWINDOW SHOW_* and HIDE_*
The following flags inhibit declarations of the following groups
of procedures and type definitions.
"associated routines" refers to routines with parameters or return
values of the given type.
OEMRESOURCE - define this and get the Oem Resource values.
NOSYSMETRICS - GetSystemMetrics
NOATOM - Atom Manager routines
NOBITMAP - typedef HBITMAP and associated routines
NOBRUSH - typedef HBRUSH and associated routines
NOCLIPBOARD - clipboard routines
NOCOLOR
NOCREATESTRUCT - typedef CREATESTRUCT
NOCTLMGR - control and dialog routines
NODRAWTEXT - DrawText() and DT_*
NOFONT - typedef FONT and associated routines
NOGDI - StretchBlt modes and gdi logical objects
NOHDC - typedef HDC and associated routines
NOMB - MB_* and MessageBox()
NOMEMMGR - GMEM_*, LMEM_*, GHND, LHND, associated routines
NOMENUS - HMENU and associated routines
NOMETAFILE - typedef METAFILEPICT
NOMINMAX - Macros min(a,b) and max(a,b)
NOMSG - typedef MSG and associated routines
NOOPENFILE - OpenFile(), OemToAnsi, AnsiToOem, and OF_*
NOPEN - typedef HPEN and associated routines
NOPOINT - typedef POINT and associated routines
NORECT - typedef RECT and associated routines
NOREGION - typedef HRGN and associated routines
NOSCROLL - SB_* and scrolling routines
NOSOUND - Sound driver routines
NOTEXTMETRIC - typedef TEXTMETRIC and associated routines
NOWH - SetWindowsHook and WH_*
NOWINOFFSETS - GWL_*, GCL_*, associated routines
NOWNDCLASS - typedef WNDCLASS and associated routines
NOCOMM - COMM driver routines
NOKANJI - Kanji support stuff.
*/
#ifdef RC_INVOKED
/*
Turn off a bunch of stuff to ensure that RC files compile OK
*/
#define NOCOMM
#define NOKANJI
#define NOWH
#define NOTEXTMETRIC
#define NOSOUND
#define NOSCROLL
#define NOGDICAPMASKS
#define NOSYSMETRICS
#define NORASTEROPS
#define NOATOM
#define NOFONT
#define NOREGION
#define NORECT
#define NOPEN
#define NOPOINT
#define NOOPENFILE
#define NOMSG
#define NOMINMAX
#define NOMETAFILE
#define NOHDC
#define NOGDI
#endif
#ifndef PASCAL
#define PASCAL pascal
#endif
#define FALSE 0
#define TRUE 1
#define NULL 0
#define FAR far
#define NEAR near
#define LONG long
#define VOID void
typedef unsigned char BYTE;
typedef unsigned short WORD;
typedef unsigned long DWORD;
typedef int BOOL;
typedef char *PSTR;
typedef char NEAR*NPSTR;
typedef char FAR *LPSTR;
typedef int FAR *LPINT;
#ifndef NOMINMAX
#define max(a,b) ((a) > (b) ? (a) : (b))
#define min(a,b) ((a) < (b) ? (a) : (b))
#endif
#define MAKELONG(a, b) ((long)(((unsigned)(a)) | ((unsigned long)((unsigned)(b))) << 16))
#define LOWORD(l) ((WORD)(l))
#define HIWORD(l) ((WORD)(((DWORD)(l) >> 16) & 0xFFFF))
#define LOBYTE(w) ((BYTE)(w))
#define HIBYTE(w) (((WORD)(w) >> 8) & 0xff)
#ifndef NOPOINT
#define MAKEPOINT(l) (*((POINT *)&(l)))
#endif
#ifdef OEMRESOURCE
#define OBM_CLOSE 32767
#define OBM_SIZE 32766
#define OBM_UPARROW 32765
#define OBM_DNARROW 32764
#define OBM_RGARROW 32763
#define OBM_LFARROW 32762
#define OBM_BTSIZE 32761
#define OBM_CHECK 32760
#define OBM_CHECKBOXES 32759
#define OBM_BTNCORNERS 32758
#define OBM_REDUCE 32757
#define OBM_ZOOM 32756
#define OBM_RESTORE 32755
#define OCR_NORMAL 32512
#define OCR_IBEAM 32513
#define OCR_WAIT 32514
#define OCR_CROSS 32515
#define OCR_UP 32516
#define OCR_SIZE 32640
#define OCR_ICON 32641
#define OCR_SIZENWSE 32642
#define OCR_SIZENESW 32643
#define OCR_SIZEWE 32644
#define OCR_SIZENS 32645
#define OCR_SIZEALL 32646
#define OIC_SAMPLE 32512
#define OIC_HAND 32513
#define OIC_QUES 32514
#define OIC_BANG 32515
#define OIC_NOTE 32516
#endif
/* Scroll bar constants */
#ifndef NOSCROLL
#define SB_HORZ 0
#define SB_VERT 1
#define SB_CTL 2
#define SB_BOTH 3
/* Scroll Commands */
#define SB_LINEUP 0
#define SB_LINEDOWN 1
#define SB_PAGEUP 2
#define SB_PAGEDOWN 3
#define SB_THUMBPOSITION 4
#define SB_THUMBTRACK 5
#define SB_TOP 6
#define SB_BOTTOM 7
#define SB_ENDSCROLL 8
#endif
#ifndef NOSHOWWINDOW
/* ShowWindow commands */
#define SW_HIDE 0
#define SW_SHOWNORMAL 1
#define SW_RESTORE 1
#define SW_NORMAL 1
#define SW_SHOWMINIMIZED 2
#define SW_SHOWMAXIMIZED 3
#define SW_MAXIMIZE 3
#define SW_SHOWNOACTIVATE 4
#define SW_SHOW 5
#define SW_MINIMIZE 6
#define SW_SHOWMINNOACTIVE 7
#define SW_SHOWNA 8
/* Old showwindow commands */
#define HIDE_WINDOW 0
#define SHOW_OPENWINDOW 1
#define SHOW_ICONWINDOW 2
#define SHOW_FULLSCREEN 3
#define SHOW_OPENNOACTIVATE 4
/* identifiers for the WM_SHOWWINDOW message */
#define SW_PARENTCLOSING 1
#define SW_OTHERZOOM 2
#define SW_PARENTOPENING 3
#define SW_OTHERUNZOOM 4
#endif
/* flags for regions */
#ifndef NOREGION
#define ERROR 0
#define NULLREGION 1
#define SIMPLEREGION 2
#define COMPLEXREGION 3
/* styles for CombineRgn */
#define RGN_AND 1
#define RGN_OR 2
#define RGN_XOR 3
#define RGN_DIFF 4
#define RGN_COPY 5
#endif
#ifndef NOVIRTUALKEYCODES
/* Virtual Keys, Standard Set */
#define VK_LBUTTON 0x01
#define VK_RBUTTON 0x02
#define VK_CANCEL 0x03
#define VK_MBUTTON 0x04 /* NOT contiguous with L & RBUTTON */
#define VK_BACK 0x08
#define VK_TAB 0x09
#define VK_CLEAR 0x0C
#define VK_RETURN 0x0D
#define VK_SHIFT 0x10
#define VK_CONTROL 0x11
#define VK_MENU 0x12
#define VK_PAUSE 0x13
#define VK_CAPITAL 0x14
#define VK_ESCAPE 0x1B
#define VK_SPACE 0x20
#define VK_PRIOR 0x21
#define VK_NEXT 0x22
#define VK_END 0x23
#define VK_HOME 0x24
#define VK_LEFT 0x25
#define VK_UP 0x26
#define VK_RIGHT 0x27
#define VK_DOWN 0x28
/* VK_A thru VK_Z are the same as their ASCII equivalents: 'A' thru 'Z' */
/* VK_0 thru VK_9 are the same as their ASCII equivalents: '0' thru '0' */
#define VK_SELECT 0x29
#define VK_PRINT 0x2A
#define VK_EXECUTE 0x2B
#define VK_COPY 0x2C
#define VK_INSERT 0x2D
#define VK_DELETE 0x2E
#define VK_HELP 0x2F
#define VK_NUMPAD0 0x60
#define VK_NUMPAD1 0x61
#define VK_NUMPAD2 0x62
#define VK_NUMPAD3 0x63
#define VK_NUMPAD4 0x64
#define VK_NUMPAD5 0x65
#define VK_NUMPAD6 0x66
#define VK_NUMPAD7 0x67
#define VK_NUMPAD8 0x68
#define VK_NUMPAD9 0x69
#define VK_MULTIPLY 0x6A
#define VK_ADD 0x6B
#define VK_SEPARATOR 0x6C
#define VK_SUBTRACT 0x6D
#define VK_DECIMAL 0x6E
#define VK_DIVIDE 0x6F
#define VK_F1 0x70
#define VK_F2 0x71
#define VK_F3 0x72
#define VK_F4 0x73
#define VK_F5 0x74
#define VK_F6 0x75
#define VK_F7 0x76
#define VK_F8 0x77
#define VK_F9 0x78
#define VK_F10 0x79
#define VK_F11 0x7A
#define VK_F12 0x7B
#define VK_F13 0x7C
#define VK_F14 0x7D
#define VK_F15 0x7E
#define VK_F16 0x7F
#define VK_NUMLOCK 0x90
#endif
/* SetWindowsHook codes */
#ifndef NOWH
#define WH_MSGFILTER -1
#define WH_JOURNALRECORD 0
#define WH_JOURNALPLAYBACK 1
#define WH_KEYBOARD 2
#define WH_GETMESSAGE 3
#define WH_CALLWNDPROC 4
#define WH_CBT 5
#define WH_SYSMSGFILTER 6
#define WH_WINDOWMGR 7
/* HC_* Hook Codes */
#define HC_LPLPFNNEXT -2
#define HC_LPFNNEXT -1
#define HC_ACTION 0
#define HC_GETNEXT 1
#define HC_SKIP 2
#define HC_NOREM 3
#define HC_NOREMOVE 3
/* CBT hook codes */
#define HCBT_MOVESIZE 0
#define HCBT_MINMAX 1
#define HCBT_QS 2
/* WH_MSGFILTER filter proc codes */
#define MSGF_DIALOGBOX 0
#define MSGF_MESSAGEBOX 1
#define MSGF_MENU 2
#define MSGF_MOVE 3
#define MSGF_SIZE 4
#define MSGF_SCROLLBAR 5
#define MSGF_NEXTWINDOW 6
/* Define window manager hook codes */
#define WC_INIT 1
#define WC_SWP 2
#define WC_DEFWINDOWPROC 3
#define WC_MINMAX 4
#define WC_MOVE 5
#define WC_SIZE 6
#define WC_DRAWCAPTION 7
/* message structure used in journaling */
typedef struct eventmsg {
unsigned message;
WORD paramL;
WORD paramH;
DWORD time;
} EVENTMSG;
typedef EVENTMSG *PEVENTMSGMSG;
typedef EVENTMSG NEAR *NPEVENTMSGMSG;
typedef EVENTMSG FAR *LPEVENTMSGMSG;
#endif
/* Binary raster ops */
#ifndef NORASTEROPS
#define R2_BLACK 1 /* 0 */
#define R2_NOTMERGEPEN 2 /* DPon */
#define R2_MASKNOTPEN 3 /* DPna */
#define R2_NOTCOPYPEN 4 /* PN */
#define R2_MASKPENNOT 5 /* PDna */
#define R2_NOT 6 /* Dn */
#define R2_XORPEN 7 /* DPx */
#define R2_NOTMASKPEN 8 /* DPan */
#define R2_MASKPEN 9 /* DPa */
#define R2_NOTXORPEN 10 /* DPxn */
#define R2_NOP 11 /* D */
#define R2_MERGENOTPEN 12 /* DPno */
#define R2_COPYPEN 13 /* P */
#define R2_MERGEPENNOT 14 /* PDno */
#define R2_MERGEPEN 15 /* DPo */
#define R2_WHITE 16 /* 1 */
/* Ternary raster operations */
#define SRCCOPY (DWORD)0x00CC0020 /* dest=source */
#define SRCPAINT (DWORD)0x00EE0086 /* dest=source OR dest */
#define SRCAND (DWORD)0x008800C6 /* dest = source AND dest */
#define SRCINVERT (DWORD)0x00660046 /* dest = source XOR dest */
#define SRCERASE (DWORD)0x00440328 /* dest = source AND (not dest ) */
#define NOTSRCCOPY (DWORD)0x00330008 /* dest = (not source) */
#define NOTSRCERASE (DWORD)0x001100A6 /* dest = (not source) AND (not dest) */
#define MERGECOPY (DWORD)0x00C000CA /* dest = (source AND pattern) */
#define MERGEPAINT (DWORD)0x00BB0226 /* dest = (NOT source) OR dest */
#define PATCOPY (DWORD)0x00F00021 /* dest = pattern */
#define PATPAINT (DWORD)0x00FB0A09 /* dest = DPSnoo */
#define PATINVERT (DWORD)0x005A0049 /* dest = pattern XOR dest */
#define DSTINVERT (DWORD)0x00550009 /* dest = (not dest) */
#define BLACKNESS (DWORD)0x00000042 /* dest = BLACK */
#define WHITENESS (DWORD)0x00FF0062 /* dest = WHITE */
#endif
#ifndef NOGDI
/* StretchBlt() modes */
#define BLACKONWHITE 1
#define WHITEONBLACK 2
#define COLORONCOLOR 3
/* PolyFill modes */
#define ALTERNATE 1
#define WINDING 2
/* text alignment options */
#define TA_UPDATECP 1
#define TA_NOUPDATECP 0
#define TA_LEFT 0
#define TA_RIGHT 2
#define TA_CENTER 6
#define TA_TOP 0
#define TA_BOTTOM 8
#define TA_BASELINE 24
#define ETO_GRAYED 1
#define ETO_OPAQUE 2
#define ETO_CLIPPED 4
#define ASPECT_FILTERING 0x00000001
#ifndef NOMETAFILE
/* Meta file function numbers */
#define META_SETBKCOLOR 0x0201
#define META_SETBKMODE 0x0102
#define META_SETMAPMODE 0x0103
#define META_SETROP2 0x0104
#define META_SETRELABS 0x0105
#define META_SETPOLYFILLMODE 0x0106
#define META_SETSTRETCHBLTMODE 0x0107
#define META_SETTEXTCHAREXTRA 0x0108
#define META_SETTEXTCOLOR 0x0209
#define META_SETTEXTJUSTIFICATION 0x020A
#define META_SETWINDOWORG 0x020B
#define META_SETWINDOWEXT 0x020C
#define META_SETVIEWPORTORG 0x020D
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -