home *** CD-ROM | disk | FTP | other *** search
- /***************************************************************************\
-
- (c) 1992, ProtoView Development Co. and Atlantic Information
- Management, Inc., All rights reserved
- \***************************************************************************/
-
- /***************************************************\
- * Data Table Custom Control Constants and Types *
- \***************************************************/
-
- #ifndef DATATBL_INCLUDED
- #define DATATBL_INCLUDED
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #ifndef RC_INVOKED
- #ifndef __SQLVIEW__
-
- //***** Typedefs *****
- typedef DWORD ROWNUM;
- typedef WORD ROWSTAT;
- typedef WORD ROWLEN;
- typedef WORD COLNUM;
- typedef WORD COLSTAT;
- typedef WORD COLTYPE;
- typedef WORD COLSTYLE;
- typedef WORD COLLEN;
- typedef WORD CHARNUM;
- typedef WORD ACCMODE;
-
- #endif /* ifndef __SQLVIEW__ */
- #endif /* ifndef RC_INVOKED */
-
- //***** Window Styles *****
- #define DTS_EDIT 0x0004
- #define DTS_RESIZE 0x0008
- #define DTS_NONE 0x0000
- #define DTS_NUMBERS 0x0010
- #define DTS_LETTERS 0x0020
- #define DTS_OWNERDEF 0x0030
- #define DTS_HGRID 0x0040
- #define DTS_VGRID 0x0080
- #define DTS_ROWSELECT 0x0100
- #define DTS_MULTIROW 0x0200
- #define DTS_COLSELECT 0x0400
- #define DTS_MULTICOL 0x0800
- #define DTS_SMALLDATA 0x0000
- #define DTS_LARGEDATA 0x1000
- #define DTS_ROWBUTTONS 0x2000
- #define DTS_ROWNUMBERS 0x4000
- #define DTS_DROPDOWN 0x8000l
- #define DTS_AUTODROPDN 0x8002l
-
- /****** Column Styles ******/
- #define DTCS_RESIZE 0x0001
- #define DTCS_FIXED 0x0002
- #define DTCS_EDIT 0x0004
- #define DTCS_PROTECT 0x0008
- #define DTCS_NOSCROLL 0x0010 /* not supported */
- #define DTCS_HIDDEN 0x0020
- #define DTCS_LEFT 0x0000
- #define DTCS_CENTER 0x0040
- #define DTCS_RIGHT 0x0080
- #define DTCS_HEADLEFT 0x0000
- #define DTCS_HEADCENTER 0x0100
- #define DTCS_HEADRIGHT 0x0200
- #define DTCS_CHECKBOX 0x1000 /* not supported */
-
- /****** Column Data Types ******/
- #define DTT_INT1 0x81
- #define DTT_INT2 0x82
- #define DTT_INT4 0x83
- #define DTT_REAL4 0x84
- #define DTT_REAL8 0x85
- #define DTT_CHAR 0x86
- #define DTT_ZSTRING 0x87
- #define DTT_FILEDATE 0x88
- #define DTT_FILETIME 0x89
- #define DTT_CDATETIME 0x8A
- #define DTT_UINT1 0x91
- #define DTT_UINT2 0x92
- #define DTT_UINT4 0x93
-
- #define DTT_SQLINT1 0x30
- #define DTT_SQLINT2 0x34
- #define DTT_SQLINT4 0x38
- #define DTT_SQLBIT 0x32
- #define DTT_SQLFLT8 0x3E
- #define DTT_SQLMONEY 0x3C
- #define DTT_SQLDATETIME 0x3D
- #define DTT_SQLCHAR 0x2F
- #define DTT_SQLVARCHAR 0x27
-
- /****** Messages ******/
- #define DTM_RESETALL (WM_USER+0)
- #define DTM_RESETDATA (WM_USER+1)
- #define DTM_GETWNDSTYLE (WM_USER+2)
- #define DTM_SETWNDSTYLE (WM_USER+3)
- #define DTM_GETCONFIGSIZE (WM_USER+4)
- #define DTM_GETCONFIG (WM_USER+5)
- #define DTM_SETCONFIG (WM_USER+6)
- #define DTM_GETCOLCOUNT (WM_USER+7)
- #define DTM_SETCOLCOUNT (WM_USER+8)
- #define DTM_GETCOLSTYLE (WM_USER+9)
- #define DTM_SETCOLSTYLE (WM_USER+10)
- #define DTM_GETCOLTYPE (WM_USER+11)
- #define DTM_SETCOLTYPE (WM_USER+12)
- #define DTM_GETCOLDATALEN (WM_USER+13)
- #define DTM_SETCOLDATALEN (WM_USER+14)
- #define DTM_GETCOLWIDTH (WM_USER+15)
- #define DTM_SETCOLWIDTH (WM_USER+16)
- #define DTM_GETCOLFORMAT (WM_USER+17)
- #define DTM_SETCOLFORMAT (WM_USER+18)
- #define DTM_GETCOLHEAD (WM_USER+19)
- #define DTM_SETCOLHEAD (WM_USER+20)
- #define DTM_GETCOLNAME (WM_USER+21)
- #define DTM_SETCOLNAME (WM_USER+22)
- #define DTM_GETCOLEXTRA1 (WM_USER+23)
- #define DTM_SETCOLEXTRA1 (WM_USER+24)
- #define DTM_GETCOLEXTRA2 (WM_USER+25)
- #define DTM_SETCOLEXTRA2 (WM_USER+26)
- #define DTM_GETCOLNUMBER (WM_USER+27)
- #define DTM_SHOWDROPDOWN (WM_USER+28)
- #define DTM_ISDROPDOWN (WM_USER+29)
- #define DTM_GETROWCOUNT (WM_USER+30)
- #define DTM_GETTOPINDEX (WM_USER+32)
- #define DTM_SETTOPINDEX (WM_USER+33)
- #define DTM_GETLEFTINDEX (WM_USER+34)
- #define DTM_SETLEFTINDEX (WM_USER+35)
- #define DTM_GETCURROW (WM_USER+36)
- #define DTM_GETCURCOL (WM_USER+37)
- #define DTM_SETCURCELL (WM_USER+38)
- #define DTM_GETACCESSROW (WM_USER+39)
- #define DTM_GETACCESSCOL (WM_USER+40)
- #define DTM_SETACCESSPOS (WM_USER+41)
- #define DTM_READROW (WM_USER+42)
- #define DTM_UPDATEROW (WM_USER+43)
- #define DTM_INSERTROW (WM_USER+44)
- #define DTM_DELETEROW (WM_USER+45)
- #define DTM_MOVEROWTO (WM_USER+46)
- #define DTM_REPLICATEROWTO (WM_USER+47)
- #define DTM_READCOL (WM_USER+48)
- #define DTM_UPDATECOL (WM_USER+49)
- #define DTM_INSERTCOL (WM_USER+90)
- #define DTM_DELETECOL (WM_USER+50)
- #define DTM_MOVECOLTO (WM_USER+51)
- #define DTM_REPLICATECOLTO (WM_USER+52)
- #define DTM_READCELL (WM_USER+53)
- #define DTM_UPDATECELL (WM_USER+54)
- #define DTM_READCELLRECT (WM_USER+55)
- #define DTM_GETSELMODE (WM_USER+56)
- #define DTM_SETSELMODE (WM_USER+57) /* not supported */
- #define DTM_GETROWSTATUS (WM_USER+58)
- #define DTM_GETCURROWSEL (WM_USER+91)
- #define DTM_SELROW (WM_USER+59)
- #define DTM_SELROWRANGE (WM_USER+60)
- #define DTM_SELALLROWS (WM_USER+61)
- #define DTM_GETROWSELCOUNT (WM_USER+62)
- #define DTM_GETROWSELLIST (WM_USER+63)
- #define DTM_GETROWSELFIRST (WM_USER+64)
- #define DTM_GETROWSELNEXT (WM_USER+65)
- #define DTM_GETCOLSTATUS (WM_USER+66)
- #define DTM_GETCURCOLSEL (WM_USER+92)
- #define DTM_SELCOL (WM_USER+67)
- #define DTM_SELCOLRANGE (WM_USER+68)
- #define DTM_SELALLCOLS (WM_USER+69)
- #define DTM_GETCOLSELCOUNT (WM_USER+70)
- #define DTM_GETCOLSELLIST (WM_USER+71)
- #define DTM_GETCOLSELFIRST (WM_USER+72)
- #define DTM_GETCOLSELNEXT (WM_USER+73)
- #define DTM_GETCHARSEL (WM_USER+74)
- #define DTM_SETCHARSEL (WM_USER+75)
- #define DTM_GETVISROWS (WM_USER+81)
- #define DTM_GETVISCOLS (WM_USER+82)
- #define DTM_GETNOTIFYROW (WM_USER+83)
- #define DTM_GETNOTIFYCOL (WM_USER+84)
- #define DTM_GETCLICKPOS (WM_USER+85)
- #define DTM_GETCOLCFGSIZE (WM_USER+87)
- #define DTM_GETCOLCFG (WM_USER+88)
- #define DTM_SETCOLCFG (WM_USER+89)
- #define DTM_GETEDITKEY (WM_USER+93)
- #define DTM_SETEDITKEY (WM_USER+94)
- #define DTM_EDITCURRCELL (WM_USER+95)
- #define DTM_GETDTMETRICS (WM_USER+96)
-
- #define DTM_FIRSTMSG (WM_USER+0)
- #define DTM_LASTMSG (WM_USER+96)
-
- /****** Notification Codes ******/
- #define DTN_CREATE 1
- #define DTN_DESTROY 2
- #define DTN_ERRSPACE 3
- #define DTN_SETFOCUS 4
- #define DTN_KILLFOCUS 5
- #define DTN_HSCROLL 6
- #define DTN_VSCROLL 7
- #define DTN_CELLFULL 8
- #define DTN_SELCHANGE 9
- #define DTN_MODECHANGE 10
- #define DTN_DBLCLK 11
- #define DTN_CHANGE 12
- #define DTN_UPDATE 13
- #define DTN_DROPDOWN 14
- #define DTN_POSCHANGE 15
- #define DTN_BEGINEDIT 16
- #define DTN_ABORTEDIT 17
- #define DTN_CLICKED 18
-
- #define DTN_COLSIZE 20
- #define DTN_COLADDED 21
- #define DTN_COLDELETED 22
- #define DTN_COLMOVED 23
- #define DTN_COLNAMECHANGED 24
-
- #define DTN_NOTAVAILABLE 99
-
- //***** DTM_GETNOTIFYROW/COL return codes *****
- #define DTPOS_HEADINGS (ROWNUM)(-1) /* "row number" of heading row */
- #define DTPOS_LABELS (COLNUM)(-2) /* "column number" of label column */
- #define DTPOS_NOWHERE (WORD)(-3) /* empty area in data table */
-
- //***** DTM_GETCLICKPOS return codes *****
-
- #ifndef RC_INVOKED
- #ifndef __SQLVIEW__
-
- typedef enum {NOWHERE, ONHEADING, ONGRIDLINE, ONCELL, ONLABEL} TABLEPOS;
-
- #else
-
- #define TABLEPOS_NOWHERE 0
- #define TABLEPOS_ONHEADING 1
- #define TABLEPOS_ONGRIDLINE 2
- #define TABLEPOS_ONCELL 3
- #define TABLEPOS_ONLABEL 4
-
- #endif /* else for ifndef __SQLVIEW__ */
- #endif /* ifndef RC_INVOKED */
-
- //***** SetAccessPos special locations *****
- #define DTPOS_LAST (DWORD)(-1) /* last row or column */
- #define DTPOS_AFTERLAST (DWORD)(-2) /* after the last (insert & move only) */
- #define DTPOS_INVALID (DWORD)(-3) /* invalid pos (ie read past last row) */
-
- //***** Row/Column Access Modes *****
- #define DTA_ACCESS 0x0000 /* start with position passed in SetAccessPos */
- #define DTA_CURRENT 0x0001 /* start with current object */
- #define DTA_SELFIRST 0x0002 /* start with first selected row or column */
- #define DTA_SELNEXT 0x0003 /* start with next selected row or column */
- #define DTA_AUTOINC 0x0004 /* increment after access */
- #define DTA_AUTODEC 0x0008 /* decrement after access */
- #define DTA_COLMAJOR 0x0010 /* row # changes before column # */
-
- //***** EditCurrCell parameter values *****
- #define DT_BEGINEDIT 1
- #define DT_ENDEDIT 2
- #define DT_ABORTEDIT 3
-
- //***** GetDTMetrics parameter values *****
- #define DT_ROWHEIGHT 1
- #define DT_ROWWIDTH 2
- #define DT_HEADINGHT 3
- #define DT_LABELWIDTH 4
-
- //***** Data Table Error Codes *****
- #define DTE_OKAY (DWORD)0 /* NO ERROR */
- #define DTE_NOTALLOWED (DWORD)-1 /* operation not allowed */
- #define DTE_MESSAGENUM (DWORD)-2 /* invalid message */
- #define DTE_CELLADDR (DWORD)-3 /* invalid cell address */
- #define DTE_COLNUM (DWORD)-4 /* invalid column number */
- #define DTE_ROWNUM (DWORD)-5 /* invalid row number */
- #define DTE_NUMCOLS (DWORD)-6 /* invalid number of columns */
- #define DTE_NUMROWS (DWORD)-7 /* invalid number of rows */
- #define DTE_COLWIDTH (DWORD)-8 /* invalid column width */
- #define DTE_COLTYPE (DWORD)-9 /* invalid column data type */
- #define DTE_FIXEDLENGTH (DWORD)-10 /* column data type has fixed length */
- #define DTE_TRUNCATED (DWORD)-11 /* data buffer was truncated */
- #define DTE_NULLPOINTER (DWORD)-12 /* null pointer passed to function*/
- #define DTE_NULLVALUE (DWORD)-13 /* null parameter passed to function */
- #define DTE_NOMEMORY (DWORD)-21 /* insufficient memory */
- #define DTE_NOMEMLOCK (DWORD)-22 /* cant lock memory */
- #define DTE_STRINGTABLE (DWORD)-23 /* fatal string table size error */
- #define DTE_OVERFLOW (DWORD)-24 /* exceeded max allowable length */
- #define DTE_NORESLOAD (DWORD)-25 /* cant load resource */
- #define DTE_NORESLOCK (DWORD)-26 /* cant lock resource */
-
- /************** Data Table Configuration Structures ************************
- Ver. Date Changes
- ---- -------- -----------------------------------------------------------
- 1.0 10/16/91 New structures (did not contain version stamp)
- 1.1 11/05/91 Added structure lengths & version stamp
- 1.2 11/14/91 Added private window style bits
- 1.3 12/03/91 Column widths are now in dialog coords, was screen coords
- ***************************************************************************/
-
- #define CFGSTRUCTVERSION 13 /* current version (1.3) */
- #define MINCFGSTRUCTVER 11 /* earliest supported version (1.1) */
-
- #ifndef RC_INVOKED
- #ifndef __SQLVIEW__
-
- typedef struct
- {
- WORD wStructLen; // length of this structure
- int nVersion; // version number of these structures, in tenths
- COLNUM NumCols; // total # columns
- WORD wWndStyle; // private window style bits
- } TABLECFGSTRUCT;
-
- typedef struct
- {
- WORD wStructLen; // length of this structure, including the strings
- COLSTYLE ColStyle; // column style
- COLTYPE ColType; // internal data type
- COLLEN DataLen; // bytes of storage required for this type
- WORD wColWidth; // column width in window
- DWORD dwExtra1; // extra space for user-defined info
- DWORD dwExtra2; // extra space for user-defined info
- // szFormat; null-terminated format string
- // szHeading; null-terminated column heading
- // szName; null-terminated column name
- } COLUMNCFGSTRUCT;
-
- typedef TABLECFGSTRUCT *PTABLECFGSTRUCT;
- typedef TABLECFGSTRUCT far *LPTABLECFGSTRUCT;
-
- typedef COLUMNCFGSTRUCT *PCOLUMNCFGSTRUCT;
- typedef COLUMNCFGSTRUCT far *LPCOLUMNCFGSTRUCT;
-
- //***************************************************************************
- // Functions avaialable to applications for setting up data tables
-
- WORD FAR PASCAL DataTblLoadLib (void);
- DWORD FAR PASCAL SetupDataTbl (HANDLE hInst, LPSTR szResName, HWND hCtl);
- DWORD FAR PASCAL SetupDlgDataTbl (HANDLE hInst, HWND hDlg, int nID, LPSTR szResName, LPSTR szDlgName);
- DWORD FAR PASCAL SetupMultiDataTbl (HANDLE hInst, HWND hDlg, LPSTR szDlgName);
-
- #endif /* ifndef __SQLVIEW__ */
- #endif /* ifndef RC_INVOKED */
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /* ifndef DATATBL_INCLUDED */
-