//typedef CFrameWnd* (CDocTemplate::*PFSTOP)(CDocument* pDoc, CFrameWnd* pOther);

// Класс для отработки перехвата.
class CWrapModule
{
	static struct paramdefs {
		char * rusName;
		char * engName;
		bool HasFSO;
		int ParamsNum;
	}  glFnNames[];

public:
	CWrapModule();
	int  WrapFindFunc(char const * fName)const;
	int  WrapFindProc(char const * pName,int flag)const;
	int  WrapCallAsFunc(int num,class CValue & retValue,int argNum,class CValue * * ppValue);
	int  WrapCallAsProc(int num,int argNum,class CValue * * ppValue);

#ifdef FORMEX_DLL

	void  WrapAssignContext(class CBLContext * pCont);

#endif

	int  WrapGetHiTrackBound(int iNum);
	int  WrapGetLoTrackBound(int iNum);
	int  WrapSetIndicators(unsigned int const * num1,int num2);
	class CWnd * WrapCreateControl(class CGetField * pGetField,unsigned int id,class CRect const & rect,class CWnd * pParent,unsigned long style,unsigned long styleex);
	int  WrapGetProcInfo(int nProc, class CBLProcInfo & cProcInfo)const;
	int  WrapGetNParams(void)const;
	void WrapOnInitialUpdate(void);
	int WrapOnInitDialog(void);
	int  WrapLayoutForm(class CFormView * pFormView);
	void  WrapOnCloseDocument(void);
	int  WrapUpdateData(int i1,unsigned int ui1);
	//void WrapOnStopExecution(void);
	int  WrapLoadForm(long lID,char const * pFolder);
	int  WrapLoadDialog(long lID,char const * pFolder);
	int  WrapDoLoadExternal(char const *);
	void WrapGetDataImageCol(CString& a_Str);
	void WrapProcessSecondOpen(CValue* val);

	int FindFunction(char const * lpFnName)const;

	void CheckListBoxDrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
	BOOL CheckListBoxOnChildNotify(UINT message, WPARAM wParam, LPARAM lParam,
		LRESULT* pResult);

	static void SetWrapCheckListBoxDrawItem(BOOL bOnOff);

};

class CDrawStaticWrap: public CStatic//CWnd
{
public:
	static struct AFX_MSGMAP const * pubGetMessageMap(void)
	{
		return &messageMap;
	};

	afx_msg void OnPaint();

	DECLARE_MESSAGE_MAP()
};

class CDrawTrasparentCtrlWrap: public CButton//CWnd
{
public:
	static struct AFX_MSGMAP const * pubGetMessageMap(void)
	{
		return &messageMap;
	};

	void RedrawCheck();
	void DrawCheckMark(CDC *pDC, CRect rect, UINT nStyle, UINT nState);
	void DrawRadioMark(CDC *pDC, CRect rect, UINT nStyle, UINT nState);
	void Draw(LPDRAWITEMSTRUCT lpDIS);
	afx_msg void OnPaint();
	afx_msg void OnEnable(BOOL bEnable);
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	afx_msg void OnSetFocus(CWnd* pPre);
	afx_msg void OnKillFocus(CWnd* pNew);

	DECLARE_MESSAGE_MAP()
};

class CFormExListBox: public CListBox
{
public:
	CFormExListBox():CListBox()
	{
	};

	CFormExListBox::~CFormExListBox()
	{
	};

	afx_msg void OnPaint();
	afx_msg void OnNcDestroy(void);
	afx_msg LRESULT OnSetFont(WPARAM wParam, LPARAM lParam);

	virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);

	DECLARE_MESSAGE_MAP()
};

class CFormExCheckListBox: public CCheckListBox
{
public:
	CFormExCheckListBox():CCheckListBox()
	{
	};

	CFormExCheckListBox::~CFormExCheckListBox()
	{
	};

	void MyDrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
	BOOL MyOnChildNotify(UINT message, WPARAM wParam, LPARAM lParam,
		LRESULT* pResult);
};

class CFormExComboBox: public CComboBox
{
public:
	CFormExComboBox():CComboBox()
	{
	};

	CFormExComboBox::~CFormExComboBox()
	{
	};

//	afx_msg void OnPaint();
	afx_msg void OnNcDestroy(void);
	afx_msg LRESULT OnSetFont(WPARAM wParam, LPARAM lParam);

	virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);

	DECLARE_MESSAGE_MAP()
};

class CGetDoc7_Public: public CGetDoc7
{
public:
	void  RefreshStdList(void)
	{
		CGetDoc7::RefreshStdList();
	};
};