The Old New Thing


Why does SetFocus fail without telling me why?

If you're going to replace part of the operating system, you have to replace the side effects, too.

What should you do if somebody passes a null pointer for a parameter that should never be null? What if it’s a Windows Runtime class?

They messed up, so make them suffer the consequences, but make the consequences diagnosable.

If you can use GUIDs to reference files, why not use them to remember “recently used” files so they can survive renames and moves?

Because the file that you think is the same file may not actually be the same file.

What order do the items in the “New” menu appear? It looks kind of random.

It's alphabetical order, but not in the obvious way.

How can I determine in a C++ header file whether C++/CX is enabled? How about C++/WinRT?

For conditionally enabling features, say.

The Resource Compiler defaults to CP_ACP, even in the face of subtle hints that the file is UTF-8

Subtlety is not its strong point.

Why does my C++/WinRT project get errors of the form “Unresolved external symbol void* __cdecl winrt_make_YourNamespace_YourClass(void)“?

You enabled optimizations, but there's some extra bookkeeping to support those optimizations.

Why does my C++/WinRT project get errors of the form ‘winrt::impl::produce<D, I>‘: cannot instantiate abstract class, missing method GetBindingConnector

The header file requirement was always present, but you often got away with omitting it. Not so much any more.

In the file copy conflict dialog, what happened to the option to copy the new file with a numeric suffix?

It's still there, but you have to dig a little deeper for it.

A bug so cool that the development team was reluctant to fix it

A nice parlor trick, if you had the memory for it.