The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

How do I get my edit control text to be autoselected when I choose it to be the default focus in my dialog?
Dec 1, 2025
Post comments count 0
Post likes count 0

How do I get my edit control text to be autoselected when I choose it to be the default focus in my dialog?

Raymond Chen
Raymond Chen

Remembering some old APIs.

How can I have a Win32 drop-down combo box with a read-only edit control?
Nov 28, 2025
Post comments count 7
Post likes count 3

How can I have a Win32 drop-down combo box with a read-only edit control?

Raymond Chen
Raymond Chen

You can ask for its handle and mark it read-only.

Message-only windows are for messaging, not as a convenient victim for hosting UI
Nov 27, 2025
Post comments count 3
Post likes count 4

Message-only windows are for messaging, not as a convenient victim for hosting UI

Raymond Chen
Raymond Chen

If you want to host UI, use a real window (possibly hidden).

At what point in the Windows development cycle is it too late to change the text of a translatable string?
Nov 26, 2025
Post comments count 9
Post likes count 2

At what point in the Windows development cycle is it too late to change the text of a translatable string?

Raymond Chen
Raymond Chen

The translation team sets the deadline.

The apocryphal origins of the Hot Dog Stand color scheme
Nov 25, 2025
Post comments count 6
Post likes count 5

The apocryphal origins of the Hot Dog Stand color scheme

Raymond Chen
Raymond Chen

Challenge accepted.

Why does XAML break down when I have an element that is half a billion pixels tall?
Nov 24, 2025
Post comments count 4
Post likes count 3

Why does XAML break down when I have an element that is half a billion pixels tall?

Raymond Chen
Raymond Chen

You've far exceeded the design goals and have even exceeded the expressive ability of a float.

Maybe somebody can explain to me how weak references solve the ODR problem
Nov 21, 2025
Post comments count 6
Post likes count 2

Maybe somebody can explain to me how weak references solve the ODR problem

Raymond Chen
Raymond Chen

I don't see it.

In the commit-on-demand pattern, what happens if an access violation straddles multiple pages?
Nov 20, 2025
Post comments count 9
Post likes count 2

In the commit-on-demand pattern, what happens if an access violation straddles multiple pages?

Raymond Chen
Raymond Chen

The access violation exceptions will continue until commit improves.

Is <CODE>Write­Process­Memory</CODE> faster than shared memory for transferring data between two processes?
Nov 19, 2025
Post comments count 3
Post likes count 8

Is Write­Process­Memory faster than shared memory for transferring data between two processes?

Raymond Chen
Raymond Chen

Shared memory is the copy-free solution.