Showing results for Old New Thing - The Old New Thing

Jun 8, 2006
Post comments count0
Post likes count0

The forgotten common controls: The MenuHelp function

Raymond Chen
Raymond Chen

The function is one of the more confusing ones in the common controls library. Fortunately, you will almost certainly never had need to use it, and once you learn the history of the function, you won't want to use it anyway. Our story begins with 16-bit Windows. The message is sent to notify a window of changes in the selection state of a men...

Code
Jun 7, 2006
Post comments count0
Post likes count0

Disaster averted, thanks to undisclosed government action, no really

Raymond Chen
Raymond Chen

On his web site, http://www.savelivesinmay.com, Eric Julien predicted that (and I hope I got this right) on May 25, 2006, comet fragments generated in 1995 by a hostile extraterrestrial civilization would impact the Atlantic Ocean near the Azores, followed by volcanic eruptions which would create a giant tsunami that would wipe out the East c...

Non-Computer
Jun 7, 2006
Post comments count0
Post likes count0

If you're going to try to simulate user actions, make sure the user can do them

Raymond Chen
Raymond Chen

Many people like to simulate user actions programmatically. I'm not going to comment here on whether that's a good idea to begin with; what I want to point out is that if you're going to do it, you have to make sure you're simulating things the user can actually do. For example, if you want to act as if the user clicked the "close" button in the ...

Code
Jun 6, 2006
Post comments count0
Post likes count0

Apparently driving is messed up in a lot of countries

Raymond Chen
Raymond Chen

From the reactions to my entry on driving in Taiwan, it appears that driving is pretty messed up all over Asia. Here's a video of driving in India that was popular a while back. This comment comparing Taiwan driving to the Philippines reminded me of a conversation I had with some Filipino tourists when I was in Taiwan. We were on a bus as it wa...

Non-Computer
Jun 6, 2006
Post comments count0
Post likes count0

The forgotten common controls: The page scroller

Raymond Chen
Raymond Chen

The pager control was introduced with the common controls library that came with Internet Explorer 4.0 in order to assist in implementing scrolling menus on the Start menu and Favorites menu. (The Start menu and Favorites menu aren't really menus in the Win32 sense. They are custom controls written to act like menus; the fakemenu sample prov...

History
Jun 5, 2006
Post comments count0
Post likes count0

Why can't you say </script> in a script block?

Raymond Chen
Raymond Chen

Because it ends the script block, of course. Duh, what's so hard about that? Because if you have script that generates script, you'll find yourself caught out if you're not careful. For example, you can't say in a script block because the HTML parser will see the and conclude that your script block is over. In other words, the script block ...

Code
Jun 2, 2006
Post comments count0
Post likes count0

What does the CS_CLASSDC class style do?

Raymond Chen
Raymond Chen

Last time, I talked about the historical background for the class style and why it starts out sounding like a good idea but when you think about it some more turns out to be an awful idea. The class style is the same thing, but worse, for it takes all the problems of and magnifies them. Recall that the class style instructs the window manage...

CodeHistory
Jun 1, 2006
Post comments count0
Post likes count1

What does the CS_OWNDC class style do?

Raymond Chen
Raymond Chen

Recall that window DCs are most commonly used only temporarily. If you need to draw into a window, you call or, if outside of a paint cycle, , although painting outside of a paint cycle is generally to be avoided. The window manager produces a DC for the window and returns it. You use the DC, then restore it to its original state and return it to...

CodeHistory
May 31, 2006
Post comments count0
Post likes count0

Do it for Katie

Raymond Chen
Raymond Chen

A story in honor of Katie Couric's final day at the Today show. Last month I happened to run into a former member of the shell team who worked on the Windows XP Welcome screen. He told me a story from CES 2001, where Windows XP's interface (code-named Luna) was unveiled. There was going to be a segment on the Today show, and the We...

History
May 30, 2006
Post comments count0
Post likes count0

Mellifluous NPR reporter name: Ofeibea Quist-Arcton

Raymond Chen
Raymond Chen

I first heard Ofeibea Quist-Arcton when she reported for the BBC. Now she's on NPR (you can listen to her discuss corruption in Nigeria in this recent report), thereby wresting the title of "most mellifluous NPR reporter name" from its previous holder, Sylvia Poggioli. (Sylvia Poggioli's dirty secret: She was born and grew up in the United State...

Non-Computer