The WS_EX_CLIENTEDGE extended window style allows you to create a window whose client area is “sunken”. When should you use this style?
The Guidelines for User Interface Developers and Designers says in the section on the Design of Visual Elements that the sunken border should be used “to define the work area within a window”.
Specifically what this means is that a sunken client area indicates that the window is a “container”. So, for example, the Explorer contents pane gets a sunken client area since a folder “contains” its elements. Users expect to be able to manipulate the items inside a container. By contrast, a dialog box is not a container, so it doesn’t get a sunken client area.
At least those were the rules back in 1995. Perhaps the rules have changed since then. (Indeed I wouldn’t be surprised if they have.)