Library Implementation Changes

CAsyncSocket

The SendTo member function correctly returns errors. In previous versions of MFC, SendTo returned FALSE for some errors. The function now returns a proper WinSock error code in all circumstances.

Collection Classes

FindIndex returns NULL for negative indexes.

List-based collections with a FindIndex member will return NULL if the index passed to the function is negative. In previous releases, a negative index caused the program to stop responding or an access violation.

CControlBar

CDaoDatabase

Some recent releases of MFC had problems running correctly on machines that weren’t updated to DAO 3.5. Those problems have been resolved, but it is still advisable to upgrade to DAO 3.5, due to performance and stability improvements.

CDaoRecordset

CDC

In previous versions of MFC, CDC member functions would sometimes return unpredictable values for extreme failure conditions. These functions have been cleaned up and now return the correct error code.

CInternetFile

ReadString doesn’t truncate

In some circumstances, the ReadString member function would truncate data read from the connection. This bug has been fixed.

CInternetSession

COleControl

COleDateTime

Member function rounding errors

Several rounding errors that existed in previous versions of the following member functions have been remedied: GetDays, GetHours, GetMinutes, GetSeconds, GetTotalDays, GetTotalHours, GetTotalMinutes, GetTotalSeconds.

COleDocument

Previous versions of MFC opened a storage with STGM_SHARE_EXCLUSIVE. MFC now uses the more appropriate STGM_SHARE_DENY_WRITE flag, which allows other applications to read the storage while it is opened by the document object.

CPropertyPage

CRecordset

The RFX_Int function incorrectly handled NULL values in previous versions of the library. This problem has been corrected.

CTabCtrl

SetItemState and GetItemState member functions have been added to support new functionality exposed by the revised COMCTL32.DLL.

CToolBar

The SetSizes function previously caused an assert when it wasn’t attached to a window, but now reacts by setting the member data of the object to reflect the size instead of moving the window’s position.

CScrollView

CView

The print preview bar has been restored to its rightful position—within the parent frame.

CWinThread

The MFC-supplied PreTranslateMessage member function is no longer responsible for canceling active tooltips. This code has been moved to CWnd::FilterToolTipMessage. This change was necessary to support the new tracking tooltip styles.

CWnd

The CenterWindow function has been fixed to work properly on multiple-monitor machines.