How Windows 98 Handled Desktop Icon Arrangement
In Microsoft Windows 98, desktop icon arrangement and auto-arrange functionality were managed by the Windows Explorer shell process through a dedicated list-view control and system registry entries. This article explains the technical architecture behind Windows 98 desktop icon management, detailing how coordinate tracking, the "Auto Arrange" mode, grid alignment, and screen resolution changes were processed by the operating system.
The Desktop Architecture and SysListView32
In Windows 98, the desktop is not a static canvas; it is a standard
Windows user interface control managed by explorer.exe. The
operating system constructs the desktop via a specific window hierarchy:
the top-level Progman (Program Manager) window contains
SHELLDLL_DefView, which in turn hosts a standard
SysListView32 control configured in large icon view mode
(LVS_ICON).
Every desktop item—whether a file stored in
C:\Windows\Desktop, a system object like "My Computer," or
an Active Desktop component—corresponds to an item within this
SysListView32 control.
Coordinate Tracking and Manual Placement
When icons were placed manually with auto-arrangement disabled, Windows 98 tracked the discrete \((X, Y)\) coordinate space for each item:
- Position Storage: Windows 98 used the
LVM_SETITEMPOSITIONandLVM_GETITEMPOSITIONWin32 messages to set and query the coordinates of each icon relative to the primary display's top-left origin \((0,0)\). - Registry Persistence: Icon coordinates and user
layout preferences were saved to the Windows Registry upon system
shutdown, user logoff, or desktop refresh. The data was stored as binary
stream values under
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Desktop. - Snap to Grid: The "Line Up Icons" option calculated
the nearest virtual cell based on system metrics (configurable icon
spacing metrics stored in
Win.iniand the registry) and snapped items to those offsets without altering their relative sequential order.
The Auto-Arrange Mechanism
When a user enabled "Auto Arrange" from the desktop context menu,
Windows 98 applied the LVS_AUTOARRANGE window style to the
underlying SysListView32 control:
- Grid Calculation: The system determined the
boundaries of the visible client area and created a structured,
invisible grid based on the
IconSpacingandIconVerticalSpacingsystem metrics. - Sequential Reflow: Icons were reordered sequentially starting from the upper-left corner \((0,0)\). Windows 98 filled columns from top to bottom before progressing to the next column to the right (or right-to-left in localized, right-to-left language editions).
- Locking Coordinates: While
LVS_AUTOARRANGEwas active, users could drag an icon to change its sequence within the list, but manual off-grid positioning was overridden. Dropping an icon between two existing items prompted the shell to shift subsequent items down or to the next column to accommodate the insertion.
Handling Screen Resolution Changes
When a user changed display resolutions, the operating system
broadcasted the WM_DISPLAYCHANGE message to all top-level
windows. The Windows 98 shell handled this event specifically:
- With Auto-Arrange Enabled: The shell adjusted the bounds of the list-view control and recalculated the grid to fit the new horizontal and vertical pixel dimensions, reflowing any icons that exceeded the lower or right-hand boundaries.
- With Auto-Arrange Disabled: If the resolution decreased (e.g., from 1024x768 to 800x600), icons placed outside the new viewable boundary were often pushed inward to ensure visibility, occasionally disrupting customized layouts. Windows 98 did not maintain independent position maps per resolution, which frequently caused icons to clump together after reverting to higher display resolutions.