The quiet fading away of the CtlPanelClass

Raymond Chen

If you search MSDN for CtlPanelClass, you’ll find a few really old Knowledge Base articles that include it in a list of “class names of common Windows applications.” I’m not sure why the Knowledge Base articles bothered to list those classes; there is no technical reason for applications to need to know this, and including the information merely encourages programmers to rely on the window class name in strange undocumented ways. (This is another one of those cases where a Knowledge Base article written to assist in troubleshooting becomes interpreted as formal documentation.) Windows Vista finally got rid of that window class. It took only ten years. The window class was used by the old Windows 3.1 Control Panel application. Back in Windows 3.1, the Control Panel was a standalone application and was not integrated into the shell namespace (in large part because there was no such thing as a shell namespace back then for it to be a part of). There was one program which not only searched for a window of that specific class name, but it also sent the window WM_COMMAND messages, since of course it knew what the menu IDs were for the Control Panel application, and it knew that the Windows developers would never change the IDs or replace the standalone Control Panel application with anything else. When the standalone Control Panel application was converted to a virtual folder, it also came with some decoys in order to maintain compatibility with older programs that relied on the old behavior in strange undocumented ways. One of those decoys, the CtlPanelClass was removed for Windows Vista. A crash was traced back to a bug in the decoy window which manifested itself if a control panel took more than ten seconds to launch itself. To fix the bug, we just removed the decoy window, but we were prepared to write a compatibility shim in case there were people still running that ancient application from 1993. We didn’t actually turn the compatibility shim on, but we were ready just in case. We removed the decoy and crossed our fingers.

We got lucky. Nobody noticed.


Discussion is closed.

Feedback usabilla icon