Last active
January 16, 2019 02:07
-
-
Save hkuno9000/480beeef6b74689c8e7d3089a946c935 to your computer and use it in GitHub Desktop.
How to detect MFC class in import headers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
macro name | target | |
---------------|------------- | |
_AFX | MFC classes | |
__CSTRINGT_H__ | CString | |
__AFXSTR_H__ | MFC's CString | |
__ATLSTR_H__ | ATL's CString | |
#include <import.h> | |
#ifdef _AFX | |
code for MFC | |
#else | |
code for non-MFC | |
#endif | |
see: | |
* https://stackoverflow.com/questions/1196808/how-to-detect-use-mfc-in-preprocessor | |
* https://docs.microsoft.com/en-us/cpp/atl-mfc-shared/using-cstring?view=vs-2017 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment