; извлечения из WINDOWS.INC (c) Borland Intl.

RECT	struc
	rcLeft	dw	?
	rcTop	dw	?
	rcRight	dw	?
	rcBottom	dw	?
RECT	ends


WNDCLASS struc
	clsStyle	dw	?	; class style
	clsLpfnWndProc	dd	?
	clsCbClsExtra	dw	?
	clsCbWndExtra	dw	?
	clsHInstance	dw	?	; instance handle
	clsHIcon	dw	?	; class icon handle
	clsHCursor	dw	?	; class cursor handle
	clsHbrBackground dw	?	; class background brush
	clsLpszMenuName dd	?	; menu name
	clsLpszClassName dd	?	; far ptr to class name
WNDCLASS ends
;
; Special CreateWindow position value
;
CW_USEDEFAULT	EQU	8000h
WM_STATE	= 0000H

WM_NULL	= 0000h
WM_CREATE	= 0001h
WM_DESTROY	= 0002h
WM_MOVE	= 0003h
WM_SIZE	= 0005h
WM_ACTIVATE	= 0006h
WM_SETFOCUS	= 0007h
WM_KILLFOCUS	= 0008h
WM_ENABLE	= 000Ah
WM_SETREDRAW	= 000Bh
WM_SETTEXT	= 000Ch
WM_GETTEXT	= 000Dh
WM_GETTEXTLENGTH	= 000Eh
WM_PAINT	= 000Fh
WM_CLOSE	= 0010h
WM_QUERYENDSESSION	= 0011h
WM_QUIT	= 0012h
WM_QUERYOPEN	= 0013h
WM_ERASEBKGND	= 0014h
WM_SYSCOLORCHANGE	= 0015h
WM_ENDSESSION	= 0016h
WM_SYSTEMERROR	= 0017h
WM_SHOWWINDOW	= 0018h
WM_CTLCOLOR	= 0019h
WM_WININICHANGE	= 001Ah
WM_DEVMODECHANGE	= 001Bh
WM_ACTIVATEAPP	= 001Ch
WM_FONTCHANGE	= 001Dh
WM_TIMECHANGE	= 001Eh
WM_CANCELMODE	= 001Fh
WM_SETCURSOR	= 0020h
WM_MOUSEACTIVATE	= 0021h
WM_CHILDACTIVATE	= 0022h
WM_QUEUESYNC	= 0023h
WM_GETMINMAXINFO	= 0024h
WM_PAINTICON	= 0026h
WM_ICONERASEBKGND	= 0027h
WM_NEXTDLGCTL	= 0028h
WM_SPOOLERSTATUS	= 002Ah
WM_DRAWITEM	= 002Bh
WM_MEASUREITEM	= 002Ch
WM_DELETEITEM	= 002Dh
WM_VKEYTOITEM	= 002Eh
WM_CHARTOITEM	= 002Fh
WM_SETFONT	= 0030h
WM_GETFONT	= 0031h
WM_QUERYDRAGICON	= 0037h
WM_COMPAREITEM	= 0039h
WM_COMPACTING	= 0041h
IFNDEF NOWIN31
WM_COMMNOTIFY	= 0044h
WM_WINDOWPOSCHANGING= 0046h
WM_WINDOWPOSCHANGED = 0047h
WM_POWER	= 0048h
ENDIF


WM_NCCREATE	= 0081h
WM_NCDESTROY	= 0082h
WM_NCCALCSIZE	= 0083h
WM_NCHITTEST	= 0084h
WM_NCPAINT	= 0085h
WM_NCACTIVATE	= 0086h
WM_GETDLGCODE	= 0087h
WM_NCMOUSEMOVE	= 00A0h
WM_NCLBUTTONDOWN	= 00A1h
WM_NCLBUTTONUP	= 00A2h
WM_NCLBUTTONDBLCLK	= 00A3h
WM_NCRBUTTONDOWN	= 00A4h
WM_NCRBUTTONUP	= 00A5h
WM_NCRBUTTONDBLCLK	= 00A6h
WM_NCMBUTTONDOWN	= 00A7h
WM_NCMBUTTONUP	= 00A8h
WM_NCMBUTTONDBLCLK	= 00A9h

