What is the story of the mysterious DS_RECURSE dialog style?


There are a few references to the DS_RECURSE dialog style scattered throughout MSDN, and they are all of the form "Don't use it." But if you look in your copy of winuser.h, there is no sign of DS_RECURSE anywhere. This obviously makes it trivial to avoid using it because you couldn't use it even if you wanted it, seeing as it doesn't exist.

"Do not push the red button on the control panel!"

There is no red button on the control panel.

"Well, that makes it easy not to push it."

As with many of these types of stories, the answer is rather mundane.

When nested dialogs were added to Windows 95, the flag to indicate that a dialog is a control host was DS_RECURSE. The name was intended to indicate that anybody who is walking a dialog looking for controls should recurse into this window, since it has more controls inside.

The window manager folks later decided to change the name, and they changed it to DS_CONTROL. All documentation that was written before the renaming had to be revised to change all occurrences of DS_RECURSE to DS_CONTROL.

It looks like they didn't quite catch them all: There are two straggling references in the Windows Embedded documentation. My guess is that the Windows Embedded team took a snapshot of the main Windows documentation, and they took their snapshot before the renaming was complete.

Unfortunately, I don't have any contacts in the Windows Embedded documentation team, so I don't know whom to contact to get them to remove the references to flags that don't exist.

Comments (12)
  1. Medinoc says:

    "anybody who is walking a dialog looking for controls should recurse into this window, since it has more controls inside."

    This is what WS_EX_CONTROLPARENT means too, right?

    [The former maps to the latter, as discussed some time ago. -Raymond]
  2. Anon says:

    I'd like to see an email exchange consisting of Raymond telling the Embedded folks that they need to remove something from their documentation which doesn't exist, and them responding that they don't need to remove it because it doesn't exist.

  3. Andre says:

    @Anon: I assume you're joking about their response, but that's probably what you would get when filing a bug report with your average (OSS) project.

  4. I pushed the big red button a development pc once... it just reset itself and someone had to enter a password or something like that afterward. Everyone agreed that one would have to push the button. says:

    I seem to remember that for ages doing a Google search on some whatever Windows API would return the Windows CE stuff as the top results. Never bothered to find out why.

  5. mito says:

    off topic, there is an DS_RECURSE topic (last year) on StackOverflow in Bing (#2 result for me), read it

  6. Mityador says:

    @Fleet Command: Perhaps you should occasionally take a look on dilbert.com to get an idea how big corporations work… ;-)

  7. Anon says:

    @Raymond

    I feel your pain. I need the answer to a question right now, except in order to find the answer, I will need to cc 50 people in order to find the correct one.

  8. " Unfortunately, I don't have any contacts in the Windows Embedded documentation team, so I don't know whom to contact to get them to remove the references to flags that don't exist." —Raymond Chen

    Is it *that* difficult to find someone in the same company? No directory?

    [Oh, I can find tens of thousands of people in the same company. But I don't know which of them is the one to contact to fix errors in the Windows Embedded documentation team. -Raymond]
  9. ^ Actually, 9 people might be enough. A couple of years back, I read about a study by Microsoft on MSN about an experiment concerning sending a message to a total stranger. The experiment only asked the sender to send it to the most appropriate person he knows. (Say, X, living in Redmond, WA is asked to send the message to Y, living somewhere unknown in Pasadena, CA; X would send it to Z, who lived in LA.) That person would, in turn, send it to the most appropriate person he knew of. Study showed that in most cases, after 9 instances of forwarding, the message reached the intended destination.

    Where I work, it has never been more that two hops. And it takes a bit of negotiation.

  10. Engywuck says:

    @Fleet Command: That experiment was done several times and the underlying idea is that of the "small world", also known as "six degrees of separation". In both the email experiment by Columbia University in 2003 and the snail mail experiments by Milgram most mails were never received, for the others the average chain length was both times near six, with outliers up to ten or so. Interestingly Milgram tested only in the US, while the email experiment was worldwide (or what counted for "worldwide" in electronics in 2003 ;-))

  11. ^ I see. Thanks a bunch.

    My memory seems to have recorded 6 as 9. Also, "by Microsoft on MSN" is in fact "on Microsoft MSN", which is the MSN Messenger network.

  12. kero says:

    @mito, you reminded me my question last year (stackoverflow.com/…/what-is-the-value-of-a-dialog-constant-ds-recurse). There Raymond rejected my question on the grounds that this constant is "not exist now", and I offered to talk about it in this blog :)

Comments are closed.

Skip to main content