Showing archive results for 2012

Mar 28, 2012
Post comments count0
Post likes count1

Converting to Unicode usually involves, you know, some sort of conversion

Raymond Chen

A colleague was investigating a problem with a third party application and found an unusual window class name: L"整瑳整瑳". He remarked, "This looks quite odd and could be some problem with the application." The string is nonsense in Chinese, but I immediately recognized what was up. Here's a hint: Rewrite the string as...

Other
Mar 27, 2012
Post comments count0
Post likes count1

Amusing message on a whiteboard in the hallway

Raymond Chen

It is common to see whiteboards mounted in hallways. Sometimes they have official purposes; other times they are just placed for the convenience of hallway conversations or impromptu meetings. One of the hallways near my office has a very large whiteboard, completely blank, save for one note clearly written in the corner. DO NOT ERASE ...

Non-Computer
Mar 26, 2012
Post comments count0
Post likes count1

Why does a maximized window have the wrong window rectangle?

Raymond Chen

Commenter configurator wonders why the maximum size for a form is the screen size plus (12,12). Somebody else wonders why it's the screen size plus (16,16). Let's start by rewinding the clock to Windows 3.0. When you maximize a window, the default position of the window is such that all the resizing borders hang "off the edges of the scree...

Code
Mar 23, 2012
Post comments count0
Post likes count0

Beverage Gas Division of Central Welding Supply

Raymond Chen

The other day, I saw a van which was labeled Beverage Gas Division of Central Welding Supply. This odd juxtaposition was created by the acquisition of Compressed Gas Western by Central Welding Supply in 2009. I sure hope they don't get their tanks confused.

Non-Computer
Mar 22, 2012
Post comments count0
Post likes count1

Why does my window style change when I call SetWindowText?

Raymond Chen

A customer observed some strange behavior with window styles: We ran some weird behavior: Calling the function causes a change in window styles. Specifically, calling results in the and messages, and sometimes the result is that the style is removed. Is this a bug? What would cause this? The message sends the message to the control, at wh...

Code
Mar 21, 2012
Post comments count0
Post likes count1

Isn't there a race condition in GetFileVersionInfoSize?

Raymond Chen

In response to my explanation of what the parameter in is used for, Steve Nuchia wonders if there's a race condition between the time you get the size and the time you ask for the data. Yes, there is a race condition, but calling the function in a loop won't help because the function does not report that the buffer is too small to hold all th...

Code
Mar 20, 2012
Post comments count0
Post likes count1

In 1993, Microsoft stole my colleague's car

Raymond Chen

I remember walking between buildings at Microsoft back in the 1990's and seeing a moss-covered, rusted-out jalopy in one of the parking spaces. It clearly hadn't moved in ages. The person I was with said, "Oh, yeah, Microsoft owns that car. They stole it from Bob." (Bob is my generic name for a Microsoft employee.) The Inaugural Day Storm of 1993...

Non-Computer
Mar 19, 2012
Post comments count0
Post likes count0

The most exciting part of my morning is catching my bus, specifically, making the transfer

Raymond Chen

Note: Transit nerd content. You have been warned. I still rely on One Bus Away to tell me when my bus is coming. Recent changes in bus service means that there is no longer a direct bus from my neighborhood to my work. My basic options are as follows: If you sit and work out the math, the total travel time for all the options is about the s...

Non-Computer
Mar 19, 2012
Post comments count0
Post likes count1

Why does holding the Ctrl key when selecting New Task from Task Manager open a command prompt?

Raymond Chen

Commenter Adam S wonders why holding the Ctrl key when selecting New Task from Task Manager will open a command prompt. It's a rogue feature. Windows XP introduced visual styles, and one of the tricky parts of debugging visual styles is that if the visual style engine goes berzerk, you can't see anything! One of the problems that the v...

Other