Pre-registering an ATL window class
I am using a combination of the ATL and WTL for a project and have derived my own class from CWindowImpl , which looks something like this: class CMyControl : public CWindowImpl<CMyControl> { public: DECLARE_WND_CLASS(_T("MyClassName")) ... BEGIN_MSG_MAP(CMyControl) ... END_MSG_MAP() }; This is all good, and if I use CMyControl::Create to create an instance of the control, then it works fine as under the hood, the CWindowImpl::Create function will register the Win32 class (in this case called MyClassName ). However, it is this behaviour - the Win32 class being registered when an instance is