blob: 745f5fd3cfcbb8f1a49c5dcf350e71ef103320ca (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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_)
|