The Old New Thing

What other effects does DS_SHELLFONT have on property sheet pages?

Once you invent a new flag you can start using it to fix errors of the past without breaking backwards compatibility. One of the errors of the past was that property sheet page dimensions were taken relative to the "MS Sans Serif" font, even if the page used some other font. This sample dialog template says that it is 212dlu wide and ...

Why does DS_SHELLFONT = DS_FIXEDSYS | DS_SETFONT?

You may have noticed that the numerical value of the flag is equal to . Surely that isn't a coincidence. The value of the flag was chosen so that older operating systems (Windows 95, 98, NT 4) would accept the flag while nevertheless ignoring it. This allowed people to write a single program that got the "Windows 2000" ...

Why is breadth-first searching better for file system tree walking?

Earlier, Eric Lippert discussed one scenario where breadth-first searching is better than depth-first searching. Today, I'll tell you about another. If you go back to the old MS-DOS file enumeration functions, you'll find that there is a "Find first file" function and a "Find next file" function, but no "Find close" function. That's because...

The history of the Windows PowerToys

During the development of Windows 95, as with the development of any project, the people working on the project write side programs to test the features they are adding or to prototype a feature. After Windows 95 shipped, some of those programs were collected into the first edition of the Windows 95 Power Toys. As I recall, ...

Why did the Win64 team choose the LLP64 model?

Over on Channel 9, member Beer28 wrote, "I can't imagine there are too many problems with programs that have type widths changed." I got a good chuckle out of that and made a note to write up an entry on the Win64 data model. The Win64 team selected the LLP64 data model, in which all integral types remain 32-bit values and only ...

The importance of error code backwards compatibility

I remember a bug report that came on in an old MS-DOS program (from a company that is still in business so don't ask me to identify them) that attempted to open the file "". That's the file with no name. This returned error 2 (file not found). But the program didn't check the error code and though that 2 was the file handle. It then began ...

How did MS-DOS report error codes?

The old MS-DOS function calls (ah, int 21h), typically indicated error by returning with carry set and putting the error code in the AX register. These error codes will look awfully familiar today: They are the same error codes that Windows uses. All the small-valued error codes like ERROR_FILE_NOT_FOUND go back to MS-DOS (and possibly even ...

Why doesn't \ autocomplete to all the computers on the network?

Wes Haggard wishes that \ would autocomplete to all the computers on the network. [Link fixed 10am.] An early beta of Windows 95 actually did something similar to this, showing all the computers on the network when you opened the Network Neighborhood folder. And the feature was quickly killed. Why? Corporations with large ...

Why doesn’t \ autocomplete to all the computers on the network?

Wes Haggard wishes that \ would autocomplete to all the computers on the network. [Link fixed 10am.] An early beta of Windows 95 actually did something similar to this, showing all the computers on the network when you opened the Network Neighborhood folder. And the feature was quickly killed. Why? Corporations with large ...