WM_KEYFIRST	= 0100h
WM_KEYDOWN	= 0100h
WM_KEYUP	= 0101h
WM_CHAR	= 0102h
WM_DEADCHAR	= 0103h
WM_SYSKEYDOWN	= 0104h
WM_SYSKEYUP	= 0105h
WM_SYSCHAR	= 0106h
WM_SYSDEADCHAR	= 0107h
WM_KEYLAST	= 0108h

WM_INITDIALOG	= 0110h
WM_COMMAND	= 0111h
WM_SYSCOMMAND	= 0112h
WM_TIMER	= 0113h
WM_HSCROLL	= 0114h
WM_VSCROLL	= 0115h
WM_INITMENU	= 0116h
WM_INITMENUPOPUP	= 0117h
WM_MENUSELECT	= 011Fh
WM_MENUCHAR	= 0120h
WM_ENTERIDLE	= 0121h


WM_MOUSEFIRST	= 0200h
WM_MOUSEMOVE	= 0200h
WM_LBUTTONDOWN	= 0201h
WM_LBUTTONUP	= 0202h
WM_LBUTTONDBLCLK	= 0203h
WM_RBUTTONDOWN	= 0204h
WM_RBUTTONUP	= 0205h
WM_RBUTTONDBLCLK	= 0206h
WM_MBUTTONDOWN	= 0207h
WM_MBUTTONUP	= 0208h
WM_MBUTTONDBLCLK	= 0209h
WM_MOUSELAST	= 0209h

WM_PARENTNOTIFY	= 0210h
WM_MDICREATE	= 0220h
WM_MDIDESTROY	= 0221h
WM_MDIACTIVATE	= 0222h
WM_MDIRESTORE	= 0223h
WM_MDINEXT	= 0224h
WM_MDIMAXIMIZE	= 0225h
WM_MDITILE	= 0226h
WM_MDICASCADE	= 0227h
WM_MDIICONARRANGE	= 0228h
WM_MDIGETACTIVE	= 0229h
WM_MDISETMENU	= 0230h
WM_DROPFILES	= 0233h


WM_CUT	= 0300h
WM_COPY	= 0301h
WM_PASTE	= 0302h
WM_CLEAR	= 0303h
WM_UNDO	= 0304h
WM_RENDERFORMAT	= 0305h
WM_RENDERALLFORMATS = 0306h
WM_DESTROYCLIPBOARD = 0307h
WM_DRAWCLIPBOARD	= 0308h
WM_PAINTCLIPBOARD	= 0309h
WM_VSCROLLCLIPBOARD = 030Ah
WM_SIZECLIPBOARD	= 030Bh
WM_ASKCBFORMATNAME	= 030Ch
WM_CHANGECBCHAIN	= 030Dh
WM_HSCROLLCLIPBOARD = 030Eh
WM_QUERYNEWPALETTE	= 030Fh
WM_PALETTEISCHANGING = 0310h
WM_PALETTECHANGED	= 0311h

IFNDEF NOWIN31
WM_PENWINFIRST	equ 0380h
WM_PENWINLAST	equ 038Fh


WM_COALESCE_FIRST	equ 0390h
WM_COALESCE_LAST	equ 039Fh

ENDIF

PAINTSTRUCT STRUC
	PShdc	DW ?
	PSfErase	DW ?
	PSrcPaint	DB size RECT dup(?)
	PSfRestore	DW ?
	PSfIncUpdate	DW ?
	PSrgbReserved DB 16 dup(?)
PAINTSTRUCT ENDS

;
;	Message structure
;
MSGSTRUCT	struc
msHWND	dw	?
msMESSAGE	dw	?
msWPARAM	dw	?
msLPARAM	dd	?
msTIME	dd	?
msPT	dd	?
MSGSTRUCT	ends

; Class styles
;
CS_VREDRAW	= 0001h
CS_HREDRAW	= 0002h
CS_KEYCVTWINDOW	= 0004H
CS_DBLCLKS	= 0008h
;		0010h reserved
CS_OWNDC	= 0020h
CS_CLASSDC	= 0040h
CS_PARENTDC	= 0080h
CS_NOKEYCVT	= 0100h
CS_SAVEBITS	= 0800h
CS_NOCLOSE	= 0200h
CS_BYTEALIGNCLIENT = 1000h
CS_BYTEALIGNWINDOW = 2000h
CS_GLOBALCLASS	= 4000h	; Global window class

