It’s the Great Pumpkin, Charlie Brown: The world of competitive pumpkin-growing

Bill Littlefield of NPR’s sports program Only a Game interviews Susan Warren about competitive pumpkin-growing. [Direct link – Real format] An excerpt from her book Backyard Giants was printed in The Wall Street Journal: The Race to Break the Squash Barrier, the quest to grow a one-ton pumpkin. I’m fascinated by these subcultures of people…


Debugging walkthrough: Diagnosing a __purecall failure

Prerequisite: Understanding what __purecall means. I was asked to help diagnose an issue in which a program managed to stumble into the __purecall function. XYZ!_purecall: 00a14509 a100000000 mov eax,dword ptr ds:[00000000h] ds:0023:00000000=???????? The stack at the point of failure looked like this: XYZ!_purecall XYZ!CViewFrame::SetFrame+0x14d XYZ!CViewFrame::SetPresentation+0x355 XYZ!CViewFrame::BeginView+0x1fe The line at XYZ!CViewFrame::SetFrame that called the mystic __purecall…


How do I programmatically invoke Aero Peek on a window?

A customer wanted to know if there was a way for their application to invoke the Aero Peek feature so that their window appeared and all the other windows on the system turned transparent. No, there is no such programmatic interface exposed. Aero Peek is a feature for the user to invoke, not a feature…


Hacking Barney the dinosaur for fun (no profit)

Many years ago, Microsoft produced a collection of interactive toys called ActiMates, and one of the features was that television programs could broadcast an encoded signal which would enable the toy to interact with the program. The idea would be that the Barney doll would do something that was coordinated with what was happening on…


Belated happy first birthday, Windows 7

On Friday, the marketing folks informed me that they decided to put me on the Microsoft Careers United States home page in recognition of Windows 7’s first birthday. It’s an honor and to be honest a bit scary to be chosen to be the face of Windows on a day of such significance. (They told me…


The evolution of the ICO file format, part 4: PNG images

We finish our tour of the evolution of the ICO file format with the introduction of PNG-compressed images in Windows Vista. The natural way of introducing PNG support for icon images would be to allow the biCompression field of the BITMAP­INFO­HEADER to take the value BI_PNG, in which case the image would be represented not by…


The evolution of the ICO file format, part 3: Alpha-blended images

Windows XP introduced the ability to provide icon images which contain an 8-bit alpha channel. Up until this point, you had only a 1-bit alpha channel, represented by a mask. The representation of an alpha-blended image in your ICO file is pretty straightforward. Recall that the old ICO format supports 0RGB 32bpp bitmaps. To use an…


How do I get the dimensions of a cursor or icon?

Given a HICON or a HCURSOR, how do you get the dimensions of the icon or cursor? The GetIconInfo function gets you most of the way there, returning you an ICONINFO structure which gives you the mask and color bitmaps (and the hotspot, if a cursor). You can then use the GetObject function to get…