📄 windows.inc
字号:
;*************************************************************************
;
; WINDOWS.INC - Windows assembly language structures & constants
;
;*************************************************************************
;
; ========== With Zopuh's corrections ===========
;
FALSE = 0
TRUE = 1
NULL = 0
ERROR_SUCCESS = 0h
HFILE_ERROR = 0FFFFFFFFh
SEC equ <*1000>
POINTER equ <DWORD>
MSG equ <MSGSTRUCT>
HINSTANCE equ <DWORD>
HANDLE equ <DWORD>
HWINDOW equ <DWORD>
HWND equ <DWORD>
HDC equ <DWORD>
HICON equ <DWORD>
HFONT equ <DWORD>
HMENU equ <DWORD>
HFILE equ <DWORD>
MAX_PATH = 144 ;/* max. length of full pathname */
MAX_DRIVE = 3 ;/* max. length of drive component */
MAX_DIR = 130 ;/* max. length of path component */
MAX_FNAME = 9 ;/* max. length of file name component */
MAX_EXT = 5 ;/* max. length of extension component */
FILETIME STRUCT
dwLowDateTime DWORD ?
dwHighDateTime DWORD ?
FILETIME ENDS
RECT STRUCT
rcLeft dd ?
rcTop dd ?
rcRight dd ?
rcBottom dd ?
RECT ENDS
WNDCLASS struc
clsStyle dd ? ; class style
clsLpfnWndProc dd ?
clsCbClsExtra dd ?
clsCbWndExtra dd ?
clsHInstance dd ? ; instance handle
clsHIcon dd ? ; class icon handle
clsHCursor dd ? ; class cursor handle
clsHbrBackground dd ? ; class background brush
clsLpszMenuName dd ? ; menu name
clsLpszClassName dd ? ; far ptr to class name
WNDCLASS ends
WNDCLASSEX STRUCT
cbSize DWORD ?
wStyle DWORD ?
lpfnWndProc DWORD ?
cbClsExtra DWORD ?
cbWndExtra DWORD ?
hInstance DWORD ?
hIcon DWORD ?
hCursor DWORD ?
hbrBackground DWORD ?
lpszMenuName DWORD ?
lpszClassName DWORD ?
hIconSm DWORD ?
WNDCLASSEX ENDS
WNDCLASSEXsize = 48
NOTIFYICONDATA STRUCT
nidSize DWORD ?
nidhWnd HWND ?
nidID DWORD ?
nidFlags DWORD ?
nidCallbackMessage DWORD ?
nidhIcon HICON ?
nidTip db 64 dup(?)
NOTIFYICONDATA ENDS
NOTIFYICONDATAsize = 6*4+64
SYSTEMTIME STRUCT
wYear WORD ?
wMonth WORD ?
wDayOfWeek WORD ?
wDay WORD ?
wHour WORD ?
wMinute WORD ?
wSecond WORD ?
wMilliseconds WORD ?
SYSTEMTIME ENDS
SYSTEMTIMEsize equ 2*8
MINMAXINFO struc
res_x dd ?
res_y dd ?
maxsize_x dd ?
maxsize_y dd ?
maxposition_x dd ?
maxposition_y dd ?
mintrackposition_x dd ?
mintrackposition_y dd ?
maxtrackposition_x dd ?
maxtrackposition_y dd ?
MINMAXINFO ends
OPENFILENAME STRUCT
ofnStructSize DWORD ?
ofnhwndOwner DWORD ?
ofnhInstance DWORD ?
ofnlpstrFilter DWORD ?
ofnlpstrCustomFilter DWORD ?
ofnMaxCustFilter DWORD ?
ofnFilterIndex DWORD ?
ofnlpstrFile DWORD ?
ofnMaxFile DWORD ?
ofnlpstrFileTitle DWORD ?
ofnMaxFileTitle DWORD ?
ofnlpstrInitialDir DWORD ?
ofnlpstrTitle DWORD ?
ofnFlags DWORD ?
ofnFileOffset WORD ?
ofnFileExtension WORD ?
ofnlpstrDefExt DWORD ?
ofnlCustData DWORD ?
ofnlpfnHook DWORD ?
ofnlpTemplateName DWORD ?
OPENFILENAME ENDS
OPENFILENAMEsize = 19*4
SCROLLINFO STRUCT
siSize DWORD ?
siMask DWORD ?
siMin DWORD ?
siMax DWORD ?
siPage DWORD ?
siPos DWORD ?
siTrackPos DWORD ?
SCROLLINFO ENDS
SCROLLINFOsize = 7*4
WIN32_FIND_DATA STRUCT
fdFileAttributes DWORD ?
fdCreationTime FILETIME ?
fdLastAccessTime FILETIME ?
fdLastWriteTime FILETIME ?
fdFileSizeHigh DWORD ?
fdFileSizeLow DWORD ?
fdReserved0 DWORD ?
fdReserved1 DWORD ?
fdFileName db MAX_PATH dup(?)
fdAlternateFileName db 14 dup(?)
WIN32_FIND_DATA ENDS
MEMORYSTATUS STRUCT
mLength DWORD ? ;// sizeof(MEMORYSTATUS)
mMemoryLoad DWORD ? ;// percent of memory in use
mTotalPhys DWORD ? ;// bytes of physical memory
mAvailPhys DWORD ? ;// free physical memory bytes
mTotalPageFile DWORD ? ;// bytes of paging file
mAvailPageFile DWORD ? ;// free bytes of paging file
mTotalVirtual DWORD ? ;// user bytes of address space
mAvailVirtual DWORD ? ;// free user bytes
MEMORYSTATUS ENDS
MEMORYSTATUSsize = 8*4
CHOOSECOLOR STRUCT
ccSize DWORD ?
cchwndOwner DWORD ?
cchInstance DWORD ?
ccRGB DWORD ?
ccCustColors DWORD ?
ccFlags DWORD ?
ccCustData DWORD ?
ccHook DWORD ?
ccTemplateName DWORD ?
CHOOSECOLOR ENDS
CHOOSECOLORsize = 9*4
CC_RGBINIT =00000001h
CC_FULLOPEN =00000002h
CC_PREVENTFULLOPEN =00000004h
CC_SHOWHELP =00000008h
CC_ENABLEHOOK =00000010h
CC_ENABLETEMPLATE =00000020h
CC_ENABLETEMPLATEHANDLE =00000040h
CC_SOLIDCOLOR =00000080h
CC_ANYCOLOR =00000100h
CHOOSEFONT STRUCT
cfSize DWORD ?
cfhwndOwner DWORD ?
cfhDC DWORD ?
cfLogFont DWORD ?
cfPointSize DWORD ?
cfFlags DWORD ?
cfrgbColors DWORD ?
cfCustData DWORD ?
cfpfnHook DWORD ?
cfTemplateName DWORD ?
cfhInstance DWORD ?
cfStyle DWORD ?
cfFontType WORD ?
cf___MISSING_ALIGNMENT__ WORD ?
cfSizeMin DWORD ?
cfSizeMax DWORD ?
CHOOSEFONT ENDS
CHOOSEFONTsize = 14*4 + 2*2
CF_SCREENFONTS = 00000001h
CF_PRINTERFONTS = 00000002h
CF_BOTH = CF_SCREENFONTS or CF_PRINTERFONTS
CF_SHOWHELP = 00000004h
CF_ENABLEHOOK = 00000008h
CF_ENABLETEMPLATE = 00000010h
CF_ENABLETEMPLATEHANDLE = 00000020h
CF_INITTOLOGFONTSTRUCT = 00000040h
CF_USESTYLE = 00000080h
CF_EFFECTS = 00000100h
CF_APPLY = 00000200h
CF_ANSIONLY = 00000400h
CF_NOVECTORFONTS = 00000800h
CF_NOOEMFONTS = CF_NOVECTORFONTS
CF_NOSIMULATIONS = 00001000h
CF_LIMITSIZE = 00002000h
CF_FIXEDPITCHONLY = 00004000h
CF_WYSIWYG = 00008000h ; must also have CF_SCREENFONTS & CF_PRINTERFONTS */
CF_FORCEFONTEXIST = 00010000h
CF_SCALABLEONLY = 00020000h
CF_TTONLY = 00040000h
CF_NOFACESEL = 00080000h
CF_NOSTYLESEL = 00100000h
CF_NOSIZESEL = 00200000h
FR_DOWN = 00000001h
FR_WHOLEWORD = 00000002h
FR_MATCHCASE = 00000004h
FR_FINDNEXT = 00000008h
FR_REPLACE = 00000010h
FR_REPLACEALL = 00000020h
FR_DIALOGTERM = 00000040h
FR_SHOWHELP = 00000080h
FR_ENABLEHOOK = 00000100h
FR_ENABLETEMPLATE = 00000200h
FR_NOUPDOWN = 00000400h
FR_NOMATCHCASE = 00000800h
FR_NOWHOLEWORD = 00001000h
FR_ENABLETEMPLATEHANDLE = 00002000h
FR_HIDEUPDOWN = 00004000h
FR_HIDEMATCHCASE = 00008000h
FR_HIDEWHOLEWORD = 00010000h
;////////////////////////////////////////////////////////////////////////
;// //
;// ACCESS TYPES //
;// //
;////////////////////////////////////////////////////////////////////////
; The following are masks for the predefined standard access types
DELETE = 00010000h
READ_CONTROL = 00020000h
WRITE_DAC = 00040000h
WRITE_OWNER = 00080000h
SYNCHRONIZE = 00100000h
STANDARD_RIGHTS_REQUIRED = 000F0000h
STANDARD_RIGHTS_READ = READ_CONTROL
STANDARD_RIGHTS_WRITE = READ_CONTROL
STANDARD_RIGHTS_EXECUTE = READ_CONTROL
STANDARD_RIGHTS_ALL = 001F0000h
SPECIFIC_RIGHTS_ALL = 0000FFFFh
MINIMIZEDMETRICS STRUCT
mmSize DWORD ?
mmWidth DWORD ?
mmHorzGap DWORD ?
mmVertGap DWORD ?
mmArrange DWORD ?
MINIMIZEDMETRICS ENDS
MINIMIZEDMETRICSsize = 4*5
TEXTMETRIC struc
tmHeight dw ?
tmAscent dw ?
tmDescent dw ?
tmIntLeading dw ?
tmExtLeading dw ?
tmAveCharWidth dw ?
tmMaxCharWidth dw ?
tmWeight dw ?
tmItalic db ?
tmUnderlined db ?
tmStruckOut db ?
tmFirstChar db ?
tmLastChar db ?
tmDefaultChar db ?
tmBreakChar db ?
tmPitch db ?
tmCharSet db ?
tmOverhang dw ?
tmAspectX dw ?
tmAspectY dw ?
TEXTMETRIC ends
LF_FACESIZE = 32
LF_FULLFACESIZE = 64
LOGFONT struc
lfHeight dd ?
lfWidth dd ?
lfEscapement dd ?
lfOrientation dd ?
lfWeight dd ?
lfItalic db ?
lfUnderline db ?
lfStrikeOut db ?
lfCharSet db ?
lfOutPrecision db ?
lfClipPrecision db ?
lfQuality db ?
lfPitchAndFamily db ?
lfFaceName db LF_FACESIZE dup(?)
LOGFONT ends
LOGFONTsize = 4*5 + 8 + LF_FACESIZE
NONCLIENTMETRICS STRUCT
cbSize dd ?
iBorderWidth dd ?
iScrollWidth dd ?
iScrollHeight dd ?
iCaptionWidth dd ?
iCaptionHeight dd ?
lfCaptionFont LOGFONT ?
iSmCaptionWidth dd ?
iSmCaptionHeight dd ?
lfSmCaptionFont LOGFONT ?
iMenuWidth dd ?
iMenuHeight dd ?
lfMenuFont LOGFONT ?
lfStatusFont LOGFONT ?
lfMessageFont LOGFONT ?
NONCLIENTMETRICS ENDS
ENUMLOGFONT STRUCT
elfLogFont LOGFONT ?
elfFullName db LF_FULLFACESIZE dup(?)
elfStyle db LF_FACESIZE dup(?)
ENUMLOGFONT ENDS
LOGBRUSH struc
lbStyle dw ?
lbColor dd ?
lbHatch dw ?
LOGBRUSH ends
;
; Text Drawing modes
;
TRANSPARENT = 1
OPAQUE = 2
;
; Mapping Modes
;
MM_TEXT = 1
MM_LOMETRIC = 2
MM_HIMETRIC = 3
MM_LOENGLISH = 4
MM_HIENGLISH = 5
MM_TWIPS = 6
MM_ISOTROPIC = 7
MM_ANISOTROPIC = 8
;
; Coordinate Modes
;
ABSOLUTE = 1
RELATIVE = 2
;
; Stock Logical Objects
;
WHITE_BRUSH = 0
LTGRAY_BRUSH = 1
GRAY_BRUSH = 2
DKGRAY_BRUSH = 3
BLACK_BRUSH = 4
NULL_BRUSH = 5
HOLLOW_BRUSH = 5
WHITE_PEN = 6
BLACK_PEN = 7
NULL_PEN = 8
DOT_MARKER = 9
OEM_FIXED_FONT = 10
ANSI_FIXED_FONT = 11
ANSI_VAR_FONT = 12
SYSTEM_FONT = 13
DEVICE_DEFAULT_FONT = 14
DEFAULT_PALETTE = 15
SYSTEM_FIXED_FONT = 16
;
; Brush Styles
;
BS_SOLID = 0
BS_NULL = 1
BS_HOLLOW = BS_NULL
BS_HATCHED = 2
BS_PATTERN = 3
BS_INDEXED = 4
BS_DIBPATTERN = 5
;
; Hatch Styles
;
HS_HORIZONTAL = 0 ; -----
HS_VERTICAL = 1 ; |||||
HS_FDIAGONAL = 2 ; \\\\\
HS_BDIAGONAL = 3 ; /////
HS_CROSS = 4 ; +++++
HS_DIAGCROSS = 5 ; xxxxx
;
; Pen Styles
;
PS_SOLID = 0
PS_DASH = 1 ; -------
PS_DOT = 2 ; .......
PS_DASHDOT = 3 ; _._._._
PS_DASHDOTDOT = 4 ; _.._.._
PS_NULL = 5
PS_INSIDEFRAME = 6
;
; Device Parameters for GetDeviceCaps()
;
DRIVERVERSION =0 ; Device driver version
TECHNOLOGY =2 ; Device classification
HORZSIZE =4 ; Horizontal size in millimeters
VERTSIZE =6 ; Vertical size in millimeters
HORZRES =8 ; Horizontal width in pixels
VERTRES =10 ; Vertical width in pixels
BITSPIXEL =12 ; Number of bits per pixel
PLANES =14 ; Number of planes
NUMBRUSHES =16 ; Number of brushes the device has
NUMPENS =18 ; Number of pens the device has
NUMMARKERS =20 ; Number of markers the device has
NUMFONTS =22 ; Number of fonts the device has
NUMCOLORS =24 ; Number of colors the device supports
PDEVICESIZE =26 ; Size required for device descriptor
CURVECAPS =28 ; Curve capabilities
LINECAPS =30 ; Line capabilities
POLYGONALCAPS =32 ; Polygonal capabilities
TEXTCAPS =34 ; Text capabilities
CLIPCAPS =36 ; Clipping capabilities
RASTERCAPS =38 ; Bitblt capabilities
ASPECTX =40 ; Length of the X leg
ASPECTY =42 ; Length of the Y leg
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -