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

📄 windows.h

📁 这是DOS系统的源代码,汇编写的,值得看看,对开发操作系统的人员有价值
💻 H
📖 第 1 页 / 共 5 页
字号:
#define META_SETVIEWPORTEXT	     0x020E
#define META_OFFSETWINDOWORG	     0x020F
#define META_SCALEWINDOWEXT	     0x0400
#define META_OFFSETVIEWPORTORG	     0x0211
#define META_SCALEVIEWPORTEXT	     0x0412
#define META_LINETO		     0x0213
#define META_MOVETO		     0x0214
#define META_EXCLUDECLIPRECT	     0x0415
#define META_INTERSECTCLIPRECT	     0x0416
#define META_ARC		     0x0817
#define META_ELLIPSE		     0x0418
#define META_FLOODFILL		     0x0419
#define META_PIE		     0x081A
#define META_RECTANGLE		     0x041B
#define META_ROUNDRECT		     0x061C
#define META_PATBLT		     0x061D
#define META_SAVEDC		     0x001E
#define META_SETPIXEL		     0x041F
#define META_OFFSETCLIPRGN	     0x0220
#define META_TEXTOUT		     0x0521
#define META_BITBLT		     0x0922
#define META_STRETCHBLT		     0x0B23
#define META_POLYGON		     0x0324
#define META_POLYLINE		     0x0325
#define META_ESCAPE		     0x0626
#define META_RESTOREDC		     0x0127
#define META_FILLREGION		     0x0228
#define META_FRAMEREGION	     0x0429
#define META_INVERTREGION	     0x012A
#define META_PAINTREGION	     0x012B
#define META_SELECTCLIPREGION	     0x012C
#define META_SELECTOBJECT	     0x012D
#define META_SETTEXTALIGN	     0x012E
#define META_DRAWTEXT		     0x062F
#define META_CHORD		     0x0630
#define META_CREATEBRUSH	     0x00F8
#define META_CREATEPATTERNBRUSH	     0x01F9
#define META_CREATEPENINDIRECT	     0x02FA
#define META_CREATEFONTINDIRECT	     0x02FB
#define META_CREATEBRUSHINDIRECT     0x02FC
#define META_CREATEBITMAPINDIRECT    0x02FD
#define META_CREATEBITMAP	     0x06FE
#define META_CREATEREGION	     0x06FF
#endif

/* GDI escapes */
#define NEWFRAME	    1
#define ABORTDOC	    2
#define NEXTBAND	    3
#define SETCOLORTABLE	    4
#define GETCOLORTABLE	    5
#define FLUSHOUTPUT	    6
#define DRAFTMODE	    7
#define QUERYESCSUPPORT	    8
#define SETABORTPROC	    9
#define STARTDOC	    10
#define ENDDOC		    11
#define GETPHYSPAGESIZE	    12
#define GETPRINTINGOFFSET   13
#define GETSCALINGFACTOR    14
#define MFCOMMENT	    15	      /* Metafile comment escape */
#define GETPENWIDTH	    16
#define SETCOPYCOUNT	    17
#define SELECTPAPERSOURCE   18
#define DEVICEDATA	    19
#define PASSTHROUGH	    19
#define GETTECHNOLGY	    20
#define SETENDCAP	    21
#define SETLINEJOIN	    22
#define SETMITERLIMIT	    23
#define BANDINFO	    24
#define DRAWPATTERNRECT	    25
#define GETVECTORPENSIZE    26
#define GETVECTORBRUSHSIZE  27
#define ENABLEDUPLEX	    28
#define ENABLEMANUALFEED    29



#define GETEXTENDEDTEXTMETRICS	256
#define GETEXTENTTABLE		257
#define GETPAIRKERNTABLE	258
#define GETTRACKKERNTABLE	259

#define EXTTEXTOUT		512

#define ENABLERELATIVEWIDTHS	768
#define ENABLEPAIRKERNING	769
#define SETKERNTRACK		770
#define STRETCHBLT		2048


