📄 windows.inc
字号:
; Button Control Messages
BM_GETCHECK = (WM_USER+0)
BM_SETCHECK = (WM_USER+1)
BM_GETSTATE = (WM_USER+2)
BM_SETSTATE = (WM_USER+3)
BM_SETSTYLE = (WM_USER+4)
ENDIF
; NOWINMESSAGES
; Button Control Styles (low word)
BS_PUSHBUTTON = 00h
BS_DEFPUSHBUTTON = 01h
BS_CHECKBOX = 02h
BS_AUTOCHECKBOX = 03h
BS_RADIOBUTTON = 04h
BS_3STATE = 05h
BS_AUTO3STATE = 06h
BS_GROUPBOX = 07h
BS_USERBUTTON = 08h
BS_AUTORADIOBUTTON = 09h
BS_OWNERDRAW = 0Bh
BS_LEFTTEXT = 20h
; User Button Notification Codes
BN_CLICKED = 0
BN_PAINT = 1
BN_HILITE = 2
BN_UNHILITE = 3
BN_DISABLE = 4
BN_DOUBLECLICKED = 5
; Dialog Styles (low words)
DS_ABSALIGN = 01h
DS_SYSMODAL = 02h
DS_LOCALEDIT = 20h ;/* Edit items get Local storage. */
DS_SETFONT = 40h ;/* User specified font for Dlg controls */
DS_MODALFRAME = 80h ;/* Can be combined with WS_CAPTION */
DS_NOIDLEMSG = 100h ;/* WM_ENTERIDLE message will not be sent */
IFNDEF NOWINMESSAGES
; Dialog box messages
DM_GETDEFID = (WM_USER+0)
DM_SETDEFID = (WM_USER+1)
ENDIF ;NOWINMESSAGES
; Dialog Codes
DLGC_WANTARROWS = 0001h ; /* Control wants arrow keys */
DLGC_WANTTAB = 0002h ; /* Control wants tab keys */
DLGC_WANTALLKEYS = 0004h ; /* Control wants all keys */
DLGC_WANTMESSAGE = 0004h ; /* Pass message to control */
DLGC_HASSETSEL = 0008h ; /* Understands EM_SETSEL message */
DLGC_DEFPUSHBUTTON = 0010h ; /* Default pushbutton */
DLGC_UNDEFPUSHBUTTON= 0020h ; /* Non-default pushbutton */
DLGC_RADIOBUTTON = 0040h ; /* Radio button */
DLGC_WANTCHARS = 0080h ; /* Want WM_CHAR messages */
DLGC_STATIC = 0100h ; /* Static item: don't include */
DLGC_BUTTON = 2000h ; /* Button item: can be checked */
; Combo Box return Values
CB_OKAY = 0
CB_ERR = (-1)
CB_ERRSPACE = (-2)
; Combo Box Notification Codes
CBN_ERRSPACE = (-1)
CBN_SELCHANGE = 1
CBN_DBLCLK = 2
CBN_SETFOCUS = 3
CBN_KILLFOCUS = 4
CBN_EDITCHANGE = 5
CBN_EDITUPDATE = 6
CBN_DROPDOWN = 7
; Combo Box styles (low words)
CBS_SIMPLE = 0001h
CBS_DROPDOWN = 0002h
CBS_DROPDOWNLIST = 0003h
CBS_OWNERDRAWFIXED = 0010h
CBS_OWNERDRAWVARIABLE= 0020h
CBS_AUTOHSCROLL = 0040h
CBS_OEMCONVERT = 0080h
CBS_SORT = 0100h
CBS_HASSTRINGS = 0200h
CBS_NOINTEGRALHEIGHT = 0400h
IFNDEF NOWINMESSAGES
; Combo Box messages
CB_GETEDITSEL = (WM_USER+0)
CB_LIMITTEXT = (WM_USER+1)
CB_SETEDITSEL = (WM_USER+2)
CB_ADDSTRING = (WM_USER+3)
CB_DELETESTRING = (WM_USER+4)
CB_DIR = (WM_USER+5)
CB_GETCOUNT = (WM_USER+6)
CB_GETCURSEL = (WM_USER+7)
CB_GETLBTEXT = (WM_USER+8)
CB_GETLBTEXTLEN = (WM_USER+9)
CB_INSERTSTRING = (WM_USER+10)
CB_RESETCONTENT = (WM_USER+11)
CB_FINDSTRING = (WM_USER+12)
CB_SELECTSTRING = (WM_USER+13)
CB_SETCURSEL = (WM_USER+14)
CB_SHOWDROPDOWN = (WM_USER+15)
CB_GETITEMDATA = (WM_USER+16)
CB_SETITEMDATA = (WM_USER+17)
IFNDEF NOWIN31
CB_GETDROPPEDCONTROLRECT = (WM_USER+18)
CB_SETITEMHEIGHT = (WM_USER+19)
CB_GETITEMHEIGHT = (WM_USER+20)
CB_SETEXTENDEDUI = (WM_USER+21)
CB_GETEXTENDEDUI = (WM_USER+22)
CB_GETDROPPEDSTATE = (WM_USER+23)
CB_FINDSTRINGEXACT = (WM_USER+24)
ENDIF
ENDIF ; NOWINMESSAGES
; Static Control styles (low word)
SS_LEFT = 00h
SS_CENTER = 01h
SS_RIGHT = 02h
SS_ICON = 03h
SS_BLACKRECT = 04h
SS_GRAYRECT = 05h
SS_WHITERECT = 06h
SS_BLACKFRAME = 07h
SS_GRAYFRAME = 08h
SS_WHITEFRAME = 09h
SS_SIMPLE = 0Bh
SS_LEFTNOWORDWRAP = 0Ch
SS_NOPREFIX = 80h ; Don't do "&" character translation
IFNDEF NOWIN31
IFNDEF NOWINMESSAGES
;Static Control Messages
STM_SETICON = (WM_USER+0)
STM_GETICON = (WM_USER+1)
ENDIF
ENDIF
; Scroll Bar Styles (low word)
SBS_HORZ = 0000h
SBS_VERT = 0001h
SBS_TOPALIGN = 0002h
SBS_LEFTALIGN = 0002h
SBS_BOTTOMALIGN = 0004h
SBS_RIGHTALIGN = 0004h
SBS_SIZEBOXTOPLEFTALIGN = 0002h
SBS_SIZEBOXBOTTOMRIGHTALIGN = 0004h
SBS_SIZEBOX = 0008h
IFNDEF NOSYSMETRICS
; GetSystemMetrics() codes
SM_CXSCREEN = 0
SM_CYSCREEN = 1
SM_CXVSCROLL = 2
SM_CYHSCROLL = 3
SM_CYCAPTION = 4
SM_CXBORDER = 5
SM_CYBORDER = 6
SM_CXDLGFRAME = 7
SM_CYDLGFRAME = 8
SM_CYVTHUMB = 9
SM_CXHTHUMB = 10
SM_CXICON = 11
SM_CYICON = 12
SM_CXCURSOR = 13
SM_CYCURSOR = 14
SM_CYMENU = 15
SM_CXFULLSCREEN = 16
SM_CYFULLSCREEN = 17
SM_CYKANJIWINDOW = 18
SM_MOUSEPRESENT = 19
SM_CYVSCROLL = 20
SM_CXHSCROLL = 21
SM_DEBUG = 22
SM_SWAPBUTTON = 23
SM_RESERVED1 = 24
SM_RESERVED2 = 25
SM_RESERVED3 = 26
SM_RESERVED4 = 27
SM_CXMIN = 28
SM_CYMIN = 29
SM_CXSIZE = 30
SM_CYSIZE = 31
SM_CXFRAME = 32
SM_CYFRAME = 33
SM_CXMINTRACK = 34
SM_CYMINTRACK = 35
IFNDEF NOWIN31
SM_CXDOUBLECLK = 36
SM_CYDOUBLECLK = 37
SM_CXICONSPACING = 38
SM_CYICONSPACING = 39
SM_MENUDROPALIGNMENT = 40
SM_PENWINDOWS = 41
SM_DBCSENABLED = 42
ENDIF
SM_CMETRICSMAX = 43
ENDIF ;NOSYSMETRICS
IFNDEF NOCOLOR
COLOR_SCROLLBAR = 0
COLOR_BACKGROUND = 1
COLOR_ACTIVECAPTION = 2
COLOR_INACTIVECAPTION = 3
COLOR_MENU = 4
COLOR_WINDOW = 5
COLOR_WINDOWFRAME = 6
COLOR_MENUTEXT = 7
COLOR_WINDOWTEXT = 8
COLOR_CAPTIONTEXT = 9
COLOR_ACTIVEBORDER = 10
COLOR_INACTIVEBORDER = 11
COLOR_APPWORKSPACE = 12
COLOR_HIGHLIGHT = 13
COLOR_HIGHLIGHTTEXT = 14
COLOR_BTNFACE = 15
COLOR_BTNSHADOW = 16
COLOR_GRAYTEXT = 17
COLOR_BTNTEXT = 18
IFNDEF NOWIN31
COLOR_INACTIVECAPTIONTEXT = 19
COLOR_BTNHILIGHT = 20
ENDIF
ENDIF ;NOCOLOR
; Commands to pass WinHelp()
HELP_CONTEXT =0001h ;/* Display topic in ulTopic */
HELP_QUIT =0002h ;/* Terminate help */
HELP_INDEX =0003h ;/* Display index */
HELP_HELPONHELP =0004h ;/* Display help on using help */
HELP_SETINDEX =0005h ;/* Set the current Index for multi index help */
HELP_KEY =0101h ;/* Display topic for keyword in offabData */
IFNDEF NOCOMM
NOPARITY = 0
ODDPARITY = 1
EVENPARITY = 2
MARKPARITY = 3
SPACEPARITY = 4
ONESTOPBIT = 0
ONE5STOPBITS = 1
TWOSTOPBITS = 2
IGNORE = 0 ; /* Ignore signal */
INFINITE = 0FFFFh ; /* Infinite timeout */
; Error Flags
CE_RXOVER = 0001h ; /* Receive Queue overflow */
CE_OVERRUN = 0002h ; /* Receive Overrun Error */
CE_RXPARITY = 0004h ; /* Receive Parity Error */
CE_FRAME = 0008h ; /* Receive Framing error */
CE_BREAK = 0010h ; /* Break Detected */
CE_CTSTO = 0020h ; /* CTS Timeout */
CE_DSRTO = 0040h ; /* DSR Timeout */
CE_RLSDTO = 0080h ; /* RLSD Timeout */
CE_TXFULL = 0100h ; /* TX Queue is full */
CE_PTO = 0200h ; /* LPTx Timeout */
CE_IOE = 0400h ; /* LPTx I/O Error */
CE_DNS = 0800h ; /* LPTx Device not selected */
CE_OOP = 1000h ; /* LPTx Out-Of-Paper */
CE_MODE = 8000h ; /* Requested mode unsupported */
IE_BADID = (-1) ; /* Invalid or unsupported id */
IE_OPEN = (-2) ; /* Device Already Open */
IE_NOPEN = (-3) ; /* Device Not Open */
IE_MEMORY = (-4) ; /* Unable to allocate queues */
IE_DEFAULT = (-5) ; /* Error in default parameters */
IE_HARDWARE = (-10) ; /* Hardware Not Present */
IE_BYTESIZE = (-11) ; /* Illegal Byte Size */
IE_BAUDRATE = (-12) ; /* Unsupported BaudRate */
; Events
EV_RXCHAR = 0001h ; /* Any Character received */
EV_RXFLAG = 0002h ; /* Received certain character */
EV_TXEMPTY = 0004h ; /* Transmitt Queue Empty */
EV_CTS = 0008h ; /* CTS changed state */
EV_DSR = 0010h ; /* DSR changed state */
EV_RLSD = 0020h ; /* RLSD changed state */
EV_BREAK = 0040h ; /* BREAK received */
EV_ERR = 0080h ; /* Line status error occurred */
EV_RING = 0100h ; /* Ring signal detected */
EV_PERR = 0200h ; /* Printer error occured */
EV_CTSS = 0400h ; /* CTS state */
EV_DSRS = 0800h ; /* DSR state */
EV_RLSDS = 1000h ; /* RLSD state */
EV_RingTe = 2000h ; /* Ring Trailing Edge Indicator */
; Escape Functions
SETXOFF = 1 ; /* Simulate XOFF received */
SETXON = 2 ; /* Simulate XON received */
SETRTS = 3 ; /* Set RTS high */
CLRRTS = 4 ; /* Set RTS low */
SETDTR = 5 ; /* Set DTR high */
CLRDTR = 6 ; /* Set DTR low */
RESETDEV = 7 ; /* Reset device if possible */
LPTx = 80h ; /* Set if ID is for LPT device */
IFNDEF NOWIN31
; new escape functions
GETMAXLPT equ 8 ; Max supported LPT id
GETMAXCOM equ 9 ; Max supported COM id
GETBASEIRQ equ 10 ; Get port base & irq for a port
; Comm Baud Rate indices
CBR_110 equ 0FF10h
CBR_300 equ 0FF11h
CBR_600 equ 0FF12h
CBR_1200 equ 0FF13h
CBR_2400 equ 0FF14h
CBR_4800 equ 0FF15h
CBR_9600 equ 0FF16h
CBR_14400 equ 0FF17h
CBR_19200 equ 0FF18h
; 0FF19h (reserved)
; 0FF1Ah (reserved)
CBR_38400 equ 0FF1Bh
; 0FF1Ch (reserved)
; 0FF1Dh (reserved)
; 0FF1Eh (reserved)
CBR_56000 equ 0FF1Fh
; 0FF20h (reserved)
; 0FF21h (reserved)
; 0FF22h (reserved)
CBR_128000 equ 0FF23h
; 0FF24h (reserved)
; 0FF25h (reserved)
; 0FF26h (reserved)
CBR_256000 equ 0FF27h
; notifications passed in low word of lParam on WM_COMMNOTIFY messages
CN_RECEIVE equ 1 ; bytes are available in the input queue
CN_TRANSMIT equ 2 ; fewer than wOutTrigger bytes still
; remain in the output queue waiting
; to be transmitted.
CN_EVENT equ 4 ; an enabled event has occurred
ENDIF
DCB struc
DCB_Id db ? ; /* Internal Device ID */
DCB_BaudRate dw ? ; /* Baudrate at which runing */
DCB_ByteSize db ? ; /* Number of bits/byte, 4-8 */
DCB_Parity db ? ; /* 0-4=None,Odd,Even,Mark,Space */
DCB_StopBits db ? ; /* 0,1,2 = 1, 1.5, 2 */
DCB_RlsTimeout dw ? ; /* Timeout for RLSD to be set */
DCB_CtsTimeout dw ? ; /* Timeout for CTS to be set */
DCB_DsrTimeout dw ? ; /* Timeout for DSR to be set */
DCB_BitMask1 db ?
; BYTE fBinary: 1; /* Binary Mode (skip EOF check */
; BYTE fRtsDisable:1; /* Don't assert RTS at init time */
; BYTE fParity: 1; /* Enable parity checking */
; BYTE fOutxCtsFlow:1; /* CTS handshaking on output */
; BYTE fOutxDsrFlow:1; /* DSR handshaking on output */
; BYTE fDummy: 2; /* Reserved */
; BYTE fDtrDisable:1; /* Don't assert DTR at init time */
DCB_BitMask2 db ?
; BYTE fOutX: 1; /* Enable output X-ON/X-OFF */
; BYTE fInX: 1; /* Enable input X-ON/X-OFF */
; BYTE fPeChar: 1; /* Enable Parity Err Replacement */
; BYTE fNull: 1; /* Enable Null stripping */
; BYTE fChEvt: 1; /* Enable Rx character event. */
; BYTE fDtrflow: 1; /* DTR handshake on input */
; BYTE fRtsflow: 1; /* RTS handshake on input */
; BYTE fDummy2: 1;
DCB_XonChar db ? ; /* Tx and Rx X-ON character */
DCB_XoffChar db ? ; /* Tx and Rx X-OFF character */
DCB_XonLim dw ? ; /* Transmit X-ON threshold */
DCB_XoffLim dw ? ; /* Transmit X-OFF threshold */
DCB_PeChar db ? ; /* Parity error replacement char */
DCB_EofChar db ? ; /* End of Input character */
DCB_EvtChar db ? ; /* Recieved Event character */
DCB_TxDelay dw ? ; /* Amount of time between chars */
DCB ends
COMSTAT struc
COMS_BitMask1 db ?
; BYTE fCtsHold: 1; /* Transmit is on CTS hold */
; BYTE fDsrHold: 1; /* Transmit is on DSR hold */
; BYTE fRlsdHold: 1; /* Transmit is on RLSD hold */
; BYTE fXoffHold: 1; /* Received handshake */
; BYTE fXoffSent: 1; /* Issued handshake */
; BYTE fEof: 1; /* End of file character found */
; BYTE fTxim: 1; /* Character being transmitted */
COMS_cbInQue dw ? ; /* count of characters in Rx Queue */
COMS_cbOutQue dw ? ; /* count of characters in Tx Queue */
COMSTAT ends
ENDIF ;NOCOM
;
; Installable Driver Support
;
; Driver Messages
DRV_LOAD = 0001h
DRV_ENABLE = 0002h
DRV_OPEN = 0003h
DRV_CLOSE = 0004h
DRV_DISABLE = 0005h
DRV_FREE = 0006h
DRV_CONFIGURE = 0007h
DRV_QUERYCONFIGURE = 0008h
DRV_INSTALL = 0009h
DRV_REMOVE = 000Ah
DRV_EXITSESSION = 000Bh
DRV_POWER = 000Fh
DRV_RESERVED = 0800h
DRV_USER = 4000h
;LPARAM of DRV_CONFIGURE message and return values
DRVCONFIGINFO struc
DRVCNF_dwDCISize dw ?
DRVCNF_lpszDCISectionName dd ?
DRVCNF_lpszDCIAliasName dd ?
DRVCONFIGINFO ends
DRVCNF_CANCEL = 0000h
DRVCNF_OK = 0001h
DRVCNF_RESTART = 0002h
IFNDEF NOKERNEL
;
; Common Kernel errors
;
ERR_GALLOC = 01030h ; GlobalAlloc Failed
ERR_GREALLOC = 01031h ; GlobalReAlloc Failed
ERR_GLOCK = 01032h ; GlobalLock Failed
ERR_LALLOC = 01033h ; LocalAlloc Failed
ERR_LREALLOC = 01034h ; LocalReAlloc Failed
ERR_LLOCK = 01035h ; LocalLock Failed
ERR_ALLOCRES = 01036h ; AllocResource Failed
ERR_LOCKRES = 01037h ; LockResource Failed
ERR_LOADMODULE = 01038h ; LoadModule failed
;
; Common User Errors
;
ERR_CREATEDLG = 01045h ; /* Create Dlg failure due to LoadMenu failure */
ERR_CREATEDLG2 = 01046h ; /* Create Dlg failure
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -