MainFrm.h
上传用户:deligs
上传日期:2007-01-08
资源大小:43k
文件大小:2k
- // MainFrm.h : interface of the CMainFrame class
- //
- /////////////////////////////////////////////////////////////////////////////
- #if !defined(AFX_MAINFRM_H__DB316DDB_7F39_11D4_974C_0080C8F60D90__INCLUDED_)
- #define AFX_MAINFRM_H__DB316DDB_7F39_11D4_974C_0080C8F60D90__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- #include "ChildView.h"
- #include "SystemTray.h"
- #include "MyMonitor.h"
- #include "MyUdpThread.h"
- #include "MyUdpSocket.h"
- #include "LogIt.h"
- class CMainFrame : public CFrameWnd
- {
- private:
- int BeginMyUdpThread(CMyUdpInfo* pMyUdpInfo);
- public:
- CMainFrame();
- void MyInfoBoxEx(CString strInfo, BOOL* pbMsgShowing);
- void MyInfoBox(CString strInfo, BOOL* pbMsgShowing);
- BOOL ShutdownValid();
- protected: // create from serialization only
- DECLARE_DYNCREATE(CMainFrame)
- // Attributes
- public:
- CSystemTray m_TrayIcon;
- CLogIt m_LogFile;
- CString m_csModuleName;
- BOOL m_bNotify;
- CMyUdpInfo m_MyUdpArray[UDP_THREAD_NUMBER];
- CWinThread* m_pMyUdpThread;
- DWORD m_dwSetThreadsState;
- // Operations
- private:
- CString FormatString(DWORD dwState, CString strAddress);
- void OnEvtConnected(WPARAM wParam, LPARAM lParam);
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CMainFrame)
- public:
- virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
- virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo);
- //}}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;
- CChildView m_wndView;
- // Generated message map functions
- protected:
- LRESULT TreatSocketThreadMessage(WPARAM wParam, LPARAM lParam);
- //{{AFX_MSG(CMainFrame)
- afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
- afx_msg void OnAppAbout();
- afx_msg void OnPopupSuspend();
- afx_msg void OnPopupResume();
- afx_msg void OnPopupConfig();
- afx_msg void OnTimer(UINT nIDEvent);
- afx_msg void OnClose();
- afx_msg void OnEndSession(BOOL bEnding);
- afx_msg void OnPopupShutdowncancel();
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- };
- /////////////////////////////////////////////////////////////////////////////
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
- #endif // !defined(AFX_MAINFRM_H__DB316DDB_7F39_11D4_974C_0080C8F60D90__INCLUDED_)