The Old New Thing
Practical development throughout the evolution of Windows.
Latest posts
Intercepting messages inside IsDialogMessage, fine-tuning the message filter
Making sure it triggers when you need it, and not when you don't.
Intercepting messages inside IsDialogMessage, installing the message filter
Using an <CODE>IsDialogMessage</CODE> extension point.
Intercepting messages before IsDialogMessage can process them
Process the message before you let <CODE>IsDialogMessage</CODE> see it.
Customizing the ways the dialog manager dismisses itself: Isolating the Close pathway
Intercepting the flow in your message loop.
Customizing the ways the dialog manager dismisses itself: Detecting the ESC key, second (failed) attempt
Sniffing the synchronous keyboard state is still not precise enough.
The 2026/2027 Seattle Symphony subscription season at a glance
The pocket reference guide for 2026/2027.
Customizing the ways the dialog manager dismisses itself: Detecting the ESC key, first (failed) attempt
Sniffing the asynchronous keyboard state.
Exploring the signals the dialog manager uses for dismissing a dialog
Summarizing the flow.
Could WriteProcessMemory be made faster by avoiding the intermediate buffer?
I guess it could, but why bother?
Microspeak: Escrow
Final build, final, final, final 2, ship this one.
It rather involved being on the other side of the airtight hatchway: Tricking(?) a program into reading files
Is it really a trick when reading the file is the purpose of the program?
How can I distinguish between the numeric keypad 0 and the top-row 0 in the WM_CHAR message?
See if it matches the scan code.
How can I distinguish between the numeric keypad 0 and the top-row 0 in the WM_KEYDOWN message?
Check whether it is an extended key.
How do I suppress the hover effects when I put a Win32 common controls ListView in single-click mode?
You can prevent the item from becoming hot-tracked.
How did Windows 95 get permission to put the Weezer video Buddy Holly on the CD?
Asking nicely, and asking a lot of people.
What should I do if a wait call reports WAIT_ABANDONED ?
It's your one chance to make amends.
How can I prevent the user from changing the widths of ListView columns in version 5 of the common controls?, part 2
Preventing the resize cursor from appearing.
How can I prevent the user from changing the widths of ListView columns in version 5 of the common controls?
Deny changes to the width.
Super Bowl LX creates an opportunity for symphonic friendly wagering
Betting classical music.
How can I prevent the user from changing the widths of ListView columns?
You can ask the header to be non-resizing.
Some small stories about the giant satellite dish antenna that was behind Microsoft Building 11
A little trivia.
Studying compiler error messages closely: Input file paths
Are you even compiling the correct file?
Why not store the SAFEARRAY reference count as a hidden allocation next to the SAFEARRAY?
The case of "Bring your own <CODE>SAFEARRAY</CODE>."
How can I retain access to the data in a SAFEARRAY after my method returns?
Find a way to take ownership.
Why did I lose the data even though I called SafeArrayAddRef?
You have to use the original pointer, but even that won't be good enough.
A digression on the design and implementation of SafeArrayAddRef and extending APIs in general
The concerns when adding a feature to an existing API.
What’s the difference between SafeArrayAccessData and SafeArrayAddRef?
Two ways of preserving the data.
C++ has scope_exit for running code at scope exit. C# says “We have scope_exit at home.”
You can wrap it in an <CODE>IDisposable</CODE>.
A simple helper function for attaching a progress handler to a Windows Runtime IAsyncActionWithProgress or IAsyncOperationWithProgress
It doesn't do much, but it saves typing.
On the proper usage of a custom Win32 dialog class
You are replacing the window procedure, not the dialog procedure.
Microspeak: On fire, putting out fires
Dealing with emergencies.
What was the secret sauce that allows for a faster restart of Windows 95 if you hold the shift key?
An old flag from 16-bit Windows.
How can I get the tab index number from a dialog box control?
The tab index number is an authoring concept, not a runtime concept.
When programs assume that the system will never change, episode 4: Stealing strings
The strings are an implementation detail.
Clipping the focus item when looking for its on-screen location, part 3
Finding <I>all</I> the clipping parents.
Clipping the focus item when looking for its on-screen location, part 2
Finding the correct clipping parent.