12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- #pragma once
- #ifndef __AGCWinApp_h__
- #define __AGCWinApp_h__
- /////////////////////////////////////////////////////////////////////////////
- // AGCWinApp.h : Declaration of the CAGCWinApp class.
- //
- #include <AGC.h>
- #include <..\TCLib\WinApp.h>
- /////////////////////////////////////////////////////////////////////////////
- //
- class CAGCWinApp : public TCWinAppDLL
- {
- // Attributes
- public:
- void SetDebugHook(IAGCDebugHook* pdh)
- {
- m_spDebugHook = pdh;
- }
- // Overrides
- public:
- #ifdef _DEBUG
- virtual void DebugOutput(const char* psz)
- {
- if (NULL != m_spDebugHook)
- m_spDebugHook->DebugOutput(psz);
- else
- TCWinAppDLL::DebugOutput(psz);
- }
- virtual bool OnAssert(const char* psz, const char* pszFile, int line, const char* pszModule)
- {
- return (NULL != m_spDebugHook) ?
- !!m_spDebugHook->OnAssert(psz, pszFile, line, pszModule) :
- TCWinAppDLL::OnAssert(psz, pszFile, line, pszModule);
- }
- virtual void OnAssertBreak()
- {
- if (NULL != m_spDebugHook)
- m_spDebugHook->OnAssertBreak();
- else
- TCWinAppDLL::OnAssertBreak();
- }
- #endif // _DEBUG
- // Data Members
- protected:
- IAGCDebugHookPtr m_spDebugHook;
- };
- /////////////////////////////////////////////////////////////////////////////
- // External Reference
- extern CAGCWinApp g_app;
- /////////////////////////////////////////////////////////////////////////////
- #endif // !__AGCWinApp_h__
|