Showing results for History - The Old New Thing

Jul 19, 2005
Post comments count0
Post likes count0

What is the deal with the ES_OEMCONVERT flag?

Raymond Chen
Raymond Chen

The edit control style is a holdover from 16-bit Windows. This ancient MSDN article from the Windows 3.1 SDK describes the flag thus: ES_OEMCONVERT causes text entered into the edit control to be converted from ANSI to OEM and then back to ANSI. This ensures proper character conversion when the application calls the AnsiToOem function to conve...

History
Jul 18, 2005
Post comments count0
Post likes count0

If InitCommonControls doesn’t do anything, why do you have to call it?

Raymond Chen
Raymond Chen

One of the problems beginners run into when they start using shell common controls is that they forget to call the function. But if you were to disassemble the function itself, you'll see that it, like the function, doesn't actually do anything. Then why do you need to call it? As with , what's important is not what it performs, but just ...

History
Jul 7, 2005
Post comments count0
Post likes count0

What are SYSTEM_FONT and DEFAULT_GUI_FONT?

Raymond Chen
Raymond Chen

Among the things you can get with the function are two fonts called and . What are they? They are fonts nobody uses any more. Back in the old days of Windows 2.0, the font used for dialog boxes was a bitmap font called System. This is the font that retrieves, and it is still the default dialog box font for compatibility reasons. Of co...

History
Jun 27, 2005
Post comments count0
Post likes count0

Why are there broadcast-based mechanisms in Windows?

Raymond Chen
Raymond Chen

Many Windows information mechanisms are based on message broadcasts, among them DDE, WM_FONTCHANGE, and changes in system settings. Why do these mechanisms use broadcasts, when we know that broadcasts can result in the system grinding to a halt due to windows that have stopped processing messages? Because in 16-bit Windows, you didn't have this...

History
Jun 23, 2005
Post comments count0
Post likes count0

Why does the CreateProcess function do autocorrection?

Raymond Chen
Raymond Chen

Programs that weren't designed to handle long file names would make mistakes like taking the path to the executable and writing it into the registry, unaware that the path might contain a space that needs quoting. (Spaces—while technically legal—were extremely rare in SFN paths.) The CreateProcess function had to decide whether to "auto...

History
Jun 21, 2005
Post comments count0
Post likes count0

The Date/Time control panel is not a calendar

Raymond Chen
Raymond Chen

Although many people use the Date/Time control panel to flip through a calendar, that's not what it is for. In fact, if you use it that way, you can create all sorts of havoc! In its original incarnation in Windows 95, the Date/Time control panel changed your date and time. If you clicked through the calendar to see next month, you actually ...

History
Jun 8, 2005
Post comments count0
Post likes count0

Why don't control panel programs and property sheets show up in the taskbar?

Raymond Chen
Raymond Chen

Control panel programs and property sheets don't show up in the taskbar. Why not? As I recall, the explanation was that control panel programs and property sheets aren't applications. They are auxiliary helper windows that assist you with a task, but they aren't a program in their own right. Therefore, they don't get a taskbar button. I've alway...

History
May 12, 2005
Post comments count0
Post likes count0

The Microsoft corporate network: 1.7 times worse than hell

Raymond Chen
Raymond Chen

Today I'm going to tell a story from 1996. Why? Because I can. One of the tests performed by Windows Hardware Quality Labs (WHQL) was the NCT packet stress test which had the nickname "Hell". The purpose of the test was to flood a network card with an insane number of packets, in order to see how it handled extreme conditions. It uncovered packe...

History