Resources | developer.brewmp.com Resources | developer.brewmp.com

Developer

resources

Creating object resources

An object resource can be of different formats or types, but always has a MIME type associated with it. Object resources are often graphical images. Another common use for object resources is to embed HTML files in your application resources. For this use, the data is ASCII with the MIME type set to "text/html." Data for the object resource can be specified in either hex or text format, or pulled in from a file.

To create object resources

  1. From the Brew MP Resource Manager window, click Insert > New Object, or press Shift+Ctrl+O.

    Note: An alternate method for loading an object is to locate it in Windows Explorer, click Object in the Resource Manager window, and drag-and-drop the object file(s) from Windows Explorer into the right pane of the Resource Manager window.

    All the object resources are listed with a new object resource selected, and the new object resource properties are displayed in the properties control panel.

  2. Make entries in the following fields:
    Field Make this entry
    ID A number between 5001 to 6000 is assigned automatically; however, it can be changed if you want a specific ID assigned. The ID must be a unique integer among object resources within the same resource file (CAR).
    Name The name must be an array of contiguous characters (no spaces between characters) that is valid for variable names in C/C++.

    Note: Name strings are not saved in the binary BAR file when compiled. When a BAR file is decompiled into CAR format, all Name fields are automatically generated.

    Comment Enter any comments for the resource.

    Note: Comment strings are not saved in the binary BAR file when compiled. Thus, if a particular BAR file is decompiled back into a CAR format, all comment fields will be blank.

    Source Select one of the following formats to specify the type of source for the resource from the drop-down list.
    • Text : The data is in a text format.
    • File: Specifies the data is contained in a file. Currently only disk files are supported.
    • Hex: The data is in hexadecimal format.
    Filename The filename field becomes active when you select file in the Source field drop-down menu. Select Browse to navigate to the location of the desired file. A default name is assigned to the resource you are creating. The name must be an array of contiguous characters (no spaces between characters) that is valid for variable names in C/C++.

    Note: Name strings are not saved in the binary BAR file when it is compiled. Thus, if a particular BAR file is decompiled back into a CAR format, all Name fields are automatically generated.

    Encoding This drop-down list is enabled only when you select Text as the data source. Select the text format from the drop-down list.

    Note: When KSC5601 is specified as the encoding format and the file is saved, CP949 is subsequently shown as the encoding format. This is because CP949 is a super-set of KSC5601.

    Note: For Text source data, the data is encoded prior to compiling the binary BAR file. No Brew MP-specific BOM is inserted for object resources.

    Mime Type Enter the associated mime type. The Resource Manager attempts to detect the mime type automatically.
  3. When you finish entering the object properties, click File > Save.

    The Resource Manager performs data validation on the information and then updates the resource information in the list view.