How Windows 3.11 Stored File Manager Window Positions

In Microsoft Windows 3.11, File Manager (WINFILE.EXE) stored its window positions, states, and open directory views in a dedicated initialization file named WINFILE.INI. Because 16-bit Windows predated the widespread adoption of the unified Windows Registry, individual applications relied on plain-text INI files located in the Windows directory to persist user interface states and configuration options between operating system sessions.

The Role of WINFILE.INI

Unlike modern operating systems that store application state in the Registry or AppData folders, Windows 3.11 maintained File Manager configuration within C:\WINDOWS\WINFILE.INI. When the user exited File Manager, the program checked whether the "Save Settings on Exit" option was enabled under the "Options" menu. If active, File Manager serialized its layout state directly to this file using the 16-bit Windows configuration APIs (WritePrivateProfileString).

The Main Application Window State

The overarching File Manager window coordinates were stored under the [Settings] section using the Window key. The value consisted of a series of comma-delimited integers:

[Settings]
Window=x,y,width,height,state
SaveSettings=1
  • x and y: The horizontal and vertical screen coordinates for the top-left corner of the window.
  • width and height: The pixel dimensions of the main window.
  • state: An integer indicating the window's display status (such as minimized, normal, or maximized), mapping directly to standard Windows show-window constants like SW_SHOWNORMAL or SW_SHOWMAXIMIZED.

Child Directory Windows (MDI)

File Manager was designed as a Multiple Document Interface (MDI) application, allowing multiple directory browser panes inside the primary workspace. To remember these sub-windows, File Manager created indexed entries under the [Settings] section, typically formatted as dir1, dir2, and so forth.

Each dir entry stored comprehensive state information for an individual directory pane:

dir1=C:\WINDOWS\*.*,left,top,right,bottom,state,split,view,sort
  • Path and Filter: The active directory path and the active file mask (e.g., *.*).
  • Coordinates: The bounding rectangle coordinates (left, top, right, bottom) relative to the MDI client area.
  • Window State: Flags defining whether the sub-pane was maximized or restored.
  • Split Position: An integer defining the position of the vertical splitter bar dividing the tree view on the left from the directory contents on the right.
  • View and Sort Flags: Bitmasks representing view settings (displaying file sizes, dates, attributes) and sorting preferences (by name, type, size, or date).

Session Restoration

When a user launched File Manager in Windows 3.11, the application invoked GetPrivateProfileString to read WINFILE.INI. It first positioned and sized the main application window according to the Window parameter. It then parsed each consecutive dirN entry, creating the respective MDI child windows, applying their saved coordinates and splitter positions, and loading the specified folder paths into memory.