The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Using Active Accessibility to find out where the focus item is
Jan 9, 2026
Post comments count 1
Post likes count 1

Using Active Accessibility to find out where the focus item is

Raymond Chen
Raymond Chen

Looking at child objects.

Using Active Accessibility to find out where the Windows caret is
Jan 8, 2026
Post comments count 4
Post likes count 2

Using Active Accessibility to find out where the Windows caret is

Raymond Chen
Raymond Chen

It's old and rather simple, but we like simple.

How can I find out where the Windows caret is?
Jan 7, 2026
Post comments count 1
Post likes count 1

How can I find out where the Windows caret is?

Raymond Chen
Raymond Chen

You'll have go to a larger scope.

Swapping two blocks of memory that reside inside a larger block, in constant memory, refinement
Jan 6, 2026
Post comments count 1
Post likes count 2

Swapping two blocks of memory that reside inside a larger block, in constant memory, refinement

Raymond Chen
Raymond Chen

Could do with a little less rotating.

How can you swap two non-adjacent blocks of memory using only forward iterators?
Jan 5, 2026
Post comments count 0
Post likes count 2

How can you swap two non-adjacent blocks of memory using only forward iterators?

Raymond Chen
Raymond Chen

Applying the rotation trick to our new problem.

How can you swap two adjacent blocks of memory using only forward iterators?
Jan 2, 2026
Post comments count 0
Post likes count 2

How can you swap two adjacent blocks of memory using only forward iterators?

Raymond Chen
Raymond Chen

A different algorithm, employing a different kind of cleverness.

Swapping two blocks of memory that reside inside a larger block, in constant memory
Jan 1, 2026
Post comments count 9
Post likes count 2

Swapping two blocks of memory that reside inside a larger block, in constant memory

Raymond Chen
Raymond Chen

A variation on the constant-memory rotation.

2025 year-end link clearance
Dec 31, 2025
Post comments count 5
Post likes count 2

2025 year-end link clearance

Raymond Chen
Raymond Chen

Another year gets relegated to history.

Understanding and mitigating a stack overflow in our task sequencer
Dec 31, 2025
Post comments count 1
Post likes count 2

Understanding and mitigating a stack overflow in our task sequencer

Raymond Chen
Raymond Chen

The recurring problem of synchronous resumption.

Additional notes on color-keyed overlays as a way of doing smooth video rendering
Dec 30, 2025
Post comments count 6
Post likes count 3

Additional notes on color-keyed overlays as a way of doing smooth video rendering

Raymond Chen
Raymond Chen

Choosing the color-key and other brief discussions.

The Gävle Goat (Gävlebocken) succumbs in 2025 to a new menace
Dec 29, 2025
Post comments count 3
Post likes count 2

The Gävle Goat (Gävlebocken) succumbs in 2025 to a new menace

Raymond Chen
Raymond Chen

You could blow me over.

How can I detect that the system is running low on memory? Or that my job is running low on memory?
Dec 29, 2025
Post comments count 3
Post likes count 2

How can I detect that the system is running low on memory? Or that my job is running low on memory?

Raymond Chen
Raymond Chen

You can register for a memory notification.

Why are we worried about memory access semantics? Full barriers should be enough for anybody
Dec 26, 2025
Post comments count 7
Post likes count 4

Why are we worried about memory access semantics? Full barriers should be enough for anybody

Raymond Chen
Raymond Chen

You have to find new ways of going faster.

Reading the fine print, episode 4: Holiday promotions
Dec 25, 2025
Post comments count 4
Post likes count 3

Reading the fine print, episode 4: Holiday promotions

Raymond Chen
Raymond Chen

Checking those validity dates.

Why is the last letter of my string not making it to the clipboard?
Dec 25, 2025
Post comments count 0
Post likes count 3

Why is the last letter of my string not making it to the clipboard?

Raymond Chen
Raymond Chen

The struggle for null termination.

Why does my <KBD>Ctrl</KBD>+<KBD>M</KBD> accelerator key activate when I press the <KBD>Enter</KBD> key?
Dec 24, 2025
Post comments count 1
Post likes count 5

Why does my <KBD>Ctrl</KBD>+<KBD>M</KBD> accelerator key activate when I press the <KBD>Enter</KBD> key?

Raymond Chen
Raymond Chen

Understanding the difference between keys and characters for accelerators.

When irate product support customers demand to speak to Bill Gates
Dec 23, 2025
Post comments count 4
Post likes count 4

When irate product support customers demand to speak to Bill Gates

Raymond Chen
Raymond Chen

So transfer them to his office, or so it seems.

All the other cool languages have <CODE>try</CODE>…<CODE>finally</CODE>. C++ says “We have <CODE>try</CODE>…<CODE>finally</CODE> at home.”
Dec 22, 2025
Post comments count 27
Post likes count 9

All the other cool languages have <CODE>try</CODE>…<CODE>finally</CODE>. C++ says “We have <CODE>try</CODE>…<CODE>finally</CODE> at home.”

Raymond Chen
Raymond Chen

The destructor serves as the "finally".