home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / mltcol.zip / EDIT.H < prev    next >
Text File  |  1993-05-27  |  3KB  |  55 lines

  1. #define ES_OPTIONAL          1
  2. #define ES_REQUIRED          2
  3.  
  4. #define ES_OPTIONAL_RDONLY   ES_OPTIONAL | ES_READONLY
  5. #define ES_REQUIRED_RDONLY   ES_REQUIRED | ES_READONLY
  6.  
  7. /*----------------------------------------------------------------------*/
  8. /*  FORMAT structure                                                    */
  9. /*----------------------------------------------------------------------*/
  10. typedef  struct  {
  11.     USHORT        usLimit;              /* Maximum count input limit    */
  12.     ULONG         fFormat;
  13.     USHORT      (*pfnValidChar)( int ); /* func to validate each char   */
  14.     CHAR         *pszText;              /* Text + Mask                  */
  15.     CHAR         *pszTextOnly;          /* Text only no mask            */
  16.     CHAR         *pszBlank;             /* Blank field image            */
  17. }   FORMAT;
  18.  
  19. /*----------------------------------------------------------------------*/
  20. /*  SUBCLASSCTRLDATA                                                 */
  21. /*                                                                      */
  22. /*      A pointer to this structure is saved in the QWL_USER word of    */
  23. /*      each user defined entry field. If it is a 'Formatted' field     */
  24. /*      only the pFmt pointer is used. For 'A', '9', 'N', 'X' ... fields*/
  25. /*      the pFldCtrl pointer is used.                                   */
  26. /*----------------------------------------------------------------------*/
  27. typedef  struct  {
  28.     UCHAR         ucFldType;        /* $, F (Fmt'd), 9#APNXM*DdYy!|L    */
  29.     USHORT        usLineStyle;      /* Required, Optional or Read Only  */
  30.     ULONG         ulFlags;          /* control flags see below          */
  31.     ULONG         ulLineType;       /* Type of line to display solid .. */
  32.     ULONG         ulLineColor;      /* current color of the line        */
  33.     CHAR         *pCharList;        /* restricted list of valid chars   */
  34.  
  35.     FORMAT        sFmt;             /* ptr to 'Formatted' fields        */
  36.     BOOL          fValidState;      /*  Previous entry field text       */
  37. }   SUBCLASSCTRLDATA;
  38.  
  39. /*----------------------------------------------------------------------*/
  40. /*  Structure used to list the valid Formatting characters and the      */
  41. /*  function to validate that set of characters.                        */
  42. /*----------------------------------------------------------------------*/
  43. typedef  struct  {
  44.     USHORT  usPic;                  /* Mask Character               */
  45.     int   (*pfnPicFunc) ( int c );  /* Validation func for Mask Chr */
  46. }   PICINFO;
  47.  
  48. /*----------------------------------------------------------------------*/
  49. /*  Prototypes used by the edit class entry fields                      */
  50. /*----------------------------------------------------------------------*/
  51. SUBCLASSCTRLDATA  *
  52.          EntryFldCreate   ( HWND  hwnd,  CREATESTRUCT *pCr );
  53. void     EntryFldDestroy  ( HWND  hwnd );
  54. void     EntryFldPaint    ( HWND  hwnd );
  55.