MainFrm.h
资源名称:GGBT.rar [点击查看]
上传用户:lds876
上传日期:2013-05-25
资源大小:567k
文件大小:4k
源码类别:
P2P编程
开发平台:
Visual C++
- // MainFrm.h : interface of the CMainFrame class
- //
- /////////////////////////////////////////////////////////////////////////////
- #if !defined(AFX_MAINFRM_H__EFE2DAC2_1293_4006_8AE3_4C63F7BC9F5A__INCLUDED_)
- #define AFX_MAINFRM_H__EFE2DAC2_1293_4006_8AE3_4C63F7BC9F5A__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- #include "download.h"
- #include "MonitorBar.h"
- #include "CategoryBar.h"
- #include "SystemTray.h"
- #include "SetupRegister.h"
- #include "DragWnd.h"
- #include "ToolBarEx.h"
- #include "MonitorSpeedWnd.h"
- #include "MenuSpawn.h"
- #define HOTKEY_ID 1020
- class CMainFrame : public CFrameWnd
- {
- protected: // create from serialization only
- CMainFrame();
- DECLARE_DYNCREATE(CMainFrame)
- // Attributes
- public:
- CMonitorBar m_MonitorBar;
- CCategoryBar m_CategoryBar;
- CSetupRegister m_setupRegister;
- // Operations
- public:
- void SwitchShowMain();
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CMainFrame)
- public:
- virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
- virtual BOOL DestroyWindow();
- virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
- virtual void ActivateFrame(int nCmdShow = -1);
- virtual BOOL PreTranslateMessage(MSG* pMsg);
- protected:
- virtual LRESULT DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam);
- //}}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;
- CToolBarEx m_wndToolBar;
- CReBar m_wndReBar; //Rebar条
- // Generated message map functions
- protected:
- //{{AFX_MSG(CMainFrame)
- afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
- afx_msg void OnDropFiles(HDROP hDropInfo);
- afx_msg void OnMenuitemShowcategory();
- afx_msg void OnMenuitemShowDetail();
- afx_msg void OnUpdateMenuitemShowDetail(CCmdUI* pCmdUI);
- afx_msg void OnUpdateMenuitemShowcategory(CCmdUI* pCmdUI);
- afx_msg void OnMenuitemSetup();
- afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
- afx_msg void OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized);
- afx_msg void OnMenuitemShowMain();
- afx_msg void OnUpdateMenuitemShowMain(CCmdUI* pCmdUI);
- afx_msg void OnMenuitemShowDragWnd();
- afx_msg void OnUpdateMenuitemShowDragWnd(CCmdUI* pCmdUI);
- afx_msg void OnMenuitemDragWndStandardSize();
- afx_msg void OnUpdateMenuitemShowFont(CCmdUI* pCmdUI);
- afx_msg void OnMenuitemShowFont();
- afx_msg void OnDestroy();
- afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct);
- afx_msg void OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct);
- afx_msg void OnInitMenu(CMenu* pMenu);
- afx_msg void OnInitMenuPopup(CMenu* pPopupMenu, UINT nIndex, BOOL bSysMenu);
- afx_msg void OnMenuitemCustomToolbar();
- afx_msg void OnSysColorChange();
- //}}AFX_MSG
- afx_msg UINT OnNcHitTest(CPoint point);
- afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
- afx_msg void OnHotkey(WPARAM wParam,LPARAM lParam);
- afx_msg void OnNcRButtonUp( UINT nHitTest, CPoint point );
- afx_msg void OnRButtonUp( UINT nFlags, CPoint point );
- afx_msg void OnDragWndNotify(long lParam, long wParam);
- afx_msg void OnDragWndTransparent(UINT uID);
- void OnDragWndTransparentUI(CCmdUI* pCmdUI);
- DECLARE_MESSAGE_MAP()
- void OnSysCommand(UINT nID, LPARAM lParam);
- void OnRestore();
- private:
- BOOL VerifyBarState(LPCTSTR lpszProfileName);
- void OnMenuCreate();
- CWnd* GetNextDlgTabItem(bool bNext);
- CImageList m_ctlImage;
- CImageList m_ctlImageDisabled;
- CMonitorSpeedWnd m_MonitorSpeedWnd;
- CDragWnd m_DragWnd;
- CSystemTray m_SystemTray;
- bool m_bNoHotkey;
- static CToolBarInfo mainToolBar[];
- CMenuSpawn m_menuspawn;
- CMenuSpawn m_menuspawnPopup;
- };
- /////////////////////////////////////////////////////////////////////////////
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
- #endif // !defined(AFX_MAINFRM_H__EFE2DAC2_1293_4006_8AE3_4C63F7BC9F5A__INCLUDED_)