diff options
author | Stef Walter <stef@thewalter.net> | 2003-09-17 19:07:23 +0000 |
---|---|---|
committer | Stef Walter <stef@thewalter.net> | 2003-09-17 19:07:23 +0000 |
commit | 3f95d417d9e623ac0c74df8ef11d7a01846392dd (patch) | |
tree | 45ec73f2dc07eafd7f41a6f62a8cdfbaa279469f /Shutdown/BatchFileCmpt.h |
Diffstat (limited to 'Shutdown/BatchFileCmpt.h')
-rw-r--r-- | Shutdown/BatchFileCmpt.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/Shutdown/BatchFileCmpt.h b/Shutdown/BatchFileCmpt.h new file mode 100644 index 0000000..745f5fd --- /dev/null +++ b/Shutdown/BatchFileCmpt.h @@ -0,0 +1,58 @@ +////////////////////////////////////////////////////////////////// +// +// BatchFileCmpt.h: interface for the CBatchFileCmpt class. +// +// CBatchFileCmpt is a Host Implemented component only for this +// program it derives from CComponentHolder so it can fit +// into the main program array of components and then overrides +// most of the funtions. +// +// It's DoShutdown function creates the batchfile for all the DOS +// Components +// +////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_BATCHFILECMPT_H__2DCE7A04_2D47_11D2_B2D4_0020182B97FC__INCLUDED_) +#define AFX_BATCHFILECMPT_H__2DCE7A04_2D47_11D2_B2D4_0020182B97FC__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include "..\common\ComponentHolder.h" + +class CBatchFileCmpt + : public CComponentHolder +{ +public: + CBatchFileCmpt(); + virtual ~CBatchFileCmpt(); + + // Override + virtual HRESULT DoShutdown(DWORD dwMode, HWND hWndParent = NULL); + +protected: + HRESULT ReportLastError(string sMessage); + // Helper Functions + HRESULT MakeBatchFile(); + HRESULT GetCurBatchFile(const string& sFileName, string& sPreText, string& sPostText); + HRESULT CallBatchFile(); + + + bool m_bBatchFile; + + +public: + // Override these fellows to prevent problems + virtual bool IsEnabled() { return true; }; + virtual bool Enable(bool bEnable) { return bEnable; } ; + virtual int GetPos() { return 20; } ; + virtual bool SetPos(int nPos) { return false; } ; + virtual HRESULT GetBatchText(string& sBatchText) { return E_NOTIMPL; }; + virtual IUnknown* GetUnknown() { return NULL; }; + virtual UINT GetType() { return COMPONENT_WIN; }; + + +}; + +#endif // !defined(AFX_BATCHFILECMPT_H__2DCE7A04_2D47_11D2_B2D4_0020182B97FC__INCLUDED_) |