stdafx.h 에 추가한다.
쓸 때는 이런 식으로 사용.
- #define _ON (0)
- #define _OFF (1)
- #define D0 _ON ? (VOID)0 : DebugView
- inline void DebugView(LPTSTR err, ...)
- {
- static CString strErr;
- va_list ap;
- va_start(ap, err);
- strErr.FormatV(err, ap);
- va_end(ap);
- OutputDebugString(_T("[프로젝트 이름] ") + strErr + _T("\n"));
- };
- D0(_T("OpenProcess=%d %s"), _ttoi(buf), _T("abcde"));
[1776] [프로젝트 이름] OpenProcess=5012 abcde