home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / MSJV5-6.ZIP / FORM2.ZIP / CONTROL.H next >
Text File  |  1990-11-01  |  4KB  |  103 lines

  1. /*
  2.  * EIKON CONTROL LIBRARY - GENERAL HEADER FILE
  3.  *
  4.  * LANGUAGE      : Microsoft C 5.1
  5.  * MODEL         : small or medium
  6.  * ENVIRONMENT   : Microsoft Windows 3.0 SDK
  7.  * STATUS        : operational
  8.  *
  9.  * This header file defines the various identifiers and structures
  10.  * necessary to use one or more controls from the Eikon library of
  11.  * user-defined controls.  
  12.  *
  13.  * Note that this header file assumes that it is listed after
  14.  * the windows include file - windows.h.
  15.  *
  16.  *    Copyright (C) 1989-90
  17.  *    Eikon Systems, Inc.
  18.  *    989 East Hillsdale Blvd, Suite 260
  19.  *    Foster City, California 94404
  20.  * 
  21.  */
  22.  
  23. /* general size definitions */
  24. #define  CTLTYPES       12          /* number of control types */
  25. #define  CTLDESCR       22          /* size of control menu name */
  26. #define  CTLCLASS       20          /* max size of class name */
  27. #define  CTLTITLE       94          /* max size of control text */
  28.  
  29. /* ordinal values for functions */
  30. #define  ORDWEP            1           /* window exit function */
  31. #define  ORDINFO        2           /* information function */
  32. #define  ORDSTYLE       3           /* style function */
  33. #define  ORDFLAGS       4           /* control flags function */
  34. #define  ORDWNDFN       5           /* window function */
  35. #define  ORDDLGFN       6           /* style dialog function */
  36.  
  37. /* */
  38.  
  39. /*
  40.  * CONTROL STYLE DATA STRUCTURE
  41.  *
  42.  * This data structure is used by the class style dialog function
  43.  * to set and/or reset various control attributes.
  44.  *
  45.  */
  46.  
  47. typedef struct {
  48.    WORD        wX;                     /* control x origin */
  49.    WORD        wY;                     /* control y origin */
  50.    WORD        wCx;                    /* control width */
  51.    WORD        wCy;                    /* control height */
  52.    WORD        wId;                    /* control id */
  53.    DWORD       dwStyle;                /* control style */
  54.    char        szClass[CTLCLASS];      /* control class name */
  55.    char        szTitle[CTLTITLE];      /* control text */
  56. } CTLSTYLE;
  57.  
  58. typedef CTLSTYLE *         PCTLSTYLE;
  59. typedef CTLSTYLE FAR *     LPCTLSTYLE;
  60.  
  61. /* */
  62.  
  63. /*
  64.  * CONTROL DATA STRUCTURE
  65.  *
  66.  * This data structure is returned by the control options function
  67.  * when enquiring about the capabilities of a particular control.
  68.  * Each control may contain various types (with predefined style
  69.  * bits) under one general class.
  70.  *
  71.  * The width and height fields are used to provide the host
  72.  * application with a suggested size.  The values in these fields
  73.  * reference particular system metric calls.
  74.  *
  75.  */
  76.  
  77. /* control type definitions */
  78. #define  CT_STD         0x0000  
  79.  
  80. typedef struct {
  81.    WORD        wType;                  /* control type */
  82.    WORD        wWidth;                 /* suggested width (RC units) */
  83.    WORD        wHeight;                /* suggested height (RC units) */
  84.    DWORD       dwStyle;                /* default style */
  85.    char        szDescr[CTLDESCR];      /* menu name */
  86. } CTLTYPE;
  87.  
  88. typedef struct {
  89.    WORD        wVersion;               /* control version */
  90.    WORD        wCtlTypes;              /* control types */
  91.    char        szClass[CTLCLASS];      /* control class name */
  92.    char        szTitle[CTLTITLE];      /* control title */
  93.    char        szReserved[10];         /* reserved for future use */
  94.    CTLTYPE     Type[CTLTYPES];         /* control type list */
  95. } CTLINFO;
  96.  
  97. typedef CTLINFO *          PCTLINFO;
  98. typedef CTLINFO FAR *      LPCTLINFO;
  99.  
  100. /* id to string translation function prototypes */
  101. typedef DWORD  (FAR PASCAL *LPFNSTRTOID)( LPSTR );
  102. typedef WORD   (FAR PASCAL *LPFNIDTOSTR)( WORD, LPSTR, WORD );
  103.