📄 mainfrm.h
字号:
// MainFrm.h : interface of the CMainFrame class
//作者:孟庆远
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_MAINFRM_H__72E264A9_43C8_11D9_95EE_00E04CB27B6F__INCLUDED_)
#define AFX_MAINFRM_H__72E264A9_43C8_11D9_95EE_00E04CB27B6F__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
//HTMLElemet
#pragma warning(disable : 4049)
#pragma warning(disable : 4192)
#pragma warning(disable : 4146)
#import "shdocvw.dll"
#include <atlbase.h>
#include <comdef.h>
#include <MSHTML.H>
#include "DropWin.h"
//#include "DownAddJob.h"
#include "DownProSheet.h"
#include "afxtempl.h"
#include "DownParamSheet.h"
#include "DlgBlockUrl.h"
#include "TrayNotifyIcon.h"
#include "TestDownView.h"
#include "InternetView.h"
#include "ContainerView.h"
#include "HttpDownLoad.h"
#include "MyToolBar.h"
#define WM_LEODOWNINFO WM_USER+109
#define WM_TRAYNOTIFY WM_USER+118
/*#define WM_TESTLIST WM_USER+119
#define WM_WRITEREG2 WM_USER+121
#define WM_WRITEREGMAIN WM_USER+122
#define WM_WRITELISTDATA WM_USER+125
#define WM_WRITEREGLISTCTRL WM_USER+127
#define WM_CAULUETIMER WM_USER+128*/
struct THREADNUMBER{
int nPID;
};
class CMainFrame : public CFrameWnd
{
protected: // create from serialization only
CMainFrame();
DECLARE_DYNCREATE(CMainFrame)
// Attributes
public:
CToolBar m_ToolBarNew;
CMyToolBar m_ToolBarButton;
CSplitterWnd m_SplitterWnd;
CDropWin *m_DropWin; //Create Drop Window new point
CFont m_FontText;
CFont m_EditFontText;
CFont m_ButtonFontText;
CComboBox *m_pComDownFind;
CEdit *m_pEditDownFind;
CToolTipCtrl m_ToolTipBar; //ToolTip of m_ToolBarButton
BOOL m_bIsDropWin; //Drop Window Toolbar Check
BOOL m_bRename; //Rename file of audio/mpeg
CString m_Url; //Url
CString m_Comment; //Comment;
CString m_SavePath; //DownLoad Save Path
CString m_FileName;
CString m_InstallPath; //the Programe Inatall Path
CLRegistry m_DownRegistry; //LeoStudio\BLeo2004\DownLoad
FILEDIALOG_INFO m_stFileDlgInfo; //Send to startDownThread struct
int m_nAgainNumber;
int m_nNumber; //Initial Down? Number 0-
CMapPtrToPtr m_HttpDLPtr;
THREADNUMBER m_stThreadNumber[500];
int m_nPID;
//Block
CLRegistry m_lRegistry;
CLRegistry m_UrlRegistry;
CLRegistry m_IERegistry;
CImageList nImageList;
LPSTR nszNPopupWin; //拦截窗口
LPSTR nszNPicture; //屏蔽图片
LPSTR nszNAnimated; //屏蔽动画
LPSTR nszNFlash; //屏蔽Flash
LPSTR nszNBlockUrl; //屏蔽网站
CTrayNotifyIcon m_TrayIcon;
HICON m_hIcon;
CString m_strToolTip; //ToolTip
BOOL m_bIsReadTip;
CArray <BTOOLTEXT,BTOOLTEXT&> m_ToolTipArray;
CString m_strResonpontHeader;
BOOL m_bIsOpenNewIE;
BOOL m_bIsMainWindows;
// Operations
public:
// CInternetView* GetInternetView();
CTestDownView* GetTestDownView();
CListViewInfo* GetListViewInfo();
CContainerView* GetContainerView();
void WriteListInfo(LPCTSTR lpszText);
void SetBToolTipText(int nThreadNum,CString strText,CString strExtent);
int IElement(IHTMLDocument2Ptr sp_Doc);
int ShellWindowIE(LPTSTR szCom);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMainFrame)
public:
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
virtual BOOL PreTranslateMessage(MSG* pMsg);
protected:
virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CMainFrame();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected: // control bar embedded members
CStatusBar m_wndStatusBar;
CToolBar m_wndToolBar;
// Generated message map functions
protected:
//{{AFX_MSG(CMainFrame)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnIeUnreg();
afx_msg void OnIeTool();
afx_msg void OnIeHostroydel();
afx_msg void OnDownTool();
afx_msg void OnDownDropwin();
afx_msg void OnViewLeoToolbar();
afx_msg void OnDropwinAddJob();
afx_msg void OnUpdateDownDropwin(CCmdUI* pCmdUI);
afx_msg void OnDropwinTool();
afx_msg void OnClose();
afx_msg void OnExit();
afx_msg void OnBlockAnimated();
afx_msg void OnUpdateBlockAnimated(CCmdUI* pCmdUI);
afx_msg void OnBlockFlash();
afx_msg void OnUpdateBlockFlash(CCmdUI* pCmdUI);
afx_msg void OnBlockPicture();
afx_msg void OnUpdateBlockPicture(CCmdUI* pCmdUI);
afx_msg void OnBlockPopupwin();
afx_msg void OnUpdateBlockPopupwin(CCmdUI* pCmdUI);
afx_msg void OnBlockUrl();
afx_msg void OnUpdateBlockUrl(CCmdUI* pCmdUI);
afx_msg void OnWwwUrl();
afx_msg void OnMenuExit();
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnHelpNote();
afx_msg void OnUpdateViewLeoToolbar(CCmdUI* pCmdUI);
afx_msg void OnViewLeoToolbarfind();
afx_msg void OnUpdateViewLeoToolbarfind(CCmdUI* pCmdUI);
afx_msg void OnDownButton();
afx_msg void OnAppDropWindow();
afx_msg void OnUpdateAppDropWindow(CCmdUI* pCmdUI);
afx_msg void OnAppMainWindows();
afx_msg void OnUpdateAppMainWindows(CCmdUI* pCmdUI);
afx_msg void OnDropwinMainwindows();
afx_msg void OnUpdateDropwinMainwindows(CCmdUI* pCmdUI);
afx_msg void OnMainToolAutorun();
afx_msg void OnUpdateMainToolAutorun(CCmdUI* pCmdUI);
//}}AFX_MSG
afx_msg void OnTestList(WPARAM wParam,LPARAM lParam);
afx_msg void OnDropUrl(WPARAM wParam,LPARAM lParam);
afx_msg void OnDownAddJobPage(WPARAM wParam,LPARAM lParam);
afx_msg void OnDownParamPage(WPARAM wParam,LPARAM lParam);
afx_msg void OnDownStartBreak(WPARAM wParam,LPARAM lParam);
afx_msg void OnDownStopBreak(WPARAM wParam,LPARAM lParam);
afx_msg void OnDownDelA(WPARAM wParam,LPARAM lParam);
afx_msg void OnDlgUrlAdd(WPARAM wParam,LPARAM lParam);
afx_msg void OnDlgUrlDel(WPARAM wParam,LPARAM lParam);
afx_msg void OnDlgUrlDelAll(WPARAM wParam,LPARAM lParam);
afx_msg LRESULT OnTrayNotification(WPARAM wParam,LPARAM lParam);
afx_msg void OnHideWindow(WPARAM wParam,LPARAM lParam);
afx_msg void OnShowWindowL(WPARAM wParam,LPARAM lParam);
afx_msg void OnWriteReg2(WPARAM wParam,LPARAM lParam);
afx_msg void OnWriteRegMain(WPARAM wParam,LPARAM lParam);
afx_msg void OnWriteListData(WPARAM wParam,LPARAM lParam);
afx_msg void OnWriteRegListCtrl(WPARAM wParam,LPARAM lParam);
afx_msg void OnCaulueTimer(WPARAM wParam,LPARAM lParam);
afx_msg void OnDecreaseThNum(WPARAM wParam,LPARAM lParam);
afx_msg UINT OnBToolExtentcx(WPARAM wParam,LPARAM lParam);
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MAINFRM_H__72E264A9_43C8_11D9_95EE_00E04CB27B6F__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -