Breaking Changes in ATL 7.1 and MFC 7.1 Since ATL 7.0 and MFC 7.0
Changes have been made to the ATL and MFC libraries and wizards in Visual C++ .NET 2003, some of which may break existing code.
- Wizard issues when migrating a project from ATL 6.0 to ATL 7.1 (ATL)
- CAtlServiceModuleT::InitializeSecurity has been removed from CAtlServiceModuleT (ATL)
- SetRfc822Time function updated
- Projects created with default ATL Wizard will fail on Windows NT
Wizard issues when migrating a project from ATL 6.0 to ATL 7.1
When converting a Visual C++ 6.0 project to a Visual C++ .NET 2003 project, message handlers are added to the end of the message map. If the message map has a CHAIN_*_MAP(...) entry, items added by the wizard will be included at the end of the entry, and may not be processed.
For example, when migrating a project containing a Visual C++ 6.0 ATL control to a Visual C++ .NET 2003 project, the OnInitDialog handler is never called. This is because the MESSAGE_HANDLER is placed after the CHAIN_MSG_MAP(...) entry, instead of before.
To ensure the OnInitDialog handler is called, the line
CHAIN_MSG_MAP(CComControl<Name of class>) must be included at the end of the CHAIN_MSG_MAP(...) entry. Alternately, the OnInitDialog base class implementation should perform the necessary initialization.
CAtlServiceModuleT::InitializeSecurity has been removed from CAtlServiceModuleT
In Visual Studio .NET 2003, this method is not implemented in the base class. For details, see CAtlServiceModuleT::InitializeSecurity.
SetRfc822Time function updated
To avoid potential buffer overruns, the SetRfc822Time function now has an extra parameter and a return value that indicates the length of string required to store the returned time data.
Projects created with default ATL Wizard will fail on Windows NT
In Visual Studio .NET 2003, the MIDL compiler has a default setting of /robust, which causes projects running under Windows NT 4 to stop responding.
To change the MIDL compiler flag to /no_robust
- Right-click your project, and on the shortcut menu, click Properties.
The Project Properties dialog box appears.
- In the left pane, click MIDL, and then select Command Line.
- Enter /no_robust in the Additional Options text box.