www.pudn.com > IEFilter.rar > IEFilterCtl.h


#if !defined(AFX_IEFILTERCTL_H__00681946_57E9_45F3_89C2_AB8F8ECAAA6F__INCLUDED_) 
#define AFX_IEFILTERCTL_H__00681946_57E9_45F3_89C2_AB8F8ECAAA6F__INCLUDED_ 
 
#if _MSC_VER > 1000 
#pragma once 
#endif // _MSC_VER > 1000 
 
// IEFilterCtl.h : Declaration of the CIEFilterCtrl ActiveX Control class. 
 
///////////////////////////////////////////////////////////////////////////// 
// CIEFilterCtrl : See IEFilterCtl.cpp for implementation. 
 
#include  
 
 
 
//#import  // Internet Explorer 4.0x 
#import  // Internet Explorer 5 
#import  
 
 
const int max_shellwindows_count = 60; 
enum ModelType 
{ 
	Natural = 0, 
	DenyModel , 
	AllowModel  
}; 
 
class CIEFilterCtrl : public COleControl 
{ 
	DECLARE_DYNCREATE(CIEFilterCtrl) 
 
// Constructor 
public: 
	CIEFilterCtrl(); 
 
// Overrides 
	// ClassWizard generated virtual function overrides 
	//{{AFX_VIRTUAL(CIEFilterCtrl) 
	public: 
	virtual void OnDraw(CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid); 
	virtual void DoPropExchange(CPropExchange* pPX); 
	virtual void OnResetState(); 
	//}}AFX_VIRTUAL 
 
// Implementation 
protected: 
	~CIEFilterCtrl(); 
 
	DECLARE_OLECREATE_EX(CIEFilterCtrl)    // Class factory and guid 
	DECLARE_OLETYPELIB(CIEFilterCtrl)      // GetTypeInfo 
	DECLARE_PROPPAGEIDS(CIEFilterCtrl)     // Property page IDs 
	DECLARE_OLECTLTYPE(CIEFilterCtrl)		// Type name and misc status 
 
// Message maps 
	//{{AFX_MSG(CIEFilterCtrl) 
	afx_msg void OnTimer(UINT nIDEvent); 
	//}}AFX_MSG 
	DECLARE_MESSAGE_MAP() 
 
// Dispatch maps 
	//{{AFX_DISPATCH(CIEFilterCtrl) 
	afx_msg BOOL GetBCheckBody(); 
	afx_msg void SetBCheckBody(BOOL bNewValue); 
	afx_msg short GetModel(); 
	afx_msg void SetModel(short nNewValue); 
	afx_msg BOOL GetEnabled(); 
	afx_msg void SetEnabled(BOOL bNewValue); 
	afx_msg BOOL GetBCheckURL(); 
	afx_msg void SetBCheckURL(BOOL bNewValue); 
	afx_msg BOOL GetBCheckLocationName(); 
	afx_msg void SetBCheckLocationName(BOOL bNewValue); 
	afx_msg BOOL GetBCheckTitle(); 
	afx_msg void SetBCheckTitle(BOOL bNewValue); 
	afx_msg void Init(); 
	afx_msg void AddKey(LPCTSTR Key); 
	afx_msg void Check(); 
	afx_msg void AddAllowURL(LPCTSTR URLSTR); 
	afx_msg void AddDenyURL(LPCTSTR DenyURL); 
	afx_msg BSTR getOthernessUrls(); 
	afx_msg void clnHisUrls(); 
	afx_msg BOOL GetKillTIE(BOOL bKillTencentIE); 
	afx_msg void SetKillTIE(BOOL bKillTencentIE, BOOL bNewValue); 
	//}}AFX_DISPATCH 
	DECLARE_DISPATCH_MAP() 
 
	afx_msg void AboutBox(); 
 
// Event maps 
	//{{AFX_EVENT(CIEFilterCtrl) 
	//}}AFX_EVENT 
	DECLARE_EVENT_MAP() 
 
// Dispatch and event IDs 
public: 
	void Checking(); 
	void URLChecking(); 
	void TitleChecking(); 
	void LocationNameChecking(); 
	enum { 
	//{{AFX_DISP_ID(CIEFilterCtrl) 
	dispidBCheckBody = 1L, 
	dispidModel = 2L, 
	dispidEnabled = 3L, 
	dispidBCheckURL = 4L, 
	dispidBCheckLocationName = 5L, 
	dispidBCheckTitle = 6L, 
	dispidInit = 7L, 
	dispidBKillTIE = 14L, 
	dispidAddKey = 8L, 
	dispidCheck = 9L, 
	dispidAddAllowURL = 10L, 
	dispidAddDenyURL = 11L, 
	dispidGetOthernessUrls = 12L, 
	dispidClnHisUrls = 13L, 
	//}}AFX_DISP_ID 
	}; 
private: 
	void KillQQ_IExplorer(); 
	BOOL m_bKillTIE; 
	BOOL m_bBody; 
	BOOL m_bURL; 
	BOOL m_bLocationName; 
	BOOL m_bTitle; 
	BOOL m_Enabled; 
	ModelType m_Model; 
 
	SHDocVw::IShellWindowsPtr m_spSHWinds; 
	CString m_strWinCount; 
//    SHDocVw::DWebBrowserEvents2Ptr m_spEvents;  
	SHDocVw::IWebBrowser2Ptr  ptrBrowser  ;   
	CStringArray CStrArray; //key 
	CStringArray CAllowURLArray; 
	CStringArray CDenyURLArray; 
	CStringArray COthernessUrlsArray; 
	//CPtrArray spBrowserArray; 
	CArray spBrowserArray; 
}; 
 
//{{AFX_INSERT_LOCATION}} 
// Microsoft Visual C++ will insert additional declarations immediately before the previous line. 
 
#endif // !defined(AFX_IEFILTERCTL_H__00681946_57E9_45F3_89C2_AB8F8ECAAA6F__INCLUDED)