How Windows 3.11 Organized Icons in GRP Files
In Microsoft Windows 3.11, the Program Manager shell organized
application shortcuts and icons using proprietary binary files with the
.GRP extension. Rather than reflecting actual folders on
the hard drive or using individual shortcut files like modern operating
systems, Program Manager stored the visual coordinates, metadata, and
cached graphical representations of icons inside these group files. This
article explains the internal structure of .GRP files and
the mechanism Windows 3.11 used to position and render program
icons.
The Role of the Program Group File
Program Manager served as the primary user interface for Windows
3.11. Applications were organized into visual windows called "Program
Groups" (such as Main, Accessories, and Startup). Each group
corresponded to a physical file in the C:\WINDOWS
directory, typically named after the group (for example,
MAIN.GRP).
The master list of these groups was registered in the
PROGMAN.INI configuration file under the
[Groups] section. When Program Manager loaded, it read this
initialization file and opened each respective .GRP binary
file to reconstruct the workspace.
Binary Structure of
.GRP Files
A .GRP file was a specialized 16-bit binary format
structured around fixed headers and variable-length data blocks:
The Group Header (
GROUPHEADER): At the beginning of the file, a header structure stored global properties for the group window itself. This included a magic identifier (commonly ASCIIPMCC), a checksum to detect corruption, the default view mode, the window's size and screen coordinates, and the total count of program items contained within the group.The Item Offset Array: Immediately following the header, the file maintained an array of 16-bit file pointers (offsets). Each offset directed Program Manager to the location of an individual
ITEMDATAstructure within the file. If an icon was deleted, its offset entry was set to zero or reclaimed during file compaction.Item Data Blocks (
ITEMDATA): For every program icon in the group, a dedicated data block contained the operational and visual parameters needed to display and execute the shortcut:- X and Y Coordinates: The exact pixel coordinates defining where the icon rested relative to the interior of the group window.
- Command Line: A null-terminated string holding the executable path and runtime arguments.
- Item Name: A null-terminated string storing the label displayed beneath the icon.
- Icon Resource Index: An integer indicating which
internal icon index to pull from the target executable or dynamic-link
library (
.DLL).
Cached Icon Bitmaps
To maintain performance on hardware with limited processing power and
slow disk input/output, Windows 3.11 did not extract icon art from
executable files on every startup. Instead, the .GRP file
cached the icon data directly inside the item record.
Each ITEMDATA block stored the icon’s device-independent
bitmap (DIB) data, including color masks and monochrome XOR/AND
bitmasks. Program Manager read this cached graphical data sequentially
into memory when loading the group window, allowing instant rendering
without querying the target program files across the disk.
Coordinate Systems and Layout Management
Program Manager handled icon positioning in two distinct ways:
- Freeform Layout: By default, users could freely
drag icons to any location inside the window. When dropped, the target X
and Y coordinate offsets were written directly to that icon's
ITEMDATAentry in the.GRPfile. - Auto Arrange: If the "Auto Arrange" option was
enabled in Program Manager, the application disregarded custom
coordinates when rendering. Instead, it recalculated positions
algorithmically based on the current window width and the icon spacing
settings defined in
WIN.INI(specificallyIconSpacingandIconVerticalSpacing). However, when moving an icon with Auto Arrange on, its sequence relative to other items was updated by rearranging the offset pointers inside the file.
Changes made to icon arrangements were held in system memory during
the session and written back to the respective .GRP files
either when a group window was modified or during the shutdown routine
of Windows 3.11.