API Reference | developer.brewmp.com API Reference | developer.brewmp.com


API Reference


Brew Release
Brew MP 1.0.2
See Also
IForm IForm_SetRes() IForm_SetResText() IForm_SetResBGImage() IForm_SetResTitleImage()
This data type defines a descriptor for form data stored in a BREW resource file, identifying where the information can be found by file name and resource ID. This information can then easily be stored as a form property to identify the value of text, bitmaps and other pieces of data displayed by a form. For example, the image to be displayed in the background of a form could be stored in a resource file, with the file name and the ID of the appropriate bitmap resource stored together in a FormRes data structure. A pointer to this structure, in turn, would be stored in the FID_BACKGROUND property of the form.
  • id:     Identifies the resource ID within the 'pdata' resource file where the
               particular data type can be found.  When 'id' is zero, 'pdata' points to
               the data itself, rather than to a resource file name -- i.e. the data is
               already in memory and is NOT in a resource file.
  • pdata:  Pointer to the name of the resource file (encoded as a char * rather than
               an AECHAR) where the data described by 'FormRes' can be found.  However,
               when 'id' is zero, 'pdata' points to the data itself, rather than to the
               name of a resource file.  For example, when FormRes is being used to
               identify a text string, and 'id' is zero, 'pdata' would point to the AECHAR
               that contained the text string.  If 'id' is any other value, 'pdata' would
               contain the name of the resource file containing the string.
  •    typedef struct FormRes {
          uint16  id;
          void    *pdata;
       } FormRes;