#if !defined(AFX_FORMEX_H__BE876AE3_EF76_11D3_A1F5_00A024AAD7AF__INCLUDED_)
#define AFX_FORMEX_H__BE876AE3_EF76_11D3_A1F5_00A024AAD7AF__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CTimerWindow : public CWnd
{
public:
	CGetDoc7* m_pDoc;
	CString m_strTimerName;
};

class CFormEx : public CBLContext
{
	DECLARE_DYNCREATE(CFormEx);
public:

	enum {
		methAssignForm,
		methGetForm,
		methGetNumAttrib,
		methGetAttrib,
		methObjectType,
		methFullObjectType,
		methFullPath,
		methFixBrowse,
		methAddAttrib,
		methGetAttribAtPos,
		methAddTBButton,
		methFindAttrib,
		methGetNextAttrib,
		methCurrentAttrib,
		methGetPicture,
		methHighlightTabItem,
		methAddTabImages,
		methRefreshTabImages,
		methDisableCloseForm,
		methRefresh,
		methColourTable,
		methAttachForm,
		methDetachForm,
		methTableColumnPosition,
		methSetAutoAdjustTable,
		methSetCursor,
		methAttachFormToAttrib,
		methAddFormTab,
		methStartDirectEnter,
		methStopDirectEnter,
		methResetModify,
		methSetFont,
		methGetTablesName,
		methSetColumnWidth,
		methGetColumnWidth,
		methGetCoordinatesCurrentCell,
		methGetCellCoordinates,
		methSetTabFont,
		methIdleProcessing,
		methSetTablePicture,
		methTest,
		lastMethod
	};

	enum {
		propHeight,
		propWidth,
		propMaximize,
		propLabel,
		propTop,
		propLeft,
		propMinimize,
		propDescription,
		propBkColor,
		propModuleText,
		propTransparency,
		lastProp
	};

	enum {
		selType = 1,
		selCaption,
		selVisible,
		selReadOnly,
		selLayer
	};

	static struct paramdefs {
		char * Names[2];
		int HasReturnValue;
		int NumberOfParams;
	}  defFnNames[];

	static struct parampropdefs {
		char * Names[2];
		int IsReadable;
		int IsWritable;
		CValue* propValue;
	}  defPropNames[];

	CFormEx(int);
	CFormEx();
	virtual ~CFormEx();
	virtual int  CallAsFunc(int,class CValue &,class CValue * *);
	virtual int  CallAsProc(int,class CValue * *);
	virtual void  DecrRef(void);
	virtual int  FindMethod(char const *)const;
	virtual int  FindProp(char const *)const;
	virtual char const *  GetCode(void)const;
	virtual int  GetDestroyUnRefd(void)const;
	virtual void  GetExactValue(class CValue &);
	virtual class CObjID   GetID(void)const;
	virtual class CBLContextInternalData *  GetInternalData(void);
	virtual char const *  GetMethodName(int,int)const;
	virtual int  GetNMethods(void)const;
	virtual int  GetNParams(int)const;
	virtual int  GetNProps(void)const;
	virtual int  GetParamDefValue(int,int,class CValue *)const;
	virtual char const *  GetPropName(int,int)const;
	virtual int  GetPropVal(int,class CValue &)const;
	virtual long  GetTypeID(void)const;
	virtual char const *  GetTypeString(void)const;
	virtual class CType   GetValueType(void)const;
	virtual int  HasRetVal(int)const;
	virtual void  IncrRef(void);
	virtual void  InitObject(class CType const &);
	virtual void  InitObject(char const *);
	virtual int  IsExactValue(void)const;
	virtual int  IsOleContext(void)const;
	virtual int  IsPropReadable(int)const;
	virtual int  IsPropWritable(int)const;
	virtual int  IsSerializable(void);
	virtual int  SaveToString(class CString &);
	virtual void  SelectByID(class CObjID,long);
	virtual int  SetPropVal(int,class CValue const &);
	static class CObjID ObjID;

	CFormAllCtrlsContext* m_Form;
	int CurrentAtr;
	int KindOfSelection;
	CValue Selection;
	CTabCtrl TabCtrl;

	CTimerWindow wndTimer;
	UINT m_uTimer;

protected:
	CWnd* m_pTableCtrl;
	CWnd* m_pWorkCtrl;
	CGetField* m_pWorkField;
	CValueTable* m_pTable;
	int m_curCol;
	int m_curRow;
	CString m_WorkCodeName;

};

#endif // !defined(AFX_FORMEX_H__BE876AE3_EF76_11D3_A1F5_00A024AAD7AF__INCLUDED_)
