//
class CCustomHtmlView : public CHtmlView
{
DECLARE_DISPATCH_MAP()
DECLARE_DYNCREATE(CCustomHtmlView)
public:
public:
CCustomHtmlView(); // protected constructor used by dynamic creation
virtual ~CCustomHtmlView();
protected:
void StudyLesson(LPCTSTR lpszPath); //此为在HTML中将被调用的函数
}
CCustomHtmlView::CCustomHtmlView()
{
//{{AFX_DATA_INIT(CCustomHtmlView)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
EnableAutomation();
}
CCustomHtmlView::~CCustomHtmlView()
{
}
//接口函数,提供给JS调用的函数名为StudyLesson
BEGIN_DISPATCH_MAP(CCustomHtmlView, CHtmlView)
DISP_FUNCTION(CCustomHtmlView, "StudyLesson", StudyLesson , VT_EMPTY ,VTS_BSTR)
END_DISPATCH_MAP()
/************************************************************************/
/*
/************************************************************************/
void CCustomHtmlView::StudyLesson(LPCTSTR lpszPath)
{
//AfxMessageBox("JS调用VC函数成功")
}