Archive
CFTPTransferDlg & CFTPTransferer v1.15
Just to let everyone know that v1.15 of CFTPTransferDlg & CFTPTransferer has been released. Updates for this version include:
- Updated copyright details
- Updated the code to clean compile on VC 2010 to 2015
- Replaced BOOL with bool throughout the codebase
- Updated the code to clean compile using /analyze
- Replaced NULL with nullptr throughout the codebase. This means that the code now requires VC 2010 at a minimum to compile.
- Implemented support for send and receive timeouts
PStat v1.25
Just to let everyone know that v1.25 of PStat has been released. Updates for this version include:
- Updated copyright details.
- Updated the code to compile cleanly on VC 2010 – 2015.
- Removed the VC6 style classwizard comments from the code.
- Replaced NULL throughout the codebase with nullptr
- Moved all the configuration values used by the CProgressThreadDlg class into a new CProgressThreadSettings class.
- Added SAL annotations to all the code
- Refactored all the setup code in CProgressThreadDlg::OnInitDialog into various virtual methods.
- The progress control is now marked as paused when the confirm cancel messagebox is displayed.
- Updated the sample app’s application icon
EnumWnd v1.02
Just to let everyone know that v1.02 of EnumWnd has been released. Updates for this version include:
- Updated copyright details.
- Updated the code to now require at a minimum VC 2010.
- Updated the code to clean compile in VC 2010 – 2015.
- Removed the MinSize project configurations.
- Updated the code to compile cleanly using /analyze.
- Updated the code to include x64 build configurations.
- Added SAL annotations to all the source code.
- Replaced NULL throughout the codebase with nullptr.
EZView v1.04
Just to let everyone know that v1.04 of EZView has been released. Updates for this version include:
- Updated copyright details.
- Made EZView freeware instead of shareware. Now included in the zip file download is the source code for EZView
- The binary included in the download is now compiled for x86 in Unicode mode and was compiled with VS 2015.
- The source code has been updated to work with VS 2010 to VS 2015 and a VS 2010 solution has been included in the download.
- Full screen mode now uses the monitor on which the app is currently showing to go full screen rather than always using the primary monitor.
- Fixed bugs where the index of the image displayed would not get updated correctly when in fullscreen mode
- The app now uses MFC Feature pack controls for the color pickers on the Options property sheet
- The app now uses MFC Feature pack controls for selecting folders for the Open Folder and Move and Copy functionality.
- Updated the CMyRecentFileList class which is used to display the file and folder MRU list to use the latest VS 2015 MFC source code from CRecentFileList.
- The app now uses MFC feature pack classes for the menubar, toolbar & statusbar
- The slideshow timer now no longer fires if a message box is being currently displayed by EZView.
- Fixed a bug where the window would not refresh itself it the code failed to open a image when an existing image was already been shown.
- Fixed a bug where the html help would not be displayed when you selected Help -> Help Index or F1 in the app.
- When the user is prompted to show the first or last message image a task dialog is now shown which includes a don’t ask again checkbox
- Added SAL annotations to all the code.
- A double click in the view now enters / exits full screen mode.
- Hitting escape when in full screen mode now exits full screen mode.
- The filename of the current image is now shown in full screen mode even when the directory listing has not been retrieved.
A Comprehensive comparison of the MFC & ATL changes in VS 2017 RC compared to Visual Studio 2015 Update 3 (Part Two)
This is the second part of a two-part blog post which compares MFC and ATL in VS 2017 RC with those in Visual Studio 2015. The first part of this blog post covered the changes in the header files. This follow-up blog post will cover the differences in the source code modules.
Please note that this review is based on the VS 2017 Release Candidate (Build 26014.00) which was released on December 15 2016.
As ATL is mostly a header only library you would expect almost all of the differences to be in the MFC “.cpp” source code files.
Ok, the changes are as follows:
src\atls\x64
- This folder has been renamed from “amd64”.
src\mfc\x64
- This folder has been renamed from “amd64”.
afxdatarecovery.cpp
- Line 705: Fix for passing a parameter to CString::Format as an object instead of a C style string. This fix is related to the stricter type checking done by varargs functions as documented at https://blogs.msdn.microsoft.com/vcblog/2015/06/22/format-specifiers-checking/ starting in VS 2015 RTM.
afxeditbrowsectrl.cpp
- Line 379: Fix for passing a parameter to CString::Format as an object instead of a C style string.
afxjumplist.cpp
- Line 477, 486, 498: Fix for passing a parameter to TRACE1 as an object instead of a C style string.
afxlinkctrl.cpp
- Line 114: Fix for passing a parameter to TRACE as an object instead of a C style string.
afxmousemanager.cpp
- Line 121, 127: Fix for passing a parameter to TRACE as an object instead of a C style string.
afxribbonbar.cpp
- Line 723-749: Logic in CMFCRibbonApplicationButton::DrawImage has been reworked to better support high DPI scenarios. This is probably related to https://connect.microsoft.com/VisualStudio/feedback/details/620634/the-ms-workaround-for-bug-487869-doesnt-fly.
- Line 2147: Logic in CMFCRibbonBar::OnLButtonDown has been reworked. I was unable to find any information about this bug fix.
- Line 2725-2728, 2765: Logic in CMFCRibbonBar::RecalcLayout has been reworked. I was unable to find any information about this bug fix.
afxribboncustomizedialog.cpp
- Line 207: Fix for passing a parameter to CString::Format as an object instead of a C style string.
afxshowallbutton.cpp
- Line 133: Fix for passing a parameter to CString::Format as an object instead of a C style string.
afxstatusbar.cpp
- Line 207: tooltips are now reset correctly in CMFCStatusBar::SetIndicators. Bug report is https://connect.microsoft.com/VisualStudio/feedback/details/3063456/potential-memory-leaks-in-cmfcstatusbar-setindicators.
afxtagmanager.cpp
- Line 196: Fix for passing a parameter to TRACE as an object instead of a C style string.
afxtoolbar.cpp
- Line 7024: Fix for memory leak in CMFCToolbar::UpdateTooltips. Bug report is probably https://connect.microsoft.com/VisualStudio/feedback/details/3107222/memory-leak-in-mfc-in-cmfctoolbar-updatetooltips.
- Line 7448: Fix for passing a parameter to CString::Format as an object instead of a C style string.
afxtoolbarslistpropertypage.cpp
- Line 386, 452: Fix for passing a parameter to CString::Format as an object instead of a C style string.
afxtoolbarsmenupropertypage.cpp
- Line 475, 523: Fix for passing a parameter to CString::Format as an object instead of a C style string.
afxusertool.cpp
- Line 68: Fix for passing a parameter to TRACE as an object instead of a C style string.
afxvisualmanageroffice2007.cpp
- Line 365: Fix for passing a parameter to TRACE as an object instead of a C style string.
afxvisualmanagerwindows7.cpp
- Line 129: Fix for passing a parameter to TRACE as an object instead of a C style string.
ctlreg.cpp
- Line 148: Fix for passing a parameter to TRACE as an object instead of a C style string.
dbcore.cpp
- Line 67, 174, 180, 183: Fix for passing a parameter to TRACE as an object instead of a C style string.
oledlgs1.cpp
- Line 692: Fix for passing a parameter to CString::Format as an object instead of a C style string.
oledoccl.cpp
- Line 330: Fix for passing a parameter to CString::Format as an object instead of a C style string.
olemisc.cpp
- Line 990-991: Fix for passing two parameters to _snwprintf_s as an object instead of a OLECHAR* string.
olereg.cpp
- Line 555, 589: Fix for passing a parameter to TRACE as an object instead of a C style string.
oleunk.cpp
- Line 202, 235, 257, 286, 309, 394, 396: Fix for passing a parameter to TRACE as an object instead of a C style string.
winctrl3.cpp
- Line 65-77: Logic in _AFX_CHECKLIST_STATE::GetCheckBoxSize has been reworked to check the version number of comctrl32 in addition to the existing call to IsAppThemed. I was unable to find any information about this bug fix.
So, as you can see very fix bug fixes and some C++ conformance fixes in the MFC source code.
Hopefully this review was useful for those developers thinking of migrating their large ATL / MFC code base to the latest version of Visual Studio. Happy coding.
CAVICapWnd v1.13
Just to let everyone know that an update to v1.13 of CAVICapWnd has been released. Updates for this version include:
- Updated copyright details
- Updated the code to compile cleanly in VC 2008 – VC 2015.
- Fixed a bug in CAVICapWnd::GetVersion where it was using the message WM_CAP_DRIVER_GET_NAME instead of WM_CAP_DRIVER_GET_VERSION
- Added SAL annotations to all the code
DtWinVer v2.03
Just to let everyone know that v2.03 of DtWinVer has been released. Updates for this version include:
- Updated copyright details.
- Renamed IsWindows10Redstone2 method to IsWindows10Version1703.
A Comprehensive comparison of the MFC & ATL changes in VS 2017 RC compared to Visual Studio 2015 Update 3 (Part 1)
Following on from my May 2015 Blog post articles (https://naughter.wordpress.com/2015/05/07/a-comprehensive-comparison-of-the-mfc-atl-changes-in-vs-2015-rc-compared-to-visual-studio-2013-update-4/ & https://naughter.wordpress.com/2015/05/13/a-comprehensive-comparison-of-the-mfc-atl-changes-in-vs-2015-rc-compared-to-visual-studio-2013-update-4-part-2/) where I check out what’s new in MFC & ATL for Visual Studio 2015, here is an equivalent article for the upcoming release of VS 2017 which should be released shortly. Please note that this review is based on the VS 2017 Release Candidate (Build 26014.00) which was released on December 15 2016.
afx.h
- Top of module: The checks in VC 2015 which warned about MFC deprecation when compiled for MBCS have been removed. This warning was previously supressed using the pre-processor value NO_WARN_MBCS_MFC_DEPRECATION
afxtoolbarbutton.h
- Line 9: Minor change to a comment.
afxwinforms.h
- Line 19: Minor change to a comment.
atlalloc.h
- Line 22, 31, 39, 47, 55, 117-119, 126, 132-134, 141, 147-149, 156, 162-164, 171: Removed code which dealt with some errors for the defunct /Wp64 compiler option by using a ATL_W64 pre-processor macro.
- Line 24, 93: Minor change to comments
- Line 461: Code now uses this pointer explicitly in CHeapPtr::Allocate to make lookup be deferred until the template is actually instantiated. For information on the reasons for this change which is the biggest cause of differences as described throughout this blog post please see https://isocpp.org/wiki/faq/templates#nondependent-name-lookup-members. I believe this is because VC++ is in the process of supporting expression better ISO C++ conformance. For more information about this process please see https://blogs.msdn.microsoft.com/vcblog/2016/11/16/permissive-switch/. I will over the next few months by updating my code to address any issues when compiled with /permissive-.
- Line 461: Code now uses this pointer explicitly in CHeapPtr::Reallocate to make lookup be deferred until the template is actually instantiated.
atlcoll.h
- Line 114: Minor change to fixup layout of whitespace.
- Line 335, 356: Minor change to comment to fix spelling mistake (if you are using American English!)
- Line 425: Addition of the keyword typename for instantiation of the “pch” local variable in the CStringElementTraitsI::Hash method.
- Line 458: New using typename CElementTraitsBase<T>::INARGTYPE declaration in CStringRefElementTraits class.
- Line 464: Addition of the keyword typename for instantiation of the “pch” local variable in the CStringRefElementTraits::Hash method.
- Line 1034: Minor change to comment to fix spelling mistake.
- Line 1475: CAtlList::RemoveAll is now declared as throw()
- Line 1715: CAtlList::RemoveHeadNoReturn is now declared as throw()
- Line 1757: CAtlList::RemoveTailNoReturn is now declared as throw()
- Line 1834: CAtlList::RemoveAt is now declared as throw()
- Line 2871: CAtlMap::RemoveNode is now declared as throw()
- Line 2891: CAtlMap::RemoveAtPos is now declared as throw()
- Line 3130: Minor change to comment to fix spelling mistake
- Line 3311: CRBTree::SetNill is now declared as throw()
- Line 3589: CRBTree::FreeNode is now declared as throw()
- Line 3780: CRBTree::SwapNode is now declared as throw()
- Line 3840: CRBTree::RBDeleteFixup is now declared as throw()
- Line 4190-4193: New using statements for KINARGTYPE, VINARGTYPE, VOUTARGTYPE & CPair types
- Line 4271: Code now uses this pointer explicitly in CRBMap::RemoveKey to make lookup be deferred until the template is actually instantiated.
- Line 4286-4288: New using statements for KINARGTYPE, VINARGTYPE & CPair types
- Line 4343: Code now uses this pointer explicitly in CRBMultiMap::RemoveKey to make lookup be deferred until the template is actually instantiated.
- Line 4363 & 4378: Code now uses this pointer explicitly in CRBMultiMap::GetNextWithKey to make lookup be deferred until the template is actually instantiated.
atlcom.h
- Line 81-82: Minor change to fixup layout of whitespace.
- Line 966-967, 1707-1709, 1738: Update to SAL for CSecurityDescriptor::CopyACL
- Line 2226: Code now uses this pointer explicitly in BEGIN_COM_MAP to make lookup be deferred until the template is actually instantiated
- Line 2615: Minor change to comment to fix spelling mistake
- Line 2912-2941: Code now uses this pointer explicitly in CComObject class to make lookup be deferred until the template is actually instantiated
- Line 3002-3031: Code now uses this pointer explicitly in CComObjectCached class to make lookup be deferred until the template is actually instantiated
- Line 3086-3111: Code now uses this pointer explicitly in CComObjectNoLock class to make lookup be deferred until the template is actually instantiated
- Line 3165: Code now uses this pointer explicitly in CComObjectGlobal class to make lookup be deferred until the template is actually instantiated
- Line 3180-3186: Code now uses this pointer explicitly in CComObjectStack class to make lookup be deferred until the template is actually instantiated
- Line 3224-3268: Code now uses this pointer explicitly in CComObjectStackEx class to make lookup be deferred until the template is actually instantiated
- Line 3333-3334, 3348, 3356, 3361: New typedef for _MyCComObjectRootEx in CComAggObject class
- Line 3368-3382: Code now uses this pointer explicitly in CComAggObject class to make lookup be deferred until the template is actually instantiated
- Line 3459-3460, 3475, 3484, 3491: New typedef for _MyCComObjectRootEx in CComPolyObject class
- Line 3483-3512: Code now uses this pointer explicitly in CComPolyObject class to make lookup be deferred until the template is actually instantiated
- Line 3592-3623: Code now uses this pointer explicitly in CComTearOffObject class to make lookup be deferred until the template is actually instantiated
- Line 3592: Addition of the keyword typename in the CComTearOffObject constructor
- Line 3632-3633, 3648, 3656, 3661: New typedef for _MyCComObjectRootEx in CComCachedTearOffObject class
- Line 3638, 3641: Addition of the keyword typename in the CComCachedTearOffObject constructor
- Line 3668-3681: Code now uses this pointer explicitly in CComCachedTearOffObject class to make lookup be deferred until the template is actually instantiated
- Line 3803-3850: Code now uses this pointer explicitly in CComClassFactory2 class to make lookup be deferred until the template is actually instantiated
- Line 4571-4580: _ATL_EVENT_ENTRY struct declaration has been moved to these lines
- Line 4662-4836: Code now uses this pointer explicitly in IDispEventSimpleImpl class to make lookup be deferred until the template is actually instantiated
- Line 5036-5084: Code now uses this pointer explicitly in IDisplEventImpl class to make lookup be deferred until the template is actually instantiated
- Line 5132: New SINK_ENTRY_INFO_P macro
- Line 5134: New SINK_ENTRY_EX_P macro
- Line 5480-5481: CComEnum class declaration has been moved here
- Line 5483-5484: CComEnumOnSTL class declaration has been moved here
- Line 5655: There is no default for the ThreadModel template parameter for the CComEnum class now.
- Line 5786: There is no default for the ThreadModel template parameter for the CComEnumOnSTL class now.
- Line 5825: Addition of the keyword typename for the iter local variable in the ICollectionOnSTLImpl::Get_Item method
- Line 5966-5967: New CONNECTION_POINT_ENTRY_P macro
- Line 6311: Code now uses this pointer explicitly in IConnectionPointImpl class to make lookup be deferred until the template is actually instantiated
atlcomcli.h
- Line 8: Minor change to fixup layout of whitespace.
- Line 228: CComPtrBase::IsEqualObject is now longer declared inline
- Line 329-514, 586-600: Code now uses this pointer explicitly in CComPtr class to make lookup be deferred until the template is actually instantiated
- Line 625-687: Code now uses this pointer explicitly in CComQIPtr class to make lookup be deferred until the template is actually instantiated
ATLComTime.h
- Line 1095: COleDateTime::COleDateTime(const DBTIMESTAMP&) is now declared as throw().
- Line 1110: COleDateTime::GetAsDBTIMESTAMP is now declared as throw().
atlctl.h
- Line 95: Minor change to fixup layout of whitespace.
- Line 1592: Code now uses this pointer explicitly in CComControl class to make lookup be deferred until the template is actually instantiated
- Line 1671-2064: Code now uses this pointer explicitly in CComCompositeControl class to make lookup be deferred until the template is actually instantiated
- Line 2173: Addition of the keyword typename in the IQuickActivateImpl::QuickActivate method
atldb.h
- Line 1658: Addition of the keyword typename in the IDBInitialize::Uninitialize method
- Line 1681: Addition of the keyword typename in the IDBInitialize::Initialize method
- Line 2141: Minor change to comment to fix spelling mistake
- Line 2698: Minor change to comment to fix spelling mistake
- Line 4910-4986: Code now uses this pointer explicitly in IDBPropertiesImpl class to make lookup be deferred until the template is actually instantiated
- Line 4965, 4977, 5186, 5199: Code now uses CUtlPropsBase::EnumUPropSetFlags:: scoping for UPROPSET_USERINIT define
- Line 5000: Addition of the keyword typename in the IDBPropertiesImpl::GetPropertyInfo method
- Line 5095: Addition of the keyword typename in the IDBPropertiesImpl::SetProperties method
- Line 6053-6098: Code now uses this pointer explicitly in ICommandPropertiesImpl class to make lookup be deferred until the template is actually instantiated
- Line 6113: Code now uses CUtlPropsBase:: scoping when calling SetPropertiesArgChk method
- Line 6116: Minor change to comment to fix spelling mistake
- Line 6275-6280: Addition of the keyword typename in the ICommandImpl::CreateRowset method
- Line 6381: Addition of the keyword typename in the ICommandTextImpl::GetCommandText method
- Line 6424: Addition of the keyword typename in the ICommandTextImpl::SetCommandText method
- Line 6499-6500: Code now uses this pointer explicitly in ISessionPropertiesImpl class to make lookup be deferred until the template is actually instantiated
- Line 6554: Code now uses CUtlPropsBase:: scoping when calling SetPropertiesArgChk method
- Line 6558: Minor change to comment to fix spelling mistake
- Line 6787-6972: Code now uses this pointer explicitly in IAccessorImpl class to make lookup be deferred until the template is actually instantiated
- Line 6913: Addition of the keyword typename in the IAccessorImpl::CreateAccessor method
- Line 6917: Minor change fix spelling mistake for TRACE statement text
- Line 6943: Minor change to comment to fix spelling mistake
- Line 7045: Addition of the keyword typename in the IAccessorImpl::ReleaseAccessor method
- Line 7276, 7329: Addition of the keyword typename in the TransferData method
- Line 7932, 8106: Addition of the keyword typename in the IRowsetChangeImpl::DeleteRows method
- Line 8098: Minor change to comment to fix spelling mistake
- Line 8185: Addition of the keyword typename in the IRowsetChangeImpl::SetData method
- Line 8237, 8270, 8294, 8353, 8362, 8444: Addition of the keyword typename in the IRowsetChangeImpl::InsertRow method
- Line 8496: Addition of the keyword typename in the IRowsetImpl destructor method
- Line 8519, 8535, 8617: Addition of the keyword typename in the IRowsetImpl::RefRows method
- Line 8691: Addition of the keyword typename in the IRowsetImpl::GetDataHelper method
- Line 8728: Addition of the keyword typename in the IRowsetImpl::CreateRow method
- Line 8787, 8820, 8850, 8876, 8898, 8980, 9000: Addition of the keyword typename in the IRowsetImpl::GetNextRowsSkipDeleted method
- Line 9125: Addition of the keyword typename in the IRowsetImpl::GetNextRows method
- Line 9382: Addition of the keyword typename in the IRowsetImpl::RestartPosition method
- Line 9541: Addition of the keyword typename in the IRowsetLocateImpl::GetRowsAt method
- Line 9565-9745: Code now uses this pointer explicitly in IRowsetLocateImpl class to make lookup be deferred until the template is actually instantiated
- Line 9678: Addition of the keyword typename in the IRowsetLocateImpl::GetRowsByBookmark method
- Line 9891, 9895: Addition of the keyword typename in the IRowsetIdentity::IsSameRow method
- Line 9970-9981: Code now uses this pointer explicitly in IObjectWithSiteSessionImpl class to make lookup be deferred until the template is actually instantiated
- Line 10005-100017: Code now uses this pointer explicitly in IRowsetCreatorImpl class to make lookup be deferred until the template is actually instantiated
- Line 10076-100077: Code now uses this pointer explicitly in IRowsetInfoImpl class to make lookup be deferred until the template is actually instantiated
- Line 10081: Minor change to comment to fix spelling mistake
- Line 10171: Addition of the keyword typename in the IRowsetInfoImpl::GetSpecification method
- Line 10283-10498: Code now uses this pointer explicitly in IRowsetNotifyCP class to make lookup be deferred until the template is actually instantiated
- Line 10661: Code now uses this pointer explicitly in CRowsetImpl class to make lookup be deferred until the template is actually instantiated
- Line 10707: Code now uses this pointer explicitly in CSchemaRowsetImpl class to make lookup be deferred until the template is actually instantiated
- Line 11421: Addition of the keyword typename in the IRowsetUpdateImpl::GetOriginalData method
- Line 11585, 11647: Addition of the keyword typename in the IRowsetUpdateImpl::GetPendingRows method
- Line 11747: Addition of the keyword typename in the IRowsetUpdateImpl::Undo method
- Line 11776: Minor change to comment to fix spelling mistake
- Line 11881, 11983: Addition of the keyword typename in the IRowsetUpdateImpl::Undo method
- Line 12141: Minor change to comment to fix spelling mistake
- Line 12242, 12381, 12542: Addition of the keyword typename in the IRowsetUpdateImpl::Update method
atldbcli.h
- Line 290, 334: Minor update to the text of a comment
- Line 1232: Minor change to comment to fix spelling mistake
- Line 2693: Minor change to comment to fix spelling mistake
- Line 2988: Minor change to comment to fix spelling mistake
- Line 3188: Fix for CDynamicAccessor::strcpyT method returning a value when it is declared as returning void
- Line 3250: Minor change to comment to fix spelling mistake
- Line 3777: Minor change to comment to fix spelling mistake
- Line 4912-6116: CRowset, CBulkRowset, CVBufHelper, CVirtualBuffer & CArrayRowset classes are now declared here
- Line 6149-6208: Code now uses this pointer explicitly in CAccessorRowset class to make lookup be deferred until the template is actually instantiated
- Line 6564: Minor change to comment to fix spelling mistake
- Line 6794: Minor change to comment to fix spelling mistake
- Line 7104-7112: Code now uses this pointer explicitly in CTable class to make lookup be deferred until the template is actually instantiated
- Line 7385-7521: Code now uses this pointer explicitly in CCommand class to make lookup be deferred until the template is actually instantiated
atldbschi.h
- Line 43: Minor change to fixup layout of whitespace
- Line 102-104: Code now uses this pointer explicitly in CSchemaRowset class to make lookup be deferred until the template is actually instantiated
- Line 132-190: Code now uses this pointer explicitly in CRestrictions class to make lookup be deferred until the template is actually instantiated
atldef.h
- Line 91: #ifndef RC_INVOKED line has been moved to this line to cover more code
- Line 94: Minor change to a comment.
- Line 603-607: #ifndef RC_INVOKED line has been added to cover code here
atlexcept.h
- Line 91: Minor change to comment to fix spelling mistake
- Line 94: AtlThrowImpl is now declared as __declspec(noreturn)
- Line 112: AtlThrowLastWin32 is now declared as __declspec(noreturn)
atlhost.h
- Line 138: Minor change to fixup layout of whitespace
- Line 1080: Minor change to comment to fix spelling mistake (if you are using American English!)
- Line 2580: Minor change to comment to fix spelling mistake. Unfortunately the fix introduces another spelling mistake!
- Line 2581: Minor change to comment to fix spelling mistake
- Line 2584: Minor change to comment to fix spelling mistake
- Line 2723: Addition of the keyword typename in the AtlAxDialogCreateT method
atlface.h
- Line 122: Removal of MIDL_user_allocate and MIDL_user_free function declarations
atlimage.h
- Line 37: Compiler errors 4263 & 4264 are now disabled in this module
atlsafe.h
- Line 91: Minor change to fixup layout of whitespace
- Line 335, 350: Addition of the keyword typename in the CComSafeArray::GetAt methods
atlsocket.h
- Line 78: The first override of CSocketAddr:FindAddr is now declared as throw(). All the other Find* methods in this class were already declared as throw().
- Line 110: Minor change to comment to fix spelling mistake
atlstr.h
- Line 102: Minor change to fixup layout of whitespace
atlime.h
- Line 634-636: Minor change to fixup layout of whitespace
- Line 656: CTime::GetYear is now declared as throw().
- Line 665: CTime::GetMonth is now declared as throw().
- Line 674: CTime::GetDay is now declared as throw().
- Line 683: CTime::GetHour is now declared as throw().
- Line 692: CTime::GetMinute is now declared as throw().
- Line 701: CTime::GetSecond is now declared as throw().
- Line 710: CTime::GetDayOfWeek is now declared as throw().
atlutil.h
- Line 1257: Addition of the keyword typename in the CThreadPool:: ThreadProc method
- Line 3563: Addition of the keyword typename in the CopyCString method
- Line 3592: Various parameters to a CStringA::Format call have been fixed in the SystemTimeToHttpDate method.
atlwin.h
- Line 359-366: CWinTraits, CControlWinTraits, CFrameWinTraits & CMDICHildWinTraits are now declared here
- Line 706: Minor change to comment to fix spelling mistake
- Line 2273-2470: Code now uses this pointer explicitly in CAXWindowT class to make lookup be deferred until the template is actually instantiated
- Line 2517-2637: Code now uses this pointer explicitly in CAXWindow2T class to make lookup be deferred until the template is actually instantiated
- Line 2875: Code now uses this pointer explicitly in FORWARD_NOTIFICATIONS macro to make lookup be deferred until the template is actually instantiated
- Line 2883: Code now uses this pointer explicitly in REFLECT_NOTIFICATIONS macro to make lookup be deferred until the template is actually instantiated
- Line 2889: Code now uses this pointer explicitly in DEFAULT_REFLECTION_HANDLER macro to make lookup be deferred until the template is actually instantiated
- Line 3141 There is no longer default values for the dwStyle and dwExStyle template parameters for the CWinTraits class
- Line 3192-3317: Code now uses this pointer explicitly in CWindowImplRoot class to make lookup be deferred until the template is actually instantiated
- Line 3443-3645: Code now uses this pointer explicitly in CWindowsImplBaseT class to make lookup be deferred until the template is actually instantiated
- Line 3547, 3550, 3555: Code now uses CWindowImplRoot<TBase>:: scoping in CWindowImplBaseT::WindowsProc method
- Line 3672-3673: Code now uses this pointer explicitly in CWindowImpl class to make lookup be deferred until the template is actually instantiated
- Line 3734: Code now uses this pointer explicitly in CWindowWithReflectorImpl class to make lookup be deferred until the template is actually instantiated
- Line 3780-3828: Code now uses this pointer explicitly in CDialogImplBaseT class to make lookup be deferred until the template is actually instantiated
- Line 3913, 3923, 3931: Code now uses CWindowImplRoot<TBase>:: scoping in CDialogImplBaseT::DialogProc method
- Line 3958-4028: Code now uses this pointer explicitly in CDialogImpl class to make lookup be deferred until the template is actually instantiated
- Line 4073-4355: Code now uses this pointer explicitly in CAxDialogImpl class to make lookup be deferred until the template is actually instantiated
- Line 4196: Minor change to comment to fix spelling mistake
- Line 4509-4795: Code now uses this pointer explicitly in CContainedWindowT class to make lookup be deferred until the template is actually instantiated
- Line 5268, 5271, 5301: Addition of the keyword typename in the AtlModuleRegisterWndClassInfoT function
cstringt.h
- Line 106, 107: Minor change to fixup layout of whitespace
- Line 1180-2374: Code now uses this pointer explicitly in CStringT class to make lookup be deferred until the template is actually instantiated
- Line 2265: Code now uses CThisSimpleString:: scoping in CStringT::FormatV method
- Line 2279: Code now uses CThisSimpleString:: scoping in CStringT::AllocSysString method
- Line 2291: Code now uses CThisSimpleString:: scoping in CStringT::SetSysString method
- Line 2386, 2397, 2408, 2426, 2438, 2451, 2463: Code now uses CThisSimpleString:: scoping in CStringT::operator+ method
- Line 3016, 3020, 3032, 3038, 3044, 3050, 3056, 3062: New typedef for MyStrTraits in CFixedStringT class
- Line 3069: Code now uses this pointer explicitly in CFixedStringT class to make lookup be deferred until the template is actually instantiated
- Line 3176: Addition of the keyword typename in the CStringElementTraits:: Hash method
What this means is that in VC 2017 there is no new functionality which has been added to ATL or MFC, only C++ compliance changes, spelling mistake fixups and general bug fixes.
I plan to produce a follow-up blog post where I post the details of the MFC source code diff of VS 2017 compared to VS 2015. Note that since ATL is a header only template library all changes made to ATL are already covered in this blog post article. I would expect most of the MFC source code changes to be similar to the differences as described above along with the usual list of additional bug fixes.
Hopefully this review was useful for those developers thinking of migrating their large ATL / MFC code base to the latest version of Visual Studio. Happy coding.
CMMSystem v1.05
Just to let everyone know that v1.05 of CMMSystem has been released. Updates for this version include:
- Updated copyright details.
- Updated the ShowInput example application to include a Direct2D codepath in addition to the existing GDI codepath. Please note that this optimization requires at least VC 2010 to compile as it makes use of the D2D integration added to MFC. This optimization helps improve the performance of this application as well as demonstrating migration of code from GDI to D2D. By default D2D in now used in this application but if you want to revert back to GDI you can define the CSHOWINPUT_NOD2D preprocessor value.
- Updated the ShowInput example application to include a codepath which uses NVIDIA CUDA to optimize the FFT logic using the cuFFT library. To enable support for this you will need to have the NVIDIA CUDA Toolkit (https://developer.nvidia.com/cuda-toolkit) installed. You will also need to define the CSHOWINPUT_USECUDA preprocessor value in the ShowInput application. A prebuilt x64 CUDA enabled D2D implementation is now provided in the download. Please note that cuFFT is only available in CUDA when compiled for x64 as noted here: http://stackoverflow.com/questions/29889897/cufft-lib-for-win32-is-missing
- Updated the ShowInput application to use a 44.1Khz input bit rate for the audio. At this sampling rate and performing an FFT every 1024 samples, each FFT bar shown in the spectrum corresponds to 42.06 Hertz. Also due to changing to this higher sampling rate and the 1024 samples used for the FFT, it means that the FFT in this app now updates at a rate of 43 frames per second instead of the previous 10 frames per second when it was using a sampling rate of 11025Khz.
- Updated the ShowInput application to use wider rectangles to show the frequency spectrum.
- The ShowInput sample application now shows the frequency spectrum normalized. This means that the frequency with the largest amplitude is now shown with a height equal to the client area of the application.