_AFX_SECURE_NO_WARNINGS
TRY
TOC
Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

_AFX_SECURE_NO_WARNINGS 

Suppresses compiler warnings for the use of deprecated MFC functions.


_AFX_SECURE_NO_WARNINGS

This code sample would cause a compiler warning if _AFX_SECURE_NO_WARNINGS were not defined.

// afx_secure_no_warnings.cpp
// compile with: /EHsc 
#define _AFX_SECURE_NO_WARNINGS
#include "afxcmn.h"

int main() {
   CRichEditCtrl * m_richedit = new CRichEditCtrl;
   m_richedit->GetSelText("aa");
}
Show:
© 2016 Microsoft