/* spooler error code */
#define SP_NOTREPORTED	    0x4000  /* set if GDI did not report error */
#define SP_ERROR	    (-1)    /* general errors who know what went wrong */
#define SP_APPABORT	    (-2)    /* app aborted the job - callback function returned false */
#define SP_USERABORT	    (-3)    /* user aborted the job through spooler's front end */
#define SP_OUTOFDISK	    (-4)    /* not enough disk space to spool */
#define SP_OUTOFMEMORY	    (-5)
/* spooler WM_SPOOLERSTATUS wparm classes   */


#define PR_JOBSTATUS	    0x0000
#endif

/* Object definitions for GDI EnumObjects. */
#define OBJ_PEN		1
#define OBJ_BRUSH	2

#ifndef WIN_INTERNAL
typedef WORD HANDLE;
#endif
typedef HANDLE	     *PHANDLE;
typedef HANDLE	NEAR *SPHANDLE;
typedef HANDLE	FAR *LPHANDLE;

typedef int (FAR PASCAL *FARPROC)();
typedef int (NEAR PASCAL *NEARPROC)();
typedef HANDLE GLOBALHANDLE;
typedef HANDLE LOCALHANDLE;

#ifndef NOBITMAP
typedef struct tagBITMAP {
    short      bmType;
    short      bmWidth;
    short      bmHeight;
    short      bmWidthBytes;
    BYTE       bmPlanes;
    BYTE       bmBitsPixel;
    LPSTR      bmBits;
} BITMAP;
typedef BITMAP *PBITMAP;
typedef BITMAP NEAR *NPBITMAP;
typedef BITMAP FAR *LPBITMAP;
#endif

typedef HANDLE	HSTR;
typedef HANDLE	HICON;
typedef HANDLE	HDC;
typedef HANDLE	HMENU;
typedef HANDLE	HPEN;
typedef HANDLE	HFONT;
typedef HANDLE	HBRUSH;
typedef HANDLE	HBITMAP;
typedef HANDLE	HCURSOR;
typedef HANDLE	HRGN;

typedef struct tagPOINT {
    int x;
    int y;
} POINT;
typedef POINT *PPOINT;
typedef POINT NEAR *NPPOINT;
typedef POINT FAR *LPPOINT;

#ifndef NORECT
#ifndef WIN_INTERNAL
typedef struct tagRECT {
    int left;
    int top;
    int right;
    int bottom;
} RECT;
#endif

typedef RECT *PRECT;
typedef RECT NEAR *NPRECT;
typedef RECT FAR *LPRECT;
#endif

#ifndef NOWNDCLASS
#ifndef NOBRUSH
typedef struct tagWNDCLASS {
    WORD    style;
    long    (FAR PASCAL *lpfnWndProc)();
    int	    cbClsExtra;
    int	    cbWndExtra;
    HANDLE  hInstance;
    HICON   hIcon;
    HCURSOR hCursor;
    HBRUSH  hbrBackground;
    LPSTR   lpszMenuName;
    LPSTR   lpszClassName;
} WNDCLASS;
typedef WNDCLASS     *PWNDCLASS;
typedef WNDCLASS NEAR *NPWNDCLASS;
typedef WNDCLASS FAR *LPWNDCLASS;
#endif
#endif

#ifndef WIN_INTERNAL
typedef HANDLE HWND;
#endif

#ifndef NOMSG
#ifndef NOPOINT
/* Message structure */
typedef struct tagMSG {
    HWND hwnd;
    WORD message;
    WORD wParam;
    LONG lParam;
    DWORD time;
    POINT pt;
} MSG;
typedef MSG *PMSG;
typedef MSG NEAR *NPMSG;
typedef MSG FAR *LPMSG;
#endif
#endif

/* Window field offsets for GetWindowLong & GetWindowWord */
#ifndef NOWINOFFSETS
#define GWL_WNDPROC	-4
#define GWW_HINSTANCE	-6
#define GWW_HWNDPARENT	-8
#define GWW_HWNDTEXT	-10
#define GWW_ID		-12
#define GWL_STYLE	-16

