The Old New Thing

Do not write in-process shell extensions in managed code

Jesse Kaplan, one of the CLR program managers, explains why you shouldn't write in-process shell extensions in managed code. The short version is that doing so introduces a CLR version dependency which may conflict with the CLR version expected by the host process. Remember that shell extensions are injected into all processes that use the ...

Why do user interface actions tend to occur on the release, not on the press?

If you pay close attention, you'll notice that most user interface actions tend to occur on the release, not on the press. When you click on a button, the action occurs when the mouse button is released. When you press the Windows key, the Start menu pops up when you release it. When you tap the Alt key, the menu becomes active when you ...

Computing listview infotips in the background

When the listview control asks you for an infotip, it sends you then notification, and when you return, the result is displayed as the infotip. But what if computing the infotip takes a long time? You don't want to stall the UI thread on a long operation, after all. This is where comes in. If you want to say, "Um, I'm not ready with that ...

Displaying infotips for folded and unfolded listview items

When displaying infotips for listview items, you have to deal with both the folded and unfolded case. "Folded" is the term used to describe a listview item in large icon mode whose text has been truncated due to length. When the user selects the item, the full text is revealed, a process known as "unfolding". Take our scratch program and ...

What does an invalid handle exception in LeaveCriticalSection mean?

Internally, a critical section is a bunch of counters and flags, and possibly an event. (Note that the internal structure of a critical section is subject to change at any time—in fact, it changed between Windows XP and Windows 2003. The information provided here is therefore intended for troubleshooting and debugging purposes...