The Old New Thing
Practical development throughout the evolution of Windows.
Latest posts
The first day at Microsoft: A fender-bender
This is the first of what might be a series of stories on the subject, So what happened on your first day at Microsoft? Some facts may have been altered to preserve the anonymity of the subject, but the essense is true. Our first storyteller is "Employee X": At the end of my first day, I back out of my parking space and accidentally hit a Lexus parked behind me. Oh great, my first day at work, and I dent somebody's fancy car. I leave a note of apology on the windshield, with my name, email address, phone number, and a promise to pay for whatever repairs are necessary. The next day, I come to work, and I...
Microspeak: Going forward
The jargon phrase going forward has largely replaced the more mundane equivalent from now on. It appears that I'm not the only person who is bothered by this phrase. Sample usages: Notice that the phrase going forward usually adds little to the sentence. You can delete it from all of the sentences above and nobody would notice a difference.
How do I put a different wallpaper on each monitor?
When you set a wallpaper on a multi-monitor system, that wallpaper goes onto each monitor. For example, if your wallpaper is a picture of a flower, each monitor shows that same flower. Commenter David Phillips wonders whether there is a way to set a different wallpaper on each monitor, or whether it is some sort of trick. It's some sort of trick. And it's a trick because it's not something that the window manager folks intended to happen; rather, it's just an artifact of how wallpapers work. The trick is to set your wallpaper to "tile" rather than "center" or "stretch". When the window manager draws a tiled b...
The Microsoft Cafeteria Tour (Redmond 2006 Edition)
In 2006, Christian Buckley set forth on a grand mission: To visit every cafeteria on Microsoft's Redmond campus. This marathon effort went by the name Microsoft Cafeteria Tour 2006, or for those in the know, MSCT2k6. Those looking for off-campus dining options can make use of this map mashup of restaurants which provide discounts to Microsoft employees. (Note: Rumored to be out of date, but still a useful starting point.)
What's the BS_PUSHLIKE button style for?
One of the lesser-known button styles is . Makes a button (such as a check box, three-state check box, or radio button) look and act like a push button. The button looks raised when it isn't pushed or checked, and sunken when it is pushed or checked. In other words, you add this style to a check box or radio button to make it look like a push button even though it will continue to act like a check box or radio button. Aside from the appearance, the other checkbox and radio button behaviors are preserved. Each time you click an automatic check box, it toggles between unselected and selected; it's just that...
Find the Flowers vs Minesweeper
David Vronay writes about the difficult balance that has to be maintained between people who like the classic Windows game Minesweeper and people who are (understandably) upset that Windows includes a game about landmines, trivializing a very serious issue. (Yes, the image used in the game is a water mine, not a land mine, but that's scant consolation.) By the way, David, you see, the idea behind "Find the Flowers" is that it's bad to step on flowers.
It rather involved being on the other side of this airtight hatchway: Elevation to administrator
Surprisingly, it is not a security vulnerability that administrators can add other users to the Administrators group. But that doesn't stop people from claiming that it is. For example, it's not uncommon for a vulnerability report to come in with the following steps: Wow, this looks bad. An unprivileged user can elevate to administrator and... wait a second, what's that in step 1? To perform step 1, you need to have administrative privileges already. Only administrators can install services and drivers, only administrators can change registry keys in , and only administrators have write permission ...
Playing the hippie poetry game for four cents per line
The party game goes by many names. Hippie poetry, Beat poetry, Dada poetry. To play, have a group of people sit in a circle and give each person a piece of paper and writing implement. To start, each person writes a single line of poetry and hands it to the person to his or her left or right. (The direction isn't important, as long as it's consistent.) At each round, you add one line to the growing poem, then fold over the top of the page so that only the line you added is visible. Pass the paper to the left (or right), and repeat. Popular stopping conditions are when the paper is full or when the page returns t...
What happens if you pass a source length greater than the actual string length?
Many functions accept a source string that consists of both a pointer and a length. And if you pass a length that is greater than the length of the string, the result depends on the function itself. Some of those functions, when given a string and a length, will stop either when the length is exhausted or a null terminator is reached whichever comes first. For example, if you pass a greater than the length of the string to the function, it will stop at the null terminator. On the other hand, many other functions (particularly those in the NLS family) will cheerfully operate past a null character if you ask...