The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Nov 21, 2024
Post comments count 1
Post likes count 2

How can I detect which menu my item was invoked from?

Raymond Chen

Just give them all different IDs. But this might itself by an XY problem.

Nov 20, 2024
Post comments count 3
Post likes count 4

How do I determine whether Explorer is showing or hiding file extensions?

Raymond Chen

You can ask, but maybe you're asking the wrong question.

Nov 19, 2024
Post comments count 4
Post likes count 7

A wrinkle in how Windows 95 setup bootstrapped its initial GUI step

Raymond Chen

Getting access to the common controls that don't exist until Windows 95.

Nov 18, 2024
Post comments count 2
Post likes count 2

The operations for reading and writing single elements for C++ standard library maps

Raymond Chen

Breaking down the options.

Nov 15, 2024
Post comments count 6
Post likes count 4

How do I put a non-copyable, non-movable, non-constructible object into a std::optional?

Raymond Chen

Taking advantage of the conversion operator.

Nov 14, 2024
Post comments count 0
Post likes count 3

Solving the puzzle of trying to put an object into a std::optional

Raymond Chen

How do I set a value? Let me count the ways.

Nov 13, 2024
Post comments count 14
Post likes count 2

The puzzle of trying to put an object into a std::optional

Raymond Chen

The C++ standard library template type has one of two states. It could be empty (not contain anything), or it could contain a . Suppose you start with an empty . How do you put a into it? One of my colleagues tried to do it in what seemed to be the most natural way: Use the assignment operator. Unfortunately, the assignment failed to compile: I asked for the rest of the error message, because the details will explain what the compiler tried to do (and why it couldn't). It's long, but we'll walk through it. The compiler is showing its work. It's showing you all the possible overloaded assignment opera...

Nov 12, 2024
Post comments count 6
Post likes count 11

Why did Windows 95 setup use three operating systems?

Raymond Chen

Simplifying the problem to an earlier problem.

Nov 11, 2024
Post comments count 7
Post likes count 6

Debugger breakpoints are usually implemented by patching the in-memory copy of the code

Raymond Chen

The code in memory may not match what the debugger shows you if the debugger is itself is doing the changing.