;	Predefined cursor & icon IDs
;
IDC_ARROW	= 32512
IDC_IBEAM	= 32513
IDC_WAIT	= 32514
IDC_CROSS	= 32515
IDC_UPARROW	= 32516
IDC_SIZE	= 32640
IDC_ICON	= 32641
IDC_SIZENWSE	= 32642
IDC_SIZENESW	= 32643
IDC_SIZEWE	= 32644
IDC_SIZENS	= 32645

IDI_APPLICATION = 32512
IDI_HAND	= 32513
IDI_QUESTION	= 32514
IDI_EXCLAMATION = 32515
IDI_ASTERISK	= 32516

MB_ICONHAND	= 0010H
MB_ICONQUESTION	= 0020H
MB_ICONEXCLAMATION	= 0030H
MB_ICONASTERISK	= 0040H


; Windows styles (the high words)
;
WS_OVERLAPPED	= 00000h
WS_ICONICPOPUP	= 0C000h
WS_POPUP	= 08000h
WS_CHILD	= 04000h
WS_MINIMIZE	= 02000h
WS_VISIBLE	= 01000h
WS_DISABLED	= 00800h
WS_CLIPSIBLINGS = 00400h
WS_CLIPCHILDREN = 00200h
WS_MAXIMIZE	= 00100h
WS_CAPTION	= 000C0h	; WS_BORDER | WS_DLGFRAME
WS_BORDER	= 00080h
WS_DLGFRAME	= 00040h
WS_VSCROLL	= 00020h
WS_HSCROLL	= 00010h
WS_SYSMENU	= 00008h
WS_THICKFRAME	= 00004h
WS_HREDRAW	= 00002h
WS_VREDRAW	= 00001h
WS_GROUP	= 00002h
WS_TABSTOP	= 00001h
WS_MINIMIZEBOX	= 00002h
WS_MAXIMIZEBOX	= 00001h

; Common Window Styles

WS_OVERLAPPEDWINDOW = WS_OVERLAPPED + WS_CAPTION + WS_SYSMENU + WS_THICKFRAME + WS_MINIMIZEBOX + WS_MAXIMIZEBOX
WS_POPUPWINDOW	= WS_POPUP + WS_BORDER + WS_SYSMENU
WS_CHILDWINDOW	= WS_CHILD
WS_TILEDWINDOW	= WS_OVERLAPPEDWINDOW

WS_TILED	= WS_OVERLAPPED
WS_ICONIC	= WS_MINIMIZE
WS_SIZEBOX	= WS_THICKFRAME

;	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


;	MessageBox type flags
;

MB_OK		= 0000H
MB_OKCANCEL	= 0001H
MB_ABORTRETRYIGNORE	= 0002H
MB_YESNOCANCEL	= 0003H
MB_YESNO		= 0004H
MB_RETRYCANCEL	= 0005H

MB_ICONHAND	= 0010H
MB_ICONQUESTION	= 0020H
MB_ICONEXCLAMATION	= 0030H
MB_ICONASTERISK	= 0040H

MB_DEFBUTTON1	= 0000H
MB_DEFBUTTON2	= 0100H
MB_DEFBUTTON3	= 0200H

MB_APPLMODAL	= 0000H
MB_SYSTEMMODAL	= 1000H
MB_TASKMODAL	= 2000H

MB_NOFOCUS	= 8000H
tagOFN              STRUC
lStructSize         DD      ?
hwndOwner           DW      ?
hInstanc            DW      ?
lpstrFilter         DD      FAR PTR ?
lpstrCustomFilter   DD      FAR PTR ?
nMaxCustFilter      DD      ?
nFilterIndex        DD      ?
lpstrFile           DD      FAR PTR ?
nMaxFile            DD      ?
lpstrFileTitle      DD      FAR PTR ?
nMaxFileTitle       DD      ?
lpstrInitialDir     DD      FAR PTR ?
lpstrTitle          DD      FAR PTR ?
Flags               DD      ?
nFileOffset         DW      ?
nFileExtension      DW      ?
lpstrDefExt         DD      FAR PTR ?
lCustData           DD      ?
lpfnHook            DD      FAR PTR ?
lpTemplateName      DD      FAR PTR ?

tagOFN              ENDS

OPENFILENAME    TYPEDEF tagOFN