/* Class field offsets for GetClassLong & GetClassWord */
#define GCL_MENUNAME	    -8
#define GCW_HBRBACKGROUND   -10
#define GCW_HCURSOR	    -12
#define GCW_HICON	    -14
#define GCW_HMODULE	    -16
#define GCW_CBWNDEXTRA	    -18
#define GCW_CBCLSEXTRA	    -20
#define GCL_WNDPROC	    -24
#define GCW_STYLE	    -26
#endif

#ifndef NOWINMESSAGES
/* ** Window Procedure Messages */

#define WM_NULL		    0x0000
#define WM_CREATE	    0x0001
#define WM_DESTROY	    0x0002
#define WM_MOVE		    0x0003
#define WM_SIZEWAIT	    0x0004
#define WM_SIZE		    0x0005
#define WM_ACTIVATE	    0x0006
#define WM_SETFOCUS	    0x0007
#define WM_KILLFOCUS	    0x0008
#define WM_SETVISIBLE	    0x0009
#define WM_ENABLE	    0x000a
#define WM_SETREDRAW	    0x000b
#define WM_SETTEXT	    0x000c
#define WM_GETTEXT	    0x000d
#define WM_GETTEXTLENGTH    0x000e
#define WM_PAINT	    0x000f
#define WM_CLOSE	    0x0010
#define WM_QUERYENDSESSION  0x0011
#define WM_QUIT		    0x0012
#define WM_QUERYOPEN	    0x0013
#define WM_ERASEBKGND	    0x0014
#define WM_SYSCOLORCHANGE   0x0015
#define WM_ENDSESSION	    0x0016
#define WM_SYSTEMERROR	    0x0017
#define WM_SHOWWINDOW	    0x0018
#define WM_CTLCOLOR	    0x0019
#define WM_WININICHANGE	    0x001A
#define WM_DEVMODECHANGE    0x001B
#define WM_ACTIVATEAPP	    0x001C
#define WM_FONTCHANGE	    0x001D
#define WM_TIMECHANGE	    0x001E
#define WM_CANCELMODE	    0x001F
#define WM_SETCURSOR	    0x0020
#define WM_MOUSEACTIVATE    0x0021
#define WM_CHILDACTIVATE    0x0022
#define WM_QUEUESYNC	    0x0023
#define WM_GETMINMAXINFO    0x0024
#define WM_PAINTICON	    0x0026
#define WM_ICONERASEBKGND   0x0027
#define WM_NEXTDLGCTL	    0x0028
#define WM_ALTTABACTIVE	    0x0029	    /* for win386 only */
#define WM_SPOOLERSTATUS    0x002A


#ifndef NONCMESSAGES
#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_GETDLGCODE	    0x0087
#define WM_SYNCPAINT	    0x0088
#define WM_SYNCTASK	    0x0089

#define ST_BEGINSWP	    0
#define ST_ENDSWP	    1

#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

/* WINWhere area codes */
#define HTERROR	      -2
#define HTTRANSPARENT -1
#define HTNOWHERE      0
#define HTCLIENT       1
#define HTCAPTION      2
#define HTSYSMENU      3
#define HTGROWBOX      4
#define HTSIZE HTGROWBOX
#define HTMENU	       5
#define HTHSCROLL      6
#define HTVSCROLL      7
#define HTREDUCE       8
#define HTZOOM	       9
#define HTLEFT	       10
#define HTRIGHT	       11
#define HTTOP	       12
#define HTTOPLEFT      13
#define HTTOPRIGHT     14
#define HTBOTTOM       15
#define HTBOTTOMLEFT   16
#define HTBOTTOMRIGHT  17
#define HTSIZEFIRST HTLEFT
#define HTSIZELAST  HTBOTTOMRIGHT
#endif

/* WM_MOUSEACTIVATE return codes */
#define MA_ACTIVATE	    1
#define MA_ACTIVATEANDEAT   2
#define MA_NOACTIVATE	    3

#define WM_KEYFIRST	    0x0100
#define WM_KEYLAST	    0x0108

