home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BUG 4
/
BUGCD1997_05.BIN
/
aplic
/
clip4win
/
clip4win.exe
/
C4W30E.HUF
/
INCLUDE
/
WINDOWS.CH
< prev
next >
Wrap
Text File
|
1995-11-24
|
45KB
|
1,560 lines
////////////////////
//
// windows.ch
//
// Written by: John M. Skelton, 1992.
//
// Copyright (C) 1992 Skelton Software, Kendal Cottage, Hillam, Leeds, UK.
// All Rights Reserved.
//
////////////////////
// Borland Resource Workshop (BRW) already knows about Windows definitions,
// but not about special Clip-4-Win ones. There don't seem to be any
// that are needed, so here's a quick way to keep BRW happy...
#ifdef WORKSHOP_INVOKED
#ifndef C4W_WINDOWS_CH
#define C4W_WINDOWS_CH C_4_W
#endif // C4W_WINDOWS_CH
#endif // WORKSHOP_INVOKED
#ifndef C4W_WINDOWS_CH
#define C4W_WINDOWS_CH
#define MAKEINTRESOURCE(i) (i)
#ifdef WIN_WANT_ALL
// Low system memory notification message
#define WM_COMPACTING 65 /* 0x0041 */
#define WM_WININICHANGE 26 /* 0x001A */
#define WM_SYSCOLORCHANGE 21 /* 0x0015 */
/* Palette window messages */
#define WM_QUERYNEWPALETTE 783 /* 0x030F */
#define WM_PALETTEISCHANGING 784 /* 0x0310 */
#define WM_PALETTECHANGED 785 /* 0x0311 */
#define WM_FONTCHANGE 29 /* 0x001D */
/* Spooler status notification message */
#define WM_SPOOLERSTATUS 42 /* 0x002A */
#define WM_DEVMODECHANGE 27 /* 0x001B */
#define WM_TIMECHANGE 30 /* 0x001E */
#endif // WIN_WANT_ALL
#define WM_NULL 0 /* 0x0000 */
/* NOTE: All messages below 1024 are RESERVED by Windows */
#define WM_USER 1024 /* 0x0400 */
#ifdef WIN_WANT_ALL
/* PenWindows specific messages */
#define WM_PENWINFIRST 896 /* 0x0380 */
#define WM_PENWINLAST 911 /* 0x038F */
/* Coalescing messages */
#define WM_COALESCE_FIRST 912 /* 0x0390 */
#define WM_COALESCE_LAST 927 /* 0x039F */
/****** Power management ****************************************************/
#define WM_POWER 72 /* 0x0048 */
/****** Application termination *********************************************/
#define WM_QUERYENDSESSION 17 /* 0x0011 */
#define WM_ENDSESSION 22 /* 0x0016 */
#define WM_QUIT 18 /* 0x0012 */
#endif // WIN_WANT_ALL
#ifdef WIN_WANT_ALL
#define WM_SYSTEMERROR 23 /* 0x0017 */
#endif // WIN_WANT_ALL
/* Class styles */
#define CS_VREDRAW 1 /* 0x0001 */
#define CS_HREDRAW 2 /* 0x0002 */
#define CS_OWNDC 32 /* 0x0020 */
#define CS_CLASSDC 64 /* 0x0040 */
#define CS_PARENTDC 128 /* 0x0080 */
#define CS_SAVEBITS 2048 /* 0x0800 */
#define CS_DBLCLKS 8 /* 0x0008 */
#define CS_BYTEALIGNCLIENT 4096 /* 0x1000 */
#define CS_BYTEALIGNWINDOW 8192 /* 0x2000 */
#define CS_NOCLOSE 512 /* 0x0200 */
#define CS_KEYCVTWINDOW 4 /* 0x0004 */
#define CS_NOKEYCVT 256 /* 0x0100 */
#define CS_GLOBALCLASS 16384 /* 0x4000 */
/* Window Styles */
/* Basic window types */
#define WS_OVERLAPPED 0 /* 0x00000000L */
#define WS_POPUP 2147483648 /* 0x80000000L */
#define WS_CHILD 1073741824 /* 0x40000000L */
/* Clipping styles */
#define WS_CLIPSIBLINGS 67108864 /* 0x04000000L */
#define WS_CLIPCHILDREN 33554432 /* 0x02000000L */
/* Generic window states */
#define WS_VISIBLE 268435456 /* 0x10000000L */
#define WS_DISABLED 134217728 /* 0x08000000L */
/* Main window states */
#define WS_MINIMIZE 536870912 /* 0x20000000L */
#define WS_MAXIMIZE 16777216 /* 0x01000000L */
/* Main window styles */
#define WS_CAPTION 12582912 /* 0x00C00000L */ /* WS_BORDER | WS_DLGFRAME */
#define WS_BORDER 8388608 /* 0x00800000L */
#define WS_DLGFRAME 4194304 /* 0x00400000L */
#define WS_VSCROLL 2097152 /* 0x00200000L */
#define WS_HSCROLL 1048576 /* 0x00100000L */
#define WS_SYSMENU 524288 /* 0x00080000L */
#define WS_THICKFRAME 262144 /* 0x00040000L */
#define WS_MINIMIZEBOX 131072 /* 0x00020000L */
#define WS_MAXIMIZEBOX 65536 /* 0x00010000L */
/* Control window styles */
#define WS_GROUP 131072 /* 0x00020000L */
#define WS_TABSTOP 65536 /* 0x00010000L */
/* Common Window Styles */
#define WS_OVERLAPPEDWINDOW (WS_OVERLAPPED + WS_CAPTION + WS_SYSMENU + WS_THICKFRAME + WS_MINIMIZEBOX + WS_MAXIMIZEBOX)
#define WS_POPUPWINDOW (WS_POPUP + WS_BORDER + WS_SYSMENU)
#define WS_CHILDWINDOW (WS_CHILD)
#ifdef WIN_WANT_ALL
/* Extended Window Styles */
#define WS_EX_DLGMODALFRAME 1 /* 0x00000001L */
#define WS_EX_NOPARENTNOTIFY 4 /* 0x00000004L */
#define WS_EX_TOPMOST 8 /* 0x00000008L */
#define WS_EX_ACCEPTFILES 16 /* 0x00000010L */
#define WS_EX_TRANSPARENT 32 /* 0x00000020L */
/* Obsolete style names */
#define WS_TILED WS_OVERLAPPED
#define WS_ICONIC WS_MINIMIZE
#define WS_SIZEBOX WS_THICKFRAME
#define WS_TILEDWINDOW WS_OVERLAPPEDWINDOW
#endif // WIN_WANT_ALL
#define WM_CREATE 1 /* 0x0001 */
#ifdef WIN_WANT_ALL
#define WM_DESTROY 2 /* 0x0002 */
#endif // WIN_WANT_ALL
#ifdef WIN_WANT_ALL
#define WM_NCCREATE 129 /* 0x0081 */
#define WM_NCDESTROY 130 /* 0x0082 */
/* Obsolete ShowWindow() command names */
#define WM_SHOWWINDOW 24 /* 0x0018 */
/* Obsolete constant names */
#define WM_SETREDRAW 11 /* 0x000B */
#endif // WIN_WANT_ALL
/* Enabled state */
#ifdef WIN_WANT_ALL
#define WM_ENABLE 10 /* 0x000A */
/* Window text */
#define WM_SETTEXT 12 /* 0x000C */
#define WM_GETTEXT 13 /* 0x000D */
#define WM_GETTEXTLENGTH 14 /* 0x000E */
#endif // WIN_WANT_ALL
#ifdef WIN_WANT_ALL
#define WM_WINDOWPOSCHANGING 70 /* 0x0046 */
#define WM_WINDOWPOSCHANGED 71 /* 0x0047 */
/* WM_WINDOWPOSCHANGING/CHANGED struct pointed to by lParam */
#define WM_MOVE 3 /* 0x0003 */
#define WM_SIZE 5 /* 0x0005 */
// WM_SIZE message nwParam values:
#define SIZE_RESTORED 0
#define SIZE_MINIMIZED 1
#define SIZE_MAXIMIZED 2
#define SIZE_MAXSHOW 3
#define SIZE_MAXHIDE 4
#endif // WIN_WANT_ALL
#ifdef WIN_WANT_ALL
#define WM_QUERYOPEN 19 /* 0x0013 */
#endif // WIN_WANT_ALL
#define WM_CLOSE 16 /* 0x0010 */
#ifdef WIN_WANT_ALL
/* Struct pointed to by WM_GETMINMAXINFO lParam */
#define WM_GETMINMAXINFO 36 /* 0x0024 */
#endif // WIN_WANT_ALL
#define WM_PAINT 15 /* 0x000F */
#ifdef WIN_WANT_ALL
#define WM_ERASEBKGND 20 /* 0x0014 */
#define WM_ICONERASEBKGND 39 /* 0x0027 */
#endif // WIN_WANT_ALL
#ifdef WIN_WANT_ALL
#define WM_NCPAINT 133 /* 0x0085 */
#define WM_NCCALCSIZE 131 /* 0x0083 */
#define WM_NCHITTEST 132 /* 0x0084 */
#endif // WIN_WANT_ALL
// Drag-and-drop support:
#ifdef WIN_WANT_ALL
#define WM_QUERYDRAGICON 55 /* 0x0037 */
#define WM_DROPFILES 563 /* 0x0233 */
#endif // WIN_WANT_ALL
#ifdef WIN_WANT_ALL
/* WM_ACTIVATE state values */
#define WM_ACTIVATE 6 /* 0x0006 */
#define WM_ACTIVATEAPP 28 /* 0x001C */
#define WM_NCACTIVATE 134 /* 0x0086 */
#define WM_SETFOCUS 7 /* 0x0007 */
#define WM_KILLFOCUS 8 /* 0x0008 */
#define WM_KEYDOWN 256 /* 0x0100 */
#define WM_KEYUP 257 /* 0x0101 */
#define WM_CHAR 258 /* 0x0102 */
#define WM_DEADCHAR 259 /* 0x0103 */
#define WM_SYSKEYDOWN 260 /* 0x0104 */
#define WM_SYSKEYUP 261 /* 0x0105 */
#define WM_SYSCHAR 262 /* 0x0106 */
#define WM_SYSDEADCHAR 263 /* 0x0107 */
/* Keyboard message range */
#define WM_KEYFIRST 256 /* 0x0100 */
#define WM_KEYLAST 264 /* 0x0108 */
/* WM_KEYUP/DOWN/CHAR HIWORD(lParam) flags */
/* Virtual key codes */
/* 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' */
/* Mouse input messages */
#define WM_MOUSEMOVE 512 /* 0x0200 */
#define WM_LBUTTONDOWN 513 /* 0x0201 */
#define WM_LBUTTONUP 514 /* 0x0202 */
#define WM_LBUTTONDBLCLK 515 /* 0x0203 */
#define WM_RBUTTONDOWN 516 /* 0x0204 */
#define WM_RBUTTONUP 517 /* 0x0205 */
#define WM_RBUTTONDBLCLK 518 /* 0x0206 */
#define WM_MBUTTONDOWN 519 /* 0x0207 */
#define WM_MBUTTONUP 520 /* 0x0208 */
#define WM_MBUTTONDBLCLK 521 /* 0x0209 */
/* Mouse input message range */
#define WM_MOUSEFIRST 512 /* 0x0200 */
#define WM_MOUSELAST 521 /* 0x0209 */
#endif // WIN_WANT_ALL
/* Non-client mouse messages */
#ifdef WIN_WANT_ALL
#define WM_NCMOUSEMOVE 160 /* 0x00A0 */
#define WM_NCLBUTTONDOWN 161 /* 0x00A1 */
#define WM_NCLBUTTONUP 162 /* 0x00A2 */
#define WM_NCLBUTTONDBLCLK 163 /* 0x00A3 */
#define WM_NCRBUTTONDOWN 164 /* 0x00A4 */
#define WM_NCRBUTTONUP 165 /* 0x00A5 */
#define WM_NCRBUTTONDBLCLK 166 /* 0x00A6 */
#define WM_NCMBUTTONDOWN 167 /* 0x00A7 */
#define WM_NCMBUTTONUP 168 /* 0x00A8 */
#define WM_NCMBUTTONDBLCLK 169 /* 0x00A9 */
#endif // WIN_WANT_ALL
#ifdef WIN_WANT_ALL
// Mouse click activation support
#define WM_MOUSEACTIVATE 33 /* 0x0021 */
// Mode control
#define WM_CANCELMODE 31 /* 0x001F */
#endif // WIN_WANT_ALL
// Timer support
#define WM_TIMER 275 /* 0x0113 */
#ifdef WIN_WANT_ALL
/* Menu messages */
#define WM_INITMENU 278 /* 0x0116 */
#define WM_INITMENUPOPUP 279 /* 0x0117 */
#define WM_MENUSELECT 287 /* 0x011F */
#define WM_MENUCHAR 288 /* 0x0120 */
/* Menu and control command messages */
#define WM_COMMAND 273 /* 0x0111 */
// Scroll bar support
#define WM_HSCROLL 276 /* 0x0114 */
#define WM_VSCROLL 277 /* 0x0115 */
// Standard cursor resource ID's
#define WM_SETCURSOR 32 /* 0x0020 */
// WM_SYSCOMMAND support
#define WM_SYSCOMMAND 274 /* 0x0112 */
#endif // WIN_WANT_ALL
// MDI messages:
#ifdef WIN_WANT_ALL
#define WM_MDICREATE 544 /* 0x0220 */
#define WM_MDIDESTROY 545 /* 0x0221 */
#define WM_MDIACTIVATE 546 /* 0x0222 */
#define WM_MDIRESTORE 547 /* 0x0223 */
#define WM_MDINEXT 548 /* 0x0224 */
#define WM_MDIMAXIMIZE 549 /* 0x0225 */
#define WM_MDITILE 550 /* 0x0226 */
#define WM_MDICASCADE 551 /* 0x0227 */
#define WM_MDIICONARRANGE 552 /* 0x0228 */
#define WM_MDIGETACTIVE 553 /* 0x0229 */
#define WM_MDISETMENU 560 /* 0x0230 */
#endif // WIN_WANT_ALL
#define WM_CHILDACTIVATE 34 /* 0x0022 */
/* Dialog messages */
#define DM_GETDEFID (WM_USER+0)
#define DM_SETDEFID (WM_USER+1)
/* Dialog notification messages */
#define WM_INITDIALOG 272 /* 0x0110 */
#define WM_NEXTDLGCTL 40 /* 0x0028 */
#define WM_PARENTNOTIFY 528 /* 0x0210 */
#define WM_ENTERIDLE 289 /* 0x0121 */
#define WM_GETDLGCODE 135 /* 0x0087 */
#ifdef WIN_WANT_DLG_CODES
// dialog codes:
#define DLGC_WANTARROWS 1 // 0x0001
#define DLGC_WANTTAB 2 // 0x0002
#define DLGC_WANTALLKEYS 4 // 0x0004
#define DLGC_WANTMESSAGE 4 // 0x0004
#define DLGC_HASSETSEL 8 // 0x0008
#define DLGC_DEFPUSHBUTTON 16 // 0x0010
#define DLGC_UNDEFPUSHBUTTON 32 // 0x0020
#define DLGC_RADIOBUTTON 64 // 0x0040
#define DLGC_WANTCHARS 128 // 0x0080
#define DLGC_STATIC 256 // 0x0100
#define DLGC_BUTTON 8192 // 0x2000
#endif // WIN_WANT_DLG_CODES
#define WM_CTLCOLOR 25 /* 0x0019 */
#ifdef WIN_WANT_CTL_CODES
// WM_CTLCOLOR control codes:
#define CTLCOLOR_MSGBOX 0
#define CTLCOLOR_EDIT 1
#define CTLCOLOR_LISTBOX 2
#define CTLCOLOR_BTN 3
#define CTLCOLOR_DLG 4
#define CTLCOLOR_SCROLLBAR 5
#define CTLCOLOR_STATIC 6
#endif // WIN_WANT_CTL_CODES
#define WM_SETFONT 48 /* 0x0030 */
#define WM_GETFONT 49 /* 0x0031 */
#define WM_DRAWITEM 43 /* 0x002B */
// for ODT_*, ODA_*, ODS_* see DRAWITEM.CH
#define WM_MEASUREITEM 44 /* 0x002C */
#define WM_DELETEITEM 45 /* 0x002D */
#define WM_COMPAREITEM 57 /* 0x0039 */
// Scroll bar styles:
#define SBS_HORZ 0
#define SBS_VERT 1
#ifdef WIN_WANT_SBS
#define SBS_TOPALIGN 2
#define SBS_LEFTALIGN 2
#define SBS_BOTTOMALIGN 4
#define SBS_RIGHTALIGN 4
#define SBS_SIZEBOXTOPLEFTALIGN 2
#define SBS_SIZEBOXBOTTOMRIGHTALIGN 4
#define SBS_SIZEBOX 8
#endif // WIN_WANT_SBS
// Edit control messages:
#define EM_GETSEL (WM_USER+0)
#define EM_SETSEL (WM_USER+1)
#define EM_GETRECT (WM_USER+2)
#define EM_SETRECT (WM_USER+3)
#define EM_SETRECTNP (WM_USER+4)
#define EM_LINESCROLL (WM_USER+6)
#define EM_GETMODIFY (WM_USER+8)
#define EM_SETMODIFY (WM_USER+9)
#define EM_GETLINECOUNT (WM_USER+10)
#define EM_LINEINDEX (WM_USER+11)
#define EM_SETHANDLE (WM_USER+12)
#define EM_GETHANDLE (WM_USER+13)
#define EM_LINELENGTH (WM_USER+17)
#define EM_REPLACESEL (WM_USER+18)
//#define EM_SETFONT (WM_USER+19) /* NOT IMPLEMENTED: use WM_SETFONT */
#define EM_GETLINE (WM_USER+20)
#define EM_LIMITTEXT (WM_USER+21)
#define EM_CANUNDO (WM_USER+22)
#define EM_UNDO (WM_USER+23)
#define EM_FMTLINES (WM_USER+24)
#define EM_LINEFROMCHAR (WM_USER+25)
//#define EM_SETWORDBREAK (WM_USER+26) /* NOT IMPLEMENTED: use EM_SETWORDBREAK */
#define EM_SETTABSTOPS (WM_USER+27)
#define EM_SETPASSWORDCHAR (WM_USER+28)
#define EM_EMPTYUNDOBUFFER (WM_USER+29)
#define EM_GETFIRSTVISIBLELINE (WM_USER+30)
#define EM_SETREADONLY (WM_USER+31)
#define EM_SETWORDBREAKPROC (WM_USER+32)
#define EM_GETWORDBREAKPROC (WM_USER+33)
#define EM_GETPASSWORDCHAR (WM_USER+34)
// Edit control notification codes:
#ifdef WIN_WANT_EN
#define EN_SETFOCUS 256 // 0x0100
#define EN_KILLFOCUS 512 // 0x0200
#define EN_CHANGE 768 // 0x0300
#define EN_UPDATE 1024 // 0x0400
#define EN_ERRSPACE 1280 // 0x0500
#define EN_MAXTEXT 1281 // 0x0501
#define EN_HSCROLL 1537 // 0x0601
#define EN_VSCROLL 1538 // 0x0602
#endif // WIN_WANT_EN
// Listbox styles:
#ifdef WIN_WANT_LBS
#define LBS_NOTIFY 1 // 0x0001L
#define LBS_SORT 2 // 0x0002L
#define LBS_NOREDRAW 4 // 0x0004L
#define LBS_MULTIPLESEL 8 // 0x0008L
#define LBS_OWNERDRAWFIXED 16 // 0x0010L
#define LBS_OWNERDRAWVARIABLE 32 // 0x0020L
#define LBS_HASSTRINGS 64 // 0x0040L
#define LBS_USETABSTOPS 128 // 0x0080L
#define LBS_NOINTEGRALHEIGHT 256 // 0x0100L
#define LBS_MULTICOLUMN 512 // 0x0200L
#define LBS_WANTKEYBOARDINPUT 1024 // 0x0400L
#define LBS_EXTENDEDSEL 2048 // 0x0800L
// Win 3.1:
#define LBS_DISABLENOSCROLL 4096 // 0x1000L
// end of 3.1
#define LBS_STANDARD (LBS_NOTIFY + LBS_SORT + WS_VSCROLL + WS_BORDER)
#endif // WIN_WANT_LBS
// Listbox messages:
#ifdef WIN_WANT_LB
#define LB_ADDSTRING (WM_USER+1)
#define LB_INSERTSTRING (WM_USER+2)
#define LB_DELETESTRING (WM_USER+3)
#define LB_RESETCONTENT (WM_USER+5)
#define LB_SETSEL (WM_USER+6)
#define LB_SETCURSEL (WM_USER+7)
#define LB_GETSEL (WM_USER+8)
#define LB_GETCURSEL (WM_USER+9)
#define LB_GETTEXT (WM_USER+10)
#define LB_GETTEXTLEN (WM_USER+11)
#define LB_GETCOUNT (WM_USER+12)
#define LB_SELECTSTRING (WM_USER+13)
#define LB_DIR (WM_USER+14)
#define LB_GETTOPINDEX (WM_USER+15)
#define LB_FINDSTRING (WM_USER+16)
#define LB_GETSELCOUNT (WM_USER+17)
#define LB_GETSELITEMS (WM_USER+18)
#define LB_SETTABSTOPS (WM_USER+19)
#define LB_GETHORIZONTALEXTENT (WM_USER+20)
#define LB_SETHORIZONTALEXTENT (WM_USER+21)
#define LB_SETCOLUMNWIDTH (WM_USER+22)
#define LB_SETTOPINDEX (WM_USER+24)
#define LB_GETITEMRECT (WM_USER+25)
#define LB_GETITEMDATA (WM_USER+26)
#define LB_SETITEMDATA (WM_USER+27)
#define LB_SELITEMRANGE (WM_USER+28)
#define LB_SETCARETINDEX (WM_USER+31)
#define LB_GETCARETINDEX (WM_USER+32)
#define LB_SETITEMHEIGHT (WM_USER+33)
#define LB_GETITEMHEIGHT (WM_USER+34)
#define LB_FINDSTRINGEXACT (WM_USER+35)
// Listbox notification codes:
#define LBN_ERRSPACE (-2)
#define LBN_SELCHANGE 1
#define LBN_DBLCLK 2
#define LBN_SELCANCEL 3
#define LBN_SETFOCUS 4
#define LBN_KILLFOCUS 5
// List box message return values:
#define LB_OKAY 0
#define LB_ERR (-1)
#define LB_ERRSPACE (-2)
#endif // WIN_WANT_LB
// Listbox notification messages:
#define WM_VKEYTOITEM 46 /* 0x002E */
#define WM_CHARTOITEM 47 /* 0x002F */
#ifdef WIN_WANT_CB
// ComboBox styles:
#define CBS_SIMPLE 1 // 0x0001
#define CBS_DROPDOWN 2 // 0x0002
#define CBS_DROPDOWNLIST 3 // 0x0003
#define CBS_OWNERDRAWFIXED 16 // 0x0010
#define CBS_OWNERDRAWVARIABLE 32 // 0x0020
#define CBS_AUTOHSCROLL 64 // 0x0040
#define CBS_OEMCONVERT 128 // 0x0080
#define CBS_SORT 256 // 0x0100
#define CBS_HASSTRINGS 512 // 0x0200
#define CBS_NOINTEGRALHEIGHT 1024 // 0x0400
// Win 3.1:
#define CBS_DISABLENOSCROLL 2048 // 0x0800
// end of 3.1
// Combo box messages:
#define CB_GETEDITSEL (WM_USER+0)
#define CB_LIMITTEXT (WM_USER+1)
#define CB_SETEDITSEL (WM_USER+2)
#define CB_ADDSTRING (WM_USER+3)
#define CB_DELETESTRING (WM_USER+4)
#define CB_DIR (WM_USER+5)
#define CB_GETCOUNT (WM_USER+6)
#define CB_GETCURSEL (WM_USER+7)
#define CB_GETLBTEXT (WM_USER+8)
#define CB_GETLBTEXTLEN (WM_USER+9)
#define CB_INSERTSTRING (WM_USER+10)
#define CB_RESETCONTENT (WM_USER+11)
#define CB_FINDSTRING (WM_USER+12)
#define CB_SELECTSTRING (WM_USER+13)
#define CB_SETCURSEL (WM_USER+14)
#define CB_SHOWDROPDOWN (WM_USER+15)
#define CB_GETITEMDATA (WM_USER+16)
#define CB_SETITEMDATA (WM_USER+17)
// Win 3.1:
#define CB_GETDROPPEDCONTROLRECT (WM_USER+18)
#define CB_SETITEMHEIGHT (WM_USER+19)
#define CB_GETITEMHEIGHT (WM_USER+20)
#define CB_SETEXTENDEDUI (WM_USER+21)
#define CB_GETEXTENDEDUI (WM_USER+22)
#define CB_GETDROPPEDSTATE (WM_USER+23)
#define CB_FINDSTRINGEXACT (WM_USER+24)
// end of 3.1
// Combo box notification codes:
#define CBN_ERRSPACE (-1)
#define CBN_SELCHANGE 1
#define CBN_DBLCLK 2
#define CBN_SETFOCUS 3
#define CBN_KILLFOCUS 4
#define CBN_EDITCHANGE 5
#define CBN_EDITUPDATE 6
#define CBN_DROPDOWN 7
// Win 3.1:
#define CBN_CLOSEUP 8
#define CBN_SELENDOK 9
#define CBN_SELENDCANCEL 10
// end of 3.1
// Combo box message return values:
#define CB_OKAY 0
#define CB_ERR (-1)
#define CB_ERRSPACE (-2)
#endif // WIN_WANT_CB
#ifdef WIN_WANT_ALL
#define WM_QUEUESYNC 35 /* 0x0023 */
#define WM_COMMNOTIFY 68 /* 0x0044 */
#endif // WIN_WANT_ALL
#define MB_OK 0 // 0x0000
#define MB_OKCANCEL 1 // 0x0001
#define MB_ABORTRETRYIGNORE 2 // 0x0002
#define MB_YESNOCANCEL 3 // 0x0003
#define MB_YESNO 4 // 0x0004
#define MB_RETRYCANCEL 5 // 0x0005
#define MB_TYPEMASK 15 // 0x000F
#define MB_ICONHAND 16 // 0x0010
#define MB_ICONQUESTION 32 // 0x0020
#define MB_ICONEXCLAMATION 48 // 0x0030
#define MB_ICONASTERISK 64 // 0x0040
#define MB_ICONMASK 240 // 0x00F0
#define MB_ICONINFORMATION MB_ICONASTERISK
#define MB_ICONSTOP MB_ICONHAND
#define MB_DEFBUTTON1 0 // 0x0000
#define MB_DEFBUTTON2 256 // 0x0100
#define MB_DEFBUTTON3 512 // 0x0200
#define MB_DEFMASK 3840 // 0x0F00
#define MB_APPLMODAL 0 // 0x0000
#define MB_SYSTEMMODAL 4096 // 0x1000
#define MB_TASKMODAL 8192 // 0x2000
#define MB_NOFOCUS 32768 // 0x8000
#ifdef WIN_WANT_MF
#define MF_INSERT 0 // 0x0000
#define MF_CHANGE 128 // 0x0080
#define MF_APPEND 256 // 0x0100
#define MF_DELETE 512 // 0x0200
#define MF_REMOVE 4096 // 0x1000
/* Menu flags for Add/Check/EnableMenuItem() */
#define MF_BYCOMMAND 0 // 0x0000
#define MF_BYPOSITION 1024 // 0x0400
#endif // WIN_WANT_MF
#define MF_SEPARATOR 2048 // 0x0800
#define MF_ENABLED 0 // 0x0000
#define MF_GRAYED 1 // 0x0001
#define MF_DISABLED 2 // 0x0002
#define MF_UNCHECKED 0 // 0x0000
#define MF_CHECKED 8 // 0x0008
#define MF_USECHECKBITMAPS 512 // 0x0200
#define MF_STRING 0 // 0x0000
#define MF_BITMAP 4 // 0x0004
#ifdef WIN_WANT_ALL
#define MF_OWNERDRAW 256 // 0x0100
#endif // WIN_WANT_ALL
#define MF_POPUP 16 // 0x0010
#define MF_MENUBARBREAK 32 // 0x0020
#define MF_MENUBREAK 64 // 0x0040
#define MF_UNHILITE 0 // 0x0000
#define MF_HILITE 128 // 0x0080
#define MF_SYSMENU 8192 // 0x2000
#define MF_HELP 16384 // 0x4000
#define MF_MOUSESELECT 32768 // 0x8000
#define MF_END 128 // 0x0080 /* Only valid in menu resource templates */
// ShowWindow values
#define SW_HIDE 0
#define SW_SHOWNORMAL 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
#define SW_RESTORE 9
// CreateWindow/child window
#define CW_USEDEFAULT 32768 // 0x8000
/* WM_H/VSCROLL commands */
#define SB_LINEUP 0
#define SB_LINELEFT 0
#define SB_LINEDOWN 1
#define SB_LINERIGHT 1
#define SB_PAGEUP 2
#define SB_PAGELEFT 2
#define SB_PAGEDOWN 3
#define SB_PAGERIGHT 3
#define SB_THUMBPOSITION 4
#define SB_THUMBTRACK 5
#define SB_TOP 6
#define SB_LEFT 6
#define SB_BOTTOM 7
#define SB_RIGHT 7
#define SB_ENDSCROLL 8
/* Scroll bar selection constants */
#define SB_HORZ 0
#define SB_VERT 1
#define SB_CTL 2
#define SB_BOTH 3
/* Dialog styles */
#define DS_ABSALIGN 1 // 0x01
#define DS_SYSMODAL 2 // 0x02
#define DS_LOCALEDIT 32 // 0x20
#define DS_SETFONT 64 // 0x40
#define DS_MODALFRAME 128 // 0x80
#define DS_NOIDLEMSG 256 // 0x100
/* Returned in HIWORD() of DM_GETDEFID result if msg is supported */
#ifdef WIN_WANT_ALL
#define DC_HASDEFID 21323 // 0x534B
#endif // WIN_WANT_ALL
// dialog button id's:
#define IDOK 1
#define IDCANCEL 2
#define IDABORT 3
#define IDRETRY 4
#define IDIGNORE 5
#define IDYES 6
#define IDNO 7
// Button Control Messages:
#define BM_GETCHECK (WM_USER+0)
#define BM_SETCHECK (WM_USER+1)
#define BM_GETSTATE (WM_USER+2)
#define BM_SETSTATE (WM_USER+3)
#define BM_SETSTYLE (WM_USER+4)
// Button Control Styles:
#define BS_PUSHBUTTON 0 // 0x00000000
#define BS_DEFPUSHBUTTON 1 // 0x00000001
#define BS_CHECKBOX 2 // 0x00000002
#define BS_AUTOCHECKBOX 3 // 0x00000003
#define BS_RADIOBUTTON 4 // 0x00000004
#define BS_3STATE 5 // 0x00000005
#define BS_AUTO3STATE 6 // 0x00000006
#define BS_GROUPBOX 7 // 0x00000007
#define BS_USERBUTTON 8 // 0x00000008
#define BS_AUTORADIOBUTTON 9 // 0x00000009
#ifdef WIN_WANT_ALL
#define BS_OWNERDRAW 11 // 0x0000000B
#endif // WIN_WANT_ALL
#define BS_LEFTTEXT 32 // 0x00000020
// User Button Notification Codes
#define BN_CLICKED 0
// these are obsolete:
//#define BN_PAINT 1
//#define BN_HILITE 2
//#define BN_UNHILITE 3
//#define BN_DISABLE 4
#define BN_DOUBLECLICKED 5 // only for owner draw (?)
// typical menu item id's
#ifdef WIN_WANT_IDM
#define IDM_NEW 1
#define IDM_OPEN 2
#define IDM_SAVE 3
#define IDM_SAVEAS 4
#define IDM_EXIT 5
#define IDM_ABOUT 6
#endif // WIN_WANT_IDM
/* Standard icon resource IDs */
#define IDI_APPLICATION MAKEINTRESOURCE(32512)
#define IDI_HAND MAKEINTRESOURCE(32513)
#define IDI_QUESTION MAKEINTRESOURCE(32514)
#define IDI_EXCLAMATION MAKEINTRESOURCE(32515)
#define IDI_ASTERISK MAKEINTRESOURCE(32516)
/* Standard cursor resource IDs */
#define IDC_ARROW MAKEINTRESOURCE(32512)
#define IDC_IBEAM MAKEINTRESOURCE(32513)
#define IDC_WAIT MAKEINTRESOURCE(32514)
#define IDC_CROSS MAKEINTRESOURCE(32515)
#define IDC_UPARROW MAKEINTRESOURCE(32516)
#define IDC_SIZE MAKEINTRESOURCE(32640)
#define IDC_ICON MAKEINTRESOURCE(32641)
#define IDC_SIZENWSE MAKEINTRESOURCE(32642)
#define IDC_SIZENESW MAKEINTRESOURCE(32643)
#define IDC_SIZEWE MAKEINTRESOURCE(32644)
#define IDC_SIZENS MAKEINTRESOURCE(32645)
/* GetWindow() constants */
#ifdef WIN_WANT_ALL
#define GW_HWNDFIRST 0
#define GW_HWNDLAST 1
#define GW_HWNDNEXT 2
#define GW_HWNDPREV 3
#define GW_OWNER 4
#define GW_CHILD 5
#endif // WIN_WANT_ALL
/* Special value for CreateWindow, et al. */
#define HWND_DESKTOP (0)
/* SetWindowPos() hwndInsertAfter field values */
#ifdef WIN_WANT_ALL
#define HWND_TOP (0)
#define HWND_BOTTOM (1)
#define HWND_TOPMOST (-1)
#define HWND_NOTOPMOST (-2)
#endif // WIN_WANT_ALL
/* Special HWND value for use with PostMessage() and SendMessage() */
#ifdef WIN_WANT_ALL
#define HWND_BROADCAST (-1)
#endif // WIN_WANT_ALL
// Color support
#ifndef RC_INVOKED
#xtranslate RGB(<r>,<g>,<b>) => (((<r>) + (<g>)*256) + (<b>)*65536)
#endif
#define COLOR_SCROLLBAR 0
#define COLOR_BACKGROUND 1
#define COLOR_ACTIVECAPTION 2
#define COLOR_INACTIVECAPTION 3
#define COLOR_MENU 4
#define COLOR_WINDOW 5
#define COLOR_WINDOWFRAME 6
#define COLOR_MENUTEXT 7
#define COLOR_WINDOWTEXT 8
#define COLOR_CAPTIONTEXT 9
#define COLOR_ACTIVEBORDER 10
#define COLOR_INACTIVEBORDER 11
#define COLOR_APPWORKSPACE 12
#define COLOR_HIGHLIGHT 13
#define COLOR_HIGHLIGHTTEXT 14
#define COLOR_BTNFACE 15
#define COLOR_BTNSHADOW 16
#define COLOR_GRAYTEXT 17
#define COLOR_BTNTEXT 18
#define COLOR_INACTIVECAPTIONTEXT 19
#define COLOR_BTNHIGHLIGHT 20
// Pen support
/* Pen Styles */
#define PS_SOLID 0
#define PS_DASH 1
#define PS_DOT 2
#define PS_DASHDOT 3
#define PS_DASHDOTDOT 4
#define PS_NULL 5
#define PS_INSIDEFRAME 6
// Stock pens for use with GetStockObject()
#define WHITE_PEN 6
#define BLACK_PEN 7
#define NULL_PEN 8
// Brush support
/* Brush Styles */
#define BS_SOLID 0
#define BS_NULL 1
#define BS_HOLLOW BS_NULL
#define BS_HATCHED 2
#define BS_PATTERN 3
#define BS_INDEXED 4
#define BS_DIBPATTERN 5
/* Hatch Styles */
#define HS_HORIZONTAL 0
#define HS_VERTICAL 1
#define HS_FDIAGONAL 2
#define HS_BDIAGONAL 3
#define HS_CROSS 4
#define HS_DIAGCROSS 5
/* Stock brushes for use with GetStockObject() */
#define WHITE_BRUSH 0
#define LTGRAY_BRUSH 1
#define GRAY_BRUSH 2
#define DKGRAY_BRUSH 3
#define BLACK_BRUSH 4
#define NULL_BRUSH 5
#define HOLLOW_BRUSH NULL_BRUSH
// PolyFill Modes
#define ALTERNATE 1
#define WINDING 2
/* GetSystemMetrics() codes */
#ifdef WIN_WANT_SYSTEM_METRICS
#define SM_CXSCREEN 0
#define SM_CYSCREEN 1
#define SM_CXVSCROLL 2
#define SM_CYHSCROLL 3
#define SM_CYCAPTION 4
#define SM_CXBORDER 5
#define SM_CYBORDER 6
#define SM_CXDLGFRAME 7
#define SM_CYDLGFRAME 8
#define SM_CYVTHUMB 9
#define SM_CXHTHUMB 10
#define SM_CXICON 11
#define SM_CYICON 12
#define SM_CXCURSOR 13
#define SM_CYCURSOR 14
#define SM_CYMENU 15
#define SM_CXFULLSCREEN 16
#define SM_CYFULLSCREEN 17
#define SM_CYKANJIWINDOW 18
#define SM_MOUSEPRESENT 19
#define SM_CYVSCROLL 20
#define SM_CXHSCROLL 21
#define SM_DEBUG 22
#define SM_SWAPBUTTON 23
#define SM_RESERVED1 24
#define SM_RESERVED2 25
#define SM_RESERVED3 26
#define SM_RESERVED4 27
#define SM_CXMIN 28
#define SM_CYMIN 29
#define SM_CXSIZE 30
#define SM_CYSIZE 31
#define SM_CXFRAME 32
#define SM_CYFRAME 33
#define SM_CXMINTRACK 34
#define SM_CYMINTRACK 35
// Win 3.1 values:
#define SM_CXDOUBLECLK 36
#define SM_CYDOUBLECLK 37
#define SM_CXICONSPACING 38
#define SM_CYICONSPACING 39
#define SM_MENUDROPALIGNMENT 40
#define SM_PENWINDOWS 41
#define SM_DBCSENABLED 42
#endif // WIN_WANT_SYSTEM_METRICS
#define SM_CMETRICS 43
/* System Menu Command Values */
#ifdef WIN_WANT_ALL
#define SC_SIZE 61440 // 0xF000
#define SC_MOVE 61456 // 0xF010
#define SC_MINIMIZE 61472 // 0xF020
#define SC_MAXIMIZE 61488 // 0xF030
#define SC_NEXTWINDOW 61504 // 0xF040
#define SC_PREVWINDOW 61520 // 0xF050
#define SC_CLOSE 61536 // 0xF060
#define SC_VSCROLL 61552 // 0xF070
#define SC_HSCROLL 61568 // 0xF080
#define SC_MOUSEMENU 61584 // 0xF090
#define SC_KEYMENU 61696 // 0xF100
#define SC_ARRANGE 61712 // 0xF110
#define SC_RESTORE 61728 // 0xF120
#define SC_TASKLIST 61744 // 0xF130
#define SC_SCREENSAVE 61760 // 0xF140
#define SC_HOTKEY 61776 // 0xF150
#endif // WIN_WANT_ALL
// Obsolete names
#ifdef WIN_WANT_ALL
#define SC_ICON SC_MINIMIZE
#define SC_ZOOM SC_MAXIMIZE
#endif // WIN_WANT_ALL
// Pre-defined bitmap numbers
#define OBM_CLOSE 32754
#define OBM_UPARROW 32753
#define OBM_DNARROW 32752
#define OBM_RGARROW 32751
#define OBM_LFARROW 32750
#define OBM_REDUCE 32749
#define OBM_ZOOM 32748
#define OBM_RESTORE 32747
#define OBM_REDUCED 32746
#define OBM_ZOOMD 32745
#define OBM_RESTORED 32744
#define OBM_UPARROWD 32743
#define OBM_DNARROWD 32742
#define OBM_RGARROWD 32741
#define OBM_LFARROWD 32740
#define OBM_MNARROW 32739
#define OBM_COMBO 32738
// Win 3.1:
#define OBM_UPARROWI 32737
#define OBM_DNARROWI 32736
#define OBM_RGARROWI 32735
#define OBM_LFARROWI 32734
// end of 3.1
#define OBM_OLD_CLOSE 32767
#define OBM_SIZE 32766
#define OBM_OLD_UPARROW 32765
#define OBM_OLD_DNARROW 32764
#define OBM_OLD_RGARROW 32763
#define OBM_OLD_LFARROW 32762
#define OBM_BTSIZE 32761
#define OBM_CHECK 32760
#define OBM_CHECKBOXES 32759
#define OBM_BTNCORNERS 32758
#define OBM_OLD_REDUCE 32757
#define OBM_OLD_ZOOM 32756
#define OBM_OLD_RESTORE 32755
// Edit control
/* Edit control styles */
#define ES_LEFT 0 // 0x00000000L
#define ES_CENTER 1 // 0x00000001L
#define ES_RIGHT 2 // 0x00000002L
#define ES_MULTILINE 4 // 0x00000004L
#define ES_UPPERCASE 8 // 0x00000008L
#define ES_LOWERCASE 16 // 0x00000010L
#define ES_PASSWORD 32 // 0x00000020L
#define ES_AUTOVSCROLL 64 // 0x00000040L
#define ES_AUTOHSCROLL 128 // 0x00000080L
#define ES_NOHIDESEL 256 // 0x00000100L
#define ES_OEMCONVERT 1024 // 0x00000400L
// Win 3.1:
#define ES_READONLY 2048 // 0x00000800L
#define ES_WANTRETURN 4096 // 0x00001000L
// Static Control Styles
#define SS_LEFT 0 // 0x00000000L
#define SS_CENTER 1 // 0x00000001L
#define SS_RIGHT 2 // 0x00000002L
#define SS_ICON 3 // 0x00000003L
#define SS_BLACKRECT 4 // 0x00000004L
#define SS_GRAYRECT 5 // 0x00000005L
#define SS_WHITERECT 6 // 0x00000006L
#define SS_BLACKFRAME 7 // 0x00000007L
#define SS_GRAYFRAME 8 // 0x00000008L
#define SS_WHITEFRAME 9 // 0x00000009L
#define SS_SIMPLE 11 // 0x0000000BL
#define SS_LEFTNOWORDWRAP 12 // 0x0000000CL
#define SS_NOPREFIX 128 // 0x00000080L
// Dialog control classes
#define DLG_BUTTON 128 // 0x80
#define DLG_EDIT 129 // 0x81
#define DLG_STATIC 130 // 0x82
#define DLG_LISTBOX 131 // 0x83
#define DLG_SCROLLBAR 132 // 0x84
#define DLG_COMBOBOX 133 // 0x85
// Stock fonts for use with GetStockObject()
#define OEM_FIXED_FONT 10
#define ANSI_FIXED_FONT 11
#define ANSI_VAR_FONT 12
#define SYSTEM_FONT 13
#define DEVICE_DEFAULT_FONT 14
#define DEFAULT_PALETTE 15
#define SYSTEM_FIXED_FONT 16
// Device Capabilities
/* Device Parameters for GetDeviceCaps() */
#ifdef WIN_WANT_GETDEVCAPS
#define DRIVERVERSION 0
#define TECHNOLOGY 2
#endif // WIN_WANT_GETDEVCAPS
#define HORZSIZE 4
#define VERTSIZE 6
#define HORZRES 8
#define VERTRES 10
#ifdef WIN_WANT_GETDEVCAPS
#define BITSPIXEL 12
#define PLANES 14
#define NUMBRUSHES 16
#define NUMPENS 18
#define NUMMARKERS 20
#define NUMFONTS 22
#define NUMCOLORS 24
#define PDEVICESIZE 26
#define CURVECAPS 28
#define LINECAPS 30
#define POLYGONALCAPS 32
#define TEXTCAPS 34
#define CLIPCAPS 36
#define RASTERCAPS 38
#define ASPECTX 40
#define ASPECTY 42
#define ASPECTXY 44
#define LOGPIXELSX 88
#define LOGPIXELSY 90
#define SIZEPALETTE 104
#define NUMRESERVED 106
#define COLORRES 108
#endif // WIN_WANT_GETDEVCAPS
#ifdef WIN_WANT_GETDEVCAPMASKS
// GetDeviceCaps() return values/masks
/* TECHNOLOGY */
#define DT_PLOTTER 0
#define DT_RASDISPLAY 1
#define DT_RASPRINTER 2
#define DT_RASCAMERA 3
#define DT_CHARSTREAM 4
#define DT_METAFILE 5
#define DT_DISPFILE 6
/* CURVECAPS */
#define CC_NONE 0 // 0x0000
#define CC_CIRCLES 1 // 0x0001
#define CC_PIE 2 // 0x0002
#define CC_CHORD 4 // 0x0004
#define CC_ELLIPSES 8 // 0x0008
#define CC_WIDE 16 // 0x0010
#define CC_STYLED 32 // 0x0020
#define CC_WIDESTYLED 64 // 0x0040
#define CC_INTERIORS 128 // 0x0080
#define CC_ROUNDRECT 256 // 0x0100
/* LINECAPS */
#define LC_NONE 0 // 0x0000
#define LC_POLYLINE 2 // 0x0002
#define LC_MARKER 4 // 0x0004
#define LC_POLYMARKER 8 // 0x0008
#define LC_WIDE 16 // 0x0010
#define LC_STYLED 32 // 0x0020
#define LC_WIDESTYLED 64 // 0x0040
#define LC_INTERIORS 128 // 0x0080
/* POLYGONALCAPS */
#define PC_NONE 0 // 0x0000
#define PC_POLYGON 1 // 0x0001
#define PC_RECTANGLE 2 // 0x0002
#define PC_WINDPOLYGON 4 // 0x0004
#define PC_SCANLINE 8 // 0x0008
#define PC_WIDE 16 // 0x0010
#define PC_STYLED 32 // 0x0020
#define PC_WIDESTYLED 64 // 0x0040
#define PC_INTERIORS 128 // 0x0080
/* TEXTCAPS */
#define TC_OP_CHARACTER 1 // 0x0001
#define TC_OP_STROKE 2 // 0x0002
#define TC_CP_STROKE 4 // 0x0004
#define TC_CR_90 8 // 0x0008
#define TC_CR_ANY 16 // 0x0010
#define TC_SF_X_YINDEP 32 // 0x0020
#define TC_SA_DOUBLE 64 // 0x0040
#define TC_SA_INTEGER 128 // 0x0080
#define TC_SA_CONTIN 256 // 0x0100
#define TC_EA_DOUBLE 512 // 0x0200
#define TC_IA_ABLE 1024 // 0x0400
#define TC_UA_ABLE 2048 // 0x0800
#define TC_SO_ABLE 4096 // 0x1000
#define TC_RA_ABLE 8192 // 0x2000
#define TC_VA_ABLE 16384 // 0x4000
#define TC_RESERVED 32768 // 0x8000
/* CLIPCAPS */
#define CP_NONE 0 // 0x0000
#define CP_RECTANGLE 1 // 0x0001
#define CP_REGION 2 // 0x0002
/* RASTERCAPS */
#define RC_NONE 0
#define RC_BITBLT 1 // 0x0001
#define RC_BANDING 2 // 0x0002
#define RC_SCALING 4 // 0x0004
#define RC_BITMAP64 8 // 0x0008
#define RC_GDI20_OUTPUT 16 // 0x0010
#define RC_GDI20_STATE 32 // 0x0020
#define RC_SAVEBITMAP 64 // 0x0040
#define RC_DI_BITMAP 128 // 0x0080
#define RC_PALETTE 256 // 0x0100
#define RC_DIBTODEV 512 // 0x0200
#define RC_BIGFONT 1024 // 0x0400
#define RC_STRETCHBLT 2048 // 0x0800
#define RC_FLOODFILL 4096 // 0x1000
#define RC_STRETCHDIB 8192 // 0x2000
#define RC_OP_DX_OUTPUT 16384 // 0x4000
#define RC_DEVBITS 32768 // 0x8000
#endif // WIN_WANT_GETDEVCAPMASKS
#ifdef WIN_WANT_HELP
// WinHelp() commands:
#define HELP_CONTEXT 1 // 0x0001
#define HELP_QUIT 2 // 0x0002
#define HELP_INDEX 3 // 0x0003
#define HELP_CONTENTS 3 // 0x0003
#define HELP_HELPONHELP 4 // 0x0004
#define HELP_SETINDEX 5 // 0x0005
#define HELP_SETCONTENTS 5 // 0x0005
#define HELP_CONTEXTPOPUP 8 // 0x0008
#define HELP_FORCEFILE 9 // 0x0009
#define HELP_KEY 257 // 0x0101
#define HELP_COMMAND 258 // 0x0102
#define HELP_PARTIALKEY 261 // 0x0105
#define HELP_MULTIKEY 513 // 0x0201
#define HELP_SETWINPOS 515 // 0x0203
#endif // WIN_WANT_HELP
#ifdef WIN_WANT_CLIPBOARD
// Predefined Clipboard Formats:
#define CF_TEXT 1
#define CF_BITMAP 2
#define CF_METAFILEPICT 3
#define CF_SYLK 4
#define CF_DIF 5
#define CF_TIFF 6
#define CF_OEMTEXT 7
#define CF_DIB 8
#define CF_PALETTE 9
#define CF_PENDATA 10
#define CF_RIFF 11
#define CF_WAVE 12
#define CF_OWNERDISPLAY 128 // 0x0080
#define CF_DSPTEXT 129 // 0x0081
#define CF_DSPBITMAP 130 // 0x0082
#define CF_DSPMETAFILEPICT 131 // 0x0083
// "Private" formats:
#define CF_PRIVATEFIRST 512 // 0x0200
#define CF_PRIVATELAST 767 // 0x02FF
// "GDIOBJ" formats do get DeleteObject()'d:
#define CF_GDIOBJFIRST 768 // 0x0300
#define CF_GDIOBJLAST 1023 // 0x03FF
// Clipboard command messages:
#define WM_CUT 768 /* 0x0300 */
#define WM_COPY 769 /* 0x0301 */
#define WM_PASTE 770 /* 0x0302 */
#define WM_CLEAR 771 /* 0x0303 */
#define WM_UNDO 772 /* 0x0304 */
// Clipboard owner messages:
#define WM_RENDERFORMAT 773 /* 0x0305 */
#define WM_RENDERALLFORMATS 774 /* 0x0306 */
#define WM_DESTROYCLIPBOARD 775 /* 0x0307 */
// Clipboard viewer messages:
#define WM_DRAWCLIPBOARD 776 /* 0x0308 */
#define WM_PAINTCLIPBOARD 777 /* 0x0309 */
#define WM_SIZECLIPBOARD 779 /* 0x030B */
#define WM_VSCROLLCLIPBOARD 778 /* 0x030A */
#define WM_HSCROLLCLIPBOARD 782 /* 0x030E */
#define WM_ASKCBFORMATNAME 780 /* 0x030C */
#define WM_CHANGECBCHAIN 781 /* 0x030D */
// handle Clipper 10-char limit on external names
#ifndef RC_INVOKED
#xtranslate EnumClipboardFormats => EnumClipbFormats
#xtranslate GetClipboardData => GetClipbData
#xtranslate GetClipboardFormatName => GetClipbFormatName
#xtranslate GetClipboardOwner => GetClipbOwner
#xtranslate GetClipboardViewer => GetClipbViewer
#xtranslate IsClipboardFormatAvailable => IsClipbFormatAvailable
#xtranslate RegisterClipboardFormat => RegClipbFormat
#xtranslate SetClipboardData => SetClipbData
#endif
#endif // WIN_WANT_CLIPBOARD
#define WM_VBXFIREEVENT 864 // 0x0360
// DrawText() Format Flags:
#ifdef WIN_WANT_DRAWTEXT
#define DT_TOP 0
#define DT_LEFT 0
#define DT_CENTER 1
#define DT_RIGHT 2
#define DT_VCENTER 4
#define DT_BOTTOM 8
#define DT_WORDBREAK 16
#define DT_SINGLELINE 32
#define DT_EXPANDTABS 64
#define DT_TABSTOP 128
#define DT_NOCLIP 256
#define DT_EXTERNALLEADING 512
#define DT_CALCRECT 1024
#define DT_NOPREFIX 2048
#define DT_INTERNAL 4096
#endif // WIN_WANT_DRAWTEXT
// Background Modes:
#define TRANSPARENT 1
#define OPAQUE 2
// Text Alignment settings:
#ifdef WIN_WANT_TEXTALIGN
#define TA_NOUPDATECP 0
#define TA_UPDATECP 1
#define TA_LEFT 0
#define TA_RIGHT 2
#define TA_CENTER 6
#define TA_TOP 0
#define TA_BOTTOM 8
#define TA_BASELINE 24
#endif // WIN_WANT_TEXTALIGN
#ifdef WIN_WANT_RASTEROPS
// Binary raster operations:
#define R2_BLACK 1
#define R2_NOTMERGEPEN 2
#define R2_MASKNOTPEN 3
#define R2_NOTCOPYPEN 4
#define R2_MASKPENNOT 5
#define R2_NOT 6
#define R2_XORPEN 7
#define R2_NOTMASKPEN 8
#define R2_MASKPEN 9
#define R2_NOTXORPEN 10
#define R2_NOP 11
#define R2_MERGENOTPEN 12
#define R2_COPYPEN 13
#define R2_MERGEPENNOT 14
#define R2_MERGEPEN 15
#define R2_WHITE 16
// Ternary raster operations:
#define SRCCOPY 13369376 // 0x00CC0020L
#define SRCPAINT 15597702 // 0x00EE0086L
#define SRCAND 8913094 // 0x008800C6L
#define SRCINVERT 6684742 // 0x00660046L
#define SRCERASE 4457256 // 0x00440328L
#define NOTSRCCOPY 3342344 // 0x00330008L
#define NOTSRCERASE 1114278 // 0x001100A6L
#define MERGECOPY 12583114 // 0x00C000CAL
#define MERGEPAINT 12255782 // 0x00BB0226L
#define PATCOPY 15728673 // 0x00F00021L
#define PATPAINT 16452105 // 0x00FB0A09L
#define PATINVERT 5898313 // 0x005A0049L
#define DSTINVERT 5570569 // 0x00550009L
#define BLACKNESS 66 // 0x00000042L
#define WHITENESS 16711778 // 0x00FF0062L
#endif // WIN_WANT_RASTEROPS
// Spooler Error Codes
#ifdef WIN_WANT_SPOOLER
#define SP_NOTREPORTED 16384
#define SP_ERROR (-1)
#define SP_APPABORT (-2)
#define SP_USERABORT (-3)
#define SP_OUTOFDISK (-4)
#define SP_OUTOFMEMORY (-5)
#endif // WIN_WANT_SPOOLER
// Window field offsets for GetWindowLong() and GetWindowWord()
#ifdef WIN_WANT_GETWINDOW
//#define GWL_WNDPROC (-4) // use SubClassWindow()
#define GWW_HINSTANCE (-6)
#define GWW_HWNDPARENT (-8)
#define GWW_ID (-12)
#define GWL_STYLE (-16)
#define GWL_EXSTYLE (-20)
// Get/SetWindowWord/Long offsets for use with DIALOG windows
#define DWL_MSGRESULT 0
#define DWL_DLGPROC 4
#define DWL_USER 8
#endif // WIN_WANT_GETWINDOW
// Predefined Resource Types:
#ifdef WIN_WANT_RESOURCE
#define RT_CURSOR (1)
#define RT_BITMAP (2)
#define RT_ICON (3)
#define RT_MENU (4)
#define RT_DIALOG (5)
#define RT_STRING (6)
#define RT_FONTDIR (7)
#define RT_FONT (8)
#define RT_ACCELERATOR (9)
#define RT_RCDATA (10)
#define RT_GROUP_CURSOR (12)
#define RT_GROUP_ICON (14)
#endif // WIN_WANT_RESOURCE
// Flags for TrackPopupMenu():
#ifdef WIN_WANT_TRACKPOPUP
#define TPM_LEFTBUTTON 0
#define TPM_RIGHTBUTTON 2
#define TPM_LEFTALIGN 0
#define TPM_CENTERALIGN 4
#define TPM_RIGHTALIGN 8
#endif // WIN_WANT_TRACKPOPUP
// Flags for GetWinFlags():
#ifdef WIN_WANT_WINFLAGS
#define WF_PMODE 1
#define WF_CPU286 2
#define WF_CPU386 4
#define WF_CPU486 8
#define WF_STANDARD 16
#define WF_WIN286 16
#define WF_ENHANCED 32
#define WF_WIN386 32
#define WF_CPU086 64
#define WF_CPU186 128
#define WF_LARGEFRAME 256
#define WF_SMALLFRAME 512
#define WF_80x87 1024
#define WF_PAGING 2048
#define WF_WLO 32768
#endif // WIN_WANT_WINFLAGS
// Map modes for SetMapMode():
#ifdef WIN_WANT_MAPMODE
#define MM_TEXT 1
#define MM_LOMETRIC 2
#define MM_HIMETRIC 3
#define MM_LOENGLISH 4
#define MM_HIENGLISH 5
#define MM_TWIPS 6
#define MM_ISOTROPIC 7
#define MM_ANISOTROPIC 8
#endif // WIN_WANT_MAPMODE
// PeekMessage() nRemove values:
#define PM_NOREMOVE 0
#define PM_REMOVE 1
#define PM_NOYIELD 2
// WM_MOUSEMOVE nwParam bit settings:
#define MK_LBUTTON 1
#define MK_RBUTTON 2
#define MK_SHIFT 4
#define MK_CONTROL 8
#define MK_MBUTTON 16 // middle button (if you have one)
// RegisterClass() window types (for default msg processing)
#define RCF_WINDOW 1 // use DefWindowProc()
#define RCF_MDIFRAME 2 // use DefFrameProc()
#define RCF_MDICHILD 4 // use DefMDIChildProc()
#define OF_EXIST 16384 // for OpenFile()
// Events from _chkevent()
#define EVENT_NONE -1
#define EVENT_OTHER 0 // probably treat like EVENT_NONE
#define EVENT_KEY 1 // keystroke
#define EVENT_MENU 2 // menu item selected
#define EVENT_WINSEL 3
#define EVENT_CLOSE 5
#define EVENT_BUTTON 6
#define EVENT_SCROLLBAR 7
#define EVENT_QUIT 9 // quitting the application (either you
// can QUIT, or if you call ChkEvent()
// again, it will QUIT for you)
#define EVENT_INC 10
#define EVENT_DESTROY 11 // window being destroyed
#define EVENT_WINMOVE 12 // window moved
#define EVENT_WINSIZE 13 // window resized: see maxrow(),maxcol()
#define EVENT_REDRAW 14 // need to re-draw window
#define EVENT_SETFOCUS 15 // window given focus
#define EVENT_KILLFOCUS 16 // window losing focus
#define EVENT_LCLICK 17 // mouse left click: see MouseX(),MouseY()
#define EVENT_RCLICK 18 // mouse right click: see MouseX(),MouseY()
#define EVENT_MCLICK 19 // mouse middle click: see MouseX(),MouseY()
#define EVENT_CONTROL 20 // notification from child control
// e.g. buttons
#define EVENT_ACCELKEY 21 // accelerator key
#define EVENT_HSCROLL 22 // msg from horiz scrollbar control
#define EVENT_VSCROLL 23 // msg from vert scrollbar control
#define EVENT_LDBLCLK 24 // left double click: see MouseX(),MouseY()
#define EVENT_RDBLCLK 25 // right double click: see MouseX(),MouseY()
#define EVENT_MDBLCLK 26 // middle double click: see MouseX(),MouseY()
#define EVENT_TIMER 27 // time-out event
#define EVENT_LBTNUP 28 // mouse left button up
#define EVENT_RBTNUP 29 // mouse right button up
#define EVENT_MBTNUP 30 // mouse middle button up
// events reserved for users: 1024-32767
#define EVENT_USER 1024 // user-specific events start here
#ifndef RC_INVOKED
// handle Clipper 10-char limit on external names
#xtranslate GetSystemMenu => GetSysMenu
#xtranslate GetDlgItemInt => GetDlgItmInt
#xtranslate GetDlgItemText => GetDlgItmText
#xtranslate GetViewportOrg => GViewportOrg
#xtranslate SetViewportOrg => SViewportOrg
#xtranslate TranslateMDISysAccel => TranslMDISysAccel
#xcommand DEFAULT <v> TO <x> [, <vN> TO <xN>] ;
=> IF <v> == nil ; <v> := <x> ; END ;
[; IF <vN> == nil ; <vN> := <xN> ; END]
#ifndef WIN_DEBUG
#xtranslate DbgTrace( [<p,...>] ) =>
#xtranslate DbgTrace( [<p,...>] ), => nil,
#endif
#ifdef WIN_DBWIN
#xtranslate DbgTrace( <p> [, <pN>] ) ;
=> OutputDebugString(TRANSFORM(<p>, "") ;
[+ " " + TRANSFORM(<pN>, "")] ;
+ CHR(13) + CHR(10) + CHR(0))
// no need for "DbgTrace(...),"
#command $ [<p,...>] ;
=> $$ [<p>,] CHR(13) + CHR(10)
#command $$ <p> [, <pN>] ;
=> OutputDebugString(TRANSFORM(IIF(<p> == NIL, "NIL", <p>), "") ;
[+ TRANSFORM(IIF(<pN> == NIL, "NIL", <pN>), "")];
+ CHR(0))
#else // WIN_DBWIN
#command $ [<p,...>] =>
#command $$ <p> [, <pN>] =>
#endif // WIN_DBWIN
#endif // RC_INVOKED
#endif // C4W_WINDOWS_CH