⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 shtmlreport.h

📁 如果在您的软件中需要输出报表
💻 H
字号:
// 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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -