The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Sep 21, 2009
Post comments count 0
Post likes count 1

What is the logic behind the thumb size and position calculation in scroll bars?

Raymond Chen

Commenter sarathc asks, "How do we implement a custom scroll bar as Windows does? What is the logic behind the thumb size and position calculation? How we could dynamically manage it?" Let's look at the three questions in turn. To implement a custom scroll bar... don't do it. It's just not worth the effort, and there will almost always be little seams, like not lighting up when the mouse hovers over them. The logic behind the thumb size and position calculation I thought I covered in my scroll bar series. The size of the thumb relative to the size of the scroll bar is the same as the page size relative to t...

Sep 18, 2009
Post comments count 0
Post likes count 1

Windows 95's ticking death

Raymond Chen

A few years ago, Larry Osterman explained the famous beeping death. Windows 95 had its own noise-related death, what nobody has called ticking death, but that's what I'm going to call it. (Let's see how long before somebody decide to add it to Wikipedia.) When your machine fell into ticking death, each time you moved the mouse or pressed a key, it was acknowledged with nothing more than a tiny click from the speaker. What was the cause of ticking death? When the hardware drivers report a mouse or keyboard event on Windows 95, they call the or function. Since this happens at hardware input time, th...

Sep 17, 2009
Post comments count 0
Post likes count 1

Should I fix the spelling in the United States Constitution?

Raymond Chen

Commenter Dave jokingly remarked, "I've grown used to handling characters with ASCII. (If it was good enough to represent every character in the US Constitution, it's good enough for me.)" But there's a double-joke in there. You see, not every character in the United States Constitution can be represented in ASCII! If you take a close look, you'll see that some words appear to be "misspelled": At the end of the second line, it says "Bleſsings of Liberty", and Article 1 Section 1 declares that "All legislative Powers herein granted shall be vested in a Congreſs of the United States." That f...

Sep 16, 2009
Post comments count 0
Post likes count 0

Rentonites concerned about Hooters opening in their town, but not for the reason you think

Raymond Chen

To support my claim that Renton has a reputation for being a working-class town, I submit this article from last week's news: Hooters too pretentious for us, some Renton, South Park locals say.

Sep 16, 2009
Post comments count 0
Post likes count 1

Whoa there, logging on awful fast now are we?

Raymond Chen

What happens when you log on too quickly.

Sep 15, 2009
Post comments count 0
Post likes count 0

Crazy Eddie: His prices were insane because it was all a criminal operation

Raymond Chen

If you lived in the New York metropolitan area in the 1980's, you couldn't avoid the advertisements for electronics store Crazy Eddie. What I didn't realize until now was that the retail establishment was a criminal operation from day one. Sam Antar, Crazy Eddie CFO, and nephew of company namesake Eddie Antar, talks us through the entire operation in this riveting interview. Along the way, you'll learn why it was at first advantageous to under-report revenues, then later why it became advantageous to return the unreported money back to the system. Unexpected skill you develop as a money launderer: You can loo...

Sep 15, 2009
Post comments count 0
Post likes count 1

Why does the Start menu search box autoselect some items but not others?

Raymond Chen

When you open the Start menu and type into the search box, sometimes the first search result is autoselected (so you just have to hit Enter), whereas sometimes See more results is autoselected. Is there a method to this madness? If an item is found in the Programs and Control Panel sections, then the first such is autoselected. Otherwise, the default item is See more results. The theory is that if you are typing a program or control panel name from muscle memory and make a typo, you don't want this to result in a random file opening. (Why are programs and control panels treated differently? Because the list of...

Sep 14, 2009
Post comments count 0
Post likes count 0

A complex family calculus

Raymond Chen

I spent the other night at a relative's house, and I was woken the next morning by my young niece who politely asked me to make her breakfast. (Her technique for waking me up is to come in and call my name. If the door is closed, she pounds on the bedroom door and shouts, "Wake up! Wake up!" If I fail to open the door, she opens it herself. If the door is locked, she jiggles the handle until she forces the door open. I just leave the door open now. Making the best of a bad situation.) Anyway, later that morning, the following conversation took place between my niece and an adult family member (which conversation...

Sep 14, 2009
Post comments count 0
Post likes count 1

Can you create an information context for the display?

Raymond Chen

Adrian McCarthy asks, "Can you create an information context for the display? ... I can call CreateDC("DISPLAY"), but perhaps that wouldn't generalize for a multiple-monitor display with different settings on each screen. I'm trying to avoid constantly creating and destroying DCs when all I need to do is measure strings, check color depth, dpi, etc." I admire the effort of trying to avoid creating a whole DC when all you want is to perform some inquiries. Some inquiries are monitor-independent, like getting the DPI or measuring strings, so you can just use to get a temporary DC. This is cheaper than a full-on ...