#define WM_KEYDOWN	    0x0100
#define WM_KEYUP	    0x0101
#define WM_CHAR		    0x0102
#define WM_DEADCHAR	    0x0103
#define WM_SYSKEYDOWN	    0x0104
#define WM_SYSKEYUP	    0x0105
#define WM_SYSCHAR	    0x0106
#define WM_SYSDEADCHAR	    0x0107
#define WM_YOMICHAR	    0x0108
#define WM_CONVERTREQUEST   0x010A
#define WM_CONVERTRESULT    0x010B

#define WM_INITDIALOG	    0x0110
#define WM_COMMAND	    0x0111
#define WM_SYSCOMMAND	    0x0112
#define WM_TIMER	    0x0113
#define WM_HSCROLL	    0x0114
#define WM_VSCROLL	    0x0115
#define WM_INITMENU	    0x0116
#define WM_INITMENUPOPUP    0x0117
#define WM_SYSTIMER	    0x0118
#define WM_MENUSELECT	    0x011f
#define WM_MENUCHAR	    0x0120
#define WM_ENTERIDLE	    0x0121


#define WM_MOUSEFIRST	    0x0200
#define WM_MOUSELAST	    0x0209

#define WM_MOUSEMOVE	    0x0200	/* mouse related constants */
#define WM_LBUTTONDOWN	    0x0201
#define WM_LBUTTONUP	    0x0202
#define WM_LBUTTONDBLCLK    0x0203
#define WM_RBUTTONDOWN	    0x0204
#define WM_RBUTTONUP	    0x0205
#define WM_RBUTTONDBLCLK    0x0206
#define WM_MBUTTONDOWN	    0x0207
#define WM_MBUTTONUP	    0x0208
#define WM_MBUTTONDBLCLK    0x0209

#define WM_KANJIFIRST	    0x0280
#define WM_KANJILAST	    0x029f

/* clipboard messages */
#define WM_CUT		    0x0300
#define WM_COPY		    0x0301
#define WM_PASTE	    0x0302
#define WM_CLEAR	    0x0303
#define WM_UNDO		    0x0304
#define WM_RENDERFORMAT	    0x0305
#define WM_RENDERALLFORMATS 0x0306
#define WM_DESTROYCLIPBOARD 0x0307
#define WM_DRAWCLIPBOARD    0x0308
#define WM_PAINTCLIPBOARD   0x0309
#define WM_VSCROLLCLIPBOARD 0x030A
#define WM_SIZECLIPBOARD    0x030B
#define WM_ASKCBFORMATNAME  0x030C
#define WM_CHANGECBCHAIN    0x030D
#define WM_HSCROLLCLIPBOARD 0x030E

/* 0x03f0 to 0x03ff are reserved */
/* private window messages start here */
#define WM_USER		    0x0400

unsigned FAR PASCAL RegisterWindowMessage(LPSTR);

/* Size message commands */
#define SIZENORMAL	0
#define SIZEICONIC	1
#define SIZEFULLSCREEN	2
#define SIZEZOOMSHOW	3
#define SIZEZOOMHIDE	4
#endif

/* Key state masks for mouse messages */
#ifndef NOKEYSTATE
#define MK_LBUTTON	0x0001
#define MK_RBUTTON	0x0002
#define MK_SHIFT	0x0004
#define MK_CONTROL	0x0008
#define MK_MBUTTON	0x0010
#endif

#ifndef NOWINSTYLES
/* Window styles */
#define WS_TILED	0x00000000L
#define WS_OVERLAPPED	WS_TILED
#define WS_ICONICPOPUP	0xc0000000L
#define WS_POPUP	0x80000000L
#define WS_CHILD	0x40000000L
#define WS_MINIMIZE	0x20000000L
#define WS_VISIBLE	0x10000000L
#define WS_DISABLED	0x08000000L
#define WS_CLIPSIBLINGS 0x04000000L
#define WS_CLIPCHILDREN 0x02000000L
#define WS_MAXIMIZE	0x01000000L

#define WS_BORDER	0x00800000L
#define WS_CAPTION	0x00c00000L
#define WS_DLGFRAME	0x00400000L

⌨️ 快捷键说明

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