.GRP Group File Format Overview (3.1) This topic describes the format of group files used by the Microsoft Windows operating system. A group file contains data that Microsoft Windows Program Manager (PROGMAN.EXE) uses to display the icons of the applications in a group, start the applications in a group, and open related documents. Organization of a Group File The first element in a group file is the group-file header. The data in the group-file header includes an identifier, a count of bytes, a count of items in the file, and information that the system uses to display group icons. The group-file header is followed by one or more entries that contain item data describing the icon of an application. These entries include the coordinates that the system uses to display the icon; the count of bytes in the header, AND mask, and XOR mask for the icon; and the offset to the header, AND mask, and XOR mask for the icon. The item data entries are followed by entries that contain the color data for the application icons. For more information about these entries, see Graphics Device Interface Overview. For Windows version 3.1, the icon data is followed by tag data. The tag data contains information that Program Manager uses when it displays the Program Item Properties dialog box. This data identifies the directory in which the application is stored and the shortcut key (if one exists). It also specifies the state of the Run Minimized box. Group-File Structures This topic uses C structures to depict the organization of data within a group file. These structures were created solely to show the organization of data in a resource; they do not appear in any of the include files shipped with the Microsoft Windows 3.1 Software Development Kit (SDK). Group-File Header The group-file header contains general information about the group file. The GROUPHEADER structure has the following form: struct tagGROUPHEADER { char cIdentifier[4]; WORD wCheckSum; WORD cbGroup; WORD nCmdShow; RECT rcNormal; POINT ptMin; WORD pName; WORD wLogPixelsX; WORD wLogPixelsY; WORD wBitsPerPixel; WORD wPlanes; WORD cItems; WORD rgiItems[cItems]; }; Following are the members in the GROUPHEADER structure: cIdentifier Identifies an array of 4 characters. If the file is a valid group file, this array must contain the string "PMCC". wCheckSum Specifies the negative sum of all words in the file (including the value specified by the wCheckSum member). cbGroup Specifies the size of the group file, in bytes. nCmdShow Specifies whether Program Manager should display the group in minimized, normal, or maximized form. This member can be one of the following values: Value Flag 0x00 SW_HIDE 0x01 SW_SHOWNORMAL 0x02 SW_SHOWMINIMIZED 0x03 SW_SHOWMAXIMIZED 0x04 SW_SHOWNOACTIVATE 0x05 SW_SHOW 0x06 SW_MINIMIZE 0x07 SW_SHOWMINNOACTIVATE 0x08 SW_SHOWNA 0x09 SW_RESTORE rcNormal Specifies the coordinates of the group window (the window in which the group icons appear). It is a rectangular structure. ptMin Specifies the coordinate of the lower-left corner of the group window with respect to the parent window. It is a point structure. pName Specifies an offset from the beginning of the file to a null-terminated string that specifies the group name. wLogPixelsX Specifies the horizontal resolution of the display for which the group icons were created. wLogPixelsY Specifies the vertical resolution of the display for which the group icons were created. wBitsPerPixel Specifies the format of the icon bitmaps, in bits per pixel. wPlanes Specifies the count of planes in the icon bitmaps. cItems Specifies the number of ITEMDATA structures in the rgiItems array. This is not necessarily the number of items in the group, because there may be NULL entries in the rgiItems array. rgiItems[cItems] Specifies an array of ITEMDATA structures. Item Data The item data contains information about a particular application and its icon. The ITEMDATA structure has the following form: struct tagITEMDATA { POINT pt; WORD iIcon; WORD cbResource; WORD cbANDPlane; WORD cbXORPlane; WORD pHeader; WORD pANDPlane; WORD pXORPlane; WORD pName; WORD pCommand; WORD pIconPath; }; Following are the members in the ITEMDATA structure: pt Specifies the coordinates for the lower-left corner of an icon in the group window. It is a point structure. iIcon Specifies the index value for an icon. This value indicates the position of the icon in an executable file. cbResource Specifies the count of bytes in the icon resource, which appears in the executable file for the application. cbANDPlane Specifies the count of bytes in the AND mask for the icon. cbXORPlane Specifies the count of bytes in the XOR mask for the icon. pHeader Specifies an offset from the beginning of the group file to the resource header for the icon. pANDPlane Specifies an offset from the beginning of the group file to the AND mask for the icon. pXORPlane Specifies an offset from the beginning of the group file to the XOR mask for the icon. pName Specifies an offset from the beginning of the group file to a string that specifies the item name. pCommand Specifies an offset from the beginning of the group file to a string that specifies the name of the executable file containing the application and the icon resource(s). pIconPath Specifies an offset from the beginning of the group file to a string that specifies the path where the executable file is located. This path can be used to extract icon data from an executable file. Tag Data The tag data contains general information used to display the Program Item Properties dialog box. The TAGDATA structure has the following form: struct tagTAGDATA{ WORD wID; WORD wItem; WORD cb; BYTE rgb[1]; }; Following are the members in the TAGDATA structure: wID Specifies the type of tag data. This member can have one of the following values: Value Meaning 0x8101 Array at which the rgb member points is a null-terminated string that identifies the path for the application. 0x8102 Array at which the rgb member points is a 16-bit word value that identifies the shortcut key specified by the user. 0x8103 Minimized version of the item is displayed. If this value is specified, the array to which the rgb member points is not present in the structure and the value of the cb member is 0x06. wItem Specifies the index to the item the tag data refers to. If the data is not specific to a particular item, this value is 0xFFFF. cb Specifies the size of the TAGDATA structure, in bytes. rgb Specifies an array of byte values. The length of this array can be found by subtracting 6 from the value of the cb member.