home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / magazine / msysjour / vol05 / 04 / control / control.h next >
Text File  |  1990-07-01  |  4KB  |  110 lines

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