The Old New Thing
Practical development throughout the evolution of Windows.
Latest posts

Why doesn't SS_WHITERECT actually draw a white rectangle?

There are six styles available to the static controls which draw frames and rectangles in one of three fixed colors: But if you actually create a static control with one of these styles, you'll find that the color isn't actually black, gray, or white. So why are they called black, gray, and white? Because they used to be black, gray, and white. Knowledge Base article 125684 gives the history behind these styles. Back in the 16-bit days, these styles really did give you black, gray, and white, or at least they did if you used the default color scheme. Windows 95 shifted from using the window colors to t...

How to edit the security attributes of more than one file at a time

In Windows XP, you could select multiple files, right-click them, then select Properties. The resulting property sheet includes a Security page which lets you edit the security attributes of those files. But when you repeat this exercise on Windows Vista or Windows 7, the Security page is missing. Why doesn't Explorer let you edit the security attributes of more than one file at a time? Windows might need to display an elevation prompt if any of the files in the collection require administrator privileges in order to modify the security attributes. The security prompt needs to tell you why you are...

Microspeak: SQMmed

The letters SQM originally stood for Service Quality Monitoring, but that doesn't really answer the question, "What is SQM?" SQM is the internal code name for the technologies behind what is publically known as the Microsoft Customer Experience Improvement Program. This is a voluntary program that customers can opt into, which gathers information about Office (say), information such as which menu options you use most often, how often you undo an autocorrection, what types of "impossible" things the program had to recover from, which error messages you've been shown, and which file format converters you use. (T...

When people ask for security holes as features: Non-administrators reading other users' stuff

Via the suggestion box, Aaron Lerch asks whether a non-administrator can retrieve/evaluate environment variables as they would appear for another user. This falls into the category of asking for a security hole as a feature, specifically an information disclosure security hole, because you are extracting information from a user's private data which has security access controls that do not grant everybody access. Generally speaking, users have full access to their data, as does the operating system itself, but nobody else. Administrators can get access to the data by taking ownership and modifying the ACL or ...

Why do non-folders in my shell namespace extension show up in the folder tree view?

A customer was having trouble with their shell namespace extension: When we click the [+] button next to our shell namespace extension in the folder tree view, the tree view shows both files and folders, even though it's supposed to show only folders. Our does return the correct values for (including it for the folders and omitting it for the non-folders). What are we doing wrong? The tree view enumerates the children of a folder by calling and passing the flag while omitting the flag. This means that it is only interested in enumerating child folders. Child non-folders should be excluded from the enumer...

EnumClaw, the function that never was

bhiggins asks about the mysterious function that existed in some versions of the Win32 documentation. I went digging through the MSDN archives and was close to giving up and declaring the cause lost, but then I found it: A copy of the documentation. EnumClaw The EnumClaw function returns the child or the parent of the window whose HWND is passed in. Parameters hwndParent [in] Handle to the parent window. Return Values If the function succeeds, the return value is the HWND of the child of the hwndParent window. If the window has no child, the return value is the HWND of the parent of the hwndPa...

2010 Q1 link clearance: Microsoft blogger edition

It's that time again: Sending some link love to my colleagues.

The great thing about URL encodings is that there are so many to choose from

A survey.

Non-Microspeak: Boiling the ocean

Some time ago, MSN Careers listed Boil the ocean as a workplace phrase you should learn. Thankfully, the phrase (meaning "to attempt something impossibly ambitious") is not currently in wide use in Microspeak. However, a friend of mine who works in another industry tells me that it is not only very much alive in his line of work, it became corrupted as it was imported. My friend's industry involves companies from around the world, and although the working language for meetings is English, most of the participants are not native speakers of the language. He suspects that the phrase boil the ocean was introduced ...