home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c045 / 2.ddi / INCLUDE / CUSTCNTL.H$ / CUSTCNTL.bin
Encoding:
Text File  |  1992-01-01  |  2.5 KB  |  75 lines

  1. /*
  2.  * CUSTOM CONTROL LIBRARY - HEADER FILE
  3.  */
  4.  
  5. /* general size definitions */
  6. #define  CTLTYPES 12 /* number of control types */
  7. #define  CTLDESCR 22 /* size of control menu name */
  8. #define  CTLCLASS 20 /* max size of class name */
  9. #define  CTLTITLE 94 /* max size of control text */
  10.  
  11. /*
  12.  * CONTROL STYLE DATA STRUCTURE
  13.  *
  14.  * This data structure is used by the class style dialog function
  15.  * to set and/or reset various control attributes.
  16.  */
  17.  
  18. typedef struct {
  19.    WORD  wX;   /* x origin of control */
  20.    WORD  wY;   /* y origin of control */
  21.    WORD  wCx;  /* width of control */
  22.    WORD  wCy;  /* height of control */
  23.    WORD  wId;  /* control child id */
  24.    DWORD dwStyle; /* control style */
  25.    char  szClass[CTLCLASS];   /* name of control class */
  26.    char  szTitle[CTLTITLE];   /* control text */
  27. } CTLSTYLE;
  28.  
  29. typedef CTLSTYLE *PCTLSTYLE;
  30. typedef CTLSTYLE FAR *LPCTLSTYLE;
  31.  
  32. /*
  33.  * CONTROL DATA STRUCTURE
  34.  *
  35.  * This data structure is returned by the control options function
  36.  * when enquiring about the capabilities of a particular control.
  37.  * Each control may contain various types (with predefined style
  38.  * bits) under one general class.
  39.  *
  40.  * The width and height fields are used to provide the host
  41.  * application with a suggested size.  The values in these fields
  42.  * could be either in pixels or in rc coordinates.  If it is in pixel,
  43.  * the most sigificant bit(MSB) is on.  If the MSB is off, it is in rc
  44.  * coordinates.
  45.  *
  46.  * The cursor and bitmap handles reference objects which can be
  47.  * used by the dialog editor in the placement and definition of
  48.  * new, user-defined control classes.  However, dialog editor in win30
  49.  * does not use these fields.
  50.  */
  51.  
  52. typedef struct {
  53.    WORD  wType;   /* type style */
  54.    WORD  wWidth;  /* suggested width */
  55.    WORD  wHeight; /* suggested height */
  56.    DWORD dwStyle; /* default style */
  57.    char  szDescr[CTLDESCR];   /* menu name */
  58. } CTLTYPE;
  59.  
  60. typedef struct {
  61.    WORD  wVersion;   /* control version */
  62.    WORD  wCtlTypes;  /* control types */
  63.    char  szClass[CTLCLASS];   /* control class name */
  64.    char  szTitle[CTLTITLE];   /* control title */
  65.    char  szReserved[10];   /* reserved for future use */
  66.    CTLTYPE Type[CTLTYPES]; /* control type list */
  67. } CTLINFO;
  68.  
  69. typedef CTLINFO *PCTLINFO;
  70. typedef CTLINFO FAR *LPCTLINFO;
  71.  
  72. /* These two function prototypes are used by dialog editor */
  73. typedef DWORD  (FAR PASCAL *LPFNSTRTOID)( LPSTR );
  74. typedef WORD   (FAR PASCAL *LPFNIDTOSTR)( WORD, LPSTR, WORD );
  75.