AxibugEmuOnline/References/virtuanessrc097-master/DebugOut.h
2024-08-05 17:58:53 +08:00

46 lines
1.4 KiB
C++
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// Debug output
//
#ifndef __DEBUGOUT_INCLUDED__
#define __DEBUGOUT_INCLUDED__
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <string>
using namespace std;
typedef void (__cdecl *DEBUGWINDOWOUTPUT)(LPCTSTR);
class CDebugOut {
public:
CDebugOut();
void Clear();
void __cdecl Out( LPSTR fmt, ... );
void Out( const string& str );
protected:
HWND hWndDebugOutput;
private:
};
extern CDebugOut Dbg;
#if defined(_DEBUG) || defined(_DEBUGOUT)
#define DEBUGOUT Dbg.Out
#else
#define DEBUGOUT
#endif // !_DEBUG
#if defined(_DEBUG) || defined(_DEBUGOUT)
#define DEBUGCLR Dbg.Clear
#else
#define DEBUGCLR
#endif // !_DEBUG
#endif // !__DEBUGOUT_INCLUDED__