shtmlreport.h

来自「如果在您的软件中需要输出报表」· C头文件 代码 · 共 53 行

H
53
字号
// SHTMLReport.h: interface for the CSHTMLReport class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_SHTMLREPORT_H__DDC9F875_5C02_4D50_B782_09EB2261FC8D__INCLUDED_)
#define AFX_SHTMLREPORT_H__DDC9F875_5C02_4D50_B782_09EB2261FC8D__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <afxhtml.h>

#include "mshtml.h"
#include "comdef.h"

#include "sarray.hpp"
class CSHTMLReport  
{
	enum{inner_text,inner_html,outer_text,outer_html};
	typedef struct _ColCellInfo{
		long		iRow;
		IDispatch	*pDisCell;
		long		iIndexInRow;
	}COLCELLINFO;
public:
	void SetIndexFormat(CString strIndexFormat);
	BOOL MergeCol(int iCol);
	BOOL MergeRow(int iRow);
	BOOL DeleteRow(int index);
	BOOL SetItemHTML(int iRow,int iCol,CString html);
	BOOL InsertRow(int index);
	void SetTableName(CString name);
	void SetHtmlDocPtr(IHTMLDocument2 *pDoc);
	CSHTMLReport();
	virtual ~CSHTMLReport();

private:
	void MergeRowPrivate(IHTMLTableRow *pIRow,long begincol,long endcol);
	BOOL MakeColDispatchCollection(IHTMLElementCollection *pIRowArray/*in*/,
		long iCol/*in*/,
		CSArray<COLCELLINFO> &colArray/*out*/);
	void MergeColPrivate(IHTMLElementCollection *pIRowArray,CSArray<COLCELLINFO> &colArray,long beginrow,long endrow);
	BOOL SetElementText(IHTMLElement *pElement, int type,CString str);
	CString GetElementText(IHTMLElement *pElement,int type);
	IHTMLTable * GetTableDispatch();
	IHTMLDocument2* m_pHtmlDoc2;
	CString			m_strTableName;
	int				m_iHeadLines;
	CString			m_strIndexFormat;
};

#endif // !defined(AFX_SHTMLREPORT_H__DDC9F875_5C02_4D50_B782_09EB2261FC8D__INCLUDED_)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?