MainFrm.h
上传用户:guangzhiyw
上传日期:2007-01-09
资源大小:495k
文件大小:4k
源码类别:

ICQ/即时通讯

开发平台:

Visual C++

  1. // MainFrm.h : interface of the CMainFrame class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_MAINFRM_H__EDC351A8_4F64_11D5_B12C_CA5F4F71E900__INCLUDED_)
  5. #define AFX_MAINFRM_H__EDC351A8_4F64_11D5_B12C_CA5F4F71E900__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. #include "trayicon.h"
  10. #include "GfxOutBarCtrl.h"
  11. #include "GfxPopupMenu.h"
  12. class CSendToAllDlg;
  13. class CMultiSendDlg;
  14. class CSearchDlg;
  15. class CModifyPIDlg;
  16. class CShowOnlineDlg;
  17. class CSendBroadcastDlg;
  18. class CShowBroadcastDlg;
  19. class CShowAddMsgDlg;
  20. class CAddFriendDlg;
  21. #define WM_MY_TRAY_NOTIFICATION  WM_USER+100
  22. class CMainFrame : public CFrameWnd
  23. {
  24. public:
  25. CMainFrame();
  26. protected: 
  27. DECLARE_DYNAMIC(CMainFrame)
  28. // Attributes
  29. public:
  30. // Operations
  31. public:
  32. // Overrides
  33. // ClassWizard generated virtual function overrides
  34. //{{AFX_VIRTUAL(CMainFrame)
  35. public:
  36. virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  37. virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo);
  38. virtual BOOL PreTranslateMessage(MSG* pMsg);
  39. protected:
  40. virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
  41. //}}AFX_VIRTUAL
  42. // Implementation
  43. public:
  44. CClientApp* GetApp(){return (CClientApp*)AfxGetApp();};
  45. virtual ~CMainFrame();
  46. #ifdef _DEBUG
  47. virtual void AssertValid() const;
  48. virtual void Dump(CDumpContext& dc) const;
  49. #endif
  50. protected:  // control bar embedded members
  51. CGfxPopupMenu menu1,menu2;
  52. public:
  53. CGfxOutBarCtrl  m_wndBar;
  54. CTrayIcon       m_TrayIcon;
  55. int nCurSelID;
  56. int nGroupFlag; //1是陌生人,2是黑名单,0或大于2的数是好友
  57. CSearchDlg *m_pSearch;
  58. CModifyPIDlg *m_pModifyPI;
  59. CMultiSendDlg *m_pMultiSend;
  60. CSendToAllDlg *m_pSendToAll;
  61. CShowOnlineDlg * m_pShowOnline;
  62. CSendBroadcastDlg * m_pSendBroad;
  63. CShowBroadcastDlg * m_pShowNotice;
  64. CShowAddMsgDlg * m_pShowOther;
  65. CAddFriendDlg * m_pAddFriendDlg;
  66. CArray<UserInfo*,UserInfo*>m_aTempInfo;
  67. BOOL m_bRecvTotal;
  68. int nCurSelIndex;
  69. // Generated message map functions
  70. protected:
  71. //{{AFX_MSG(CMainFrame)
  72. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  73. afx_msg void OnSetFocus(CWnd *pOldWnd);
  74. afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI);
  75. afx_msg void OnClose();
  76. afx_msg void OnTimer(UINT nIDEvent);
  77. afx_msg void OnSendMessage();
  78. afx_msg void OnUpdateSendMessage(CCmdUI* pCmdUI);
  79. afx_msg void OnSendEmail();
  80. afx_msg void OnUpdateSendEmail(CCmdUI* pCmdUI);
  81. afx_msg void OnFriendDetail();
  82. afx_msg void OnPersonHomepage();
  83. afx_msg void OnUpdatePersonHomepage(CCmdUI* pCmdUI);
  84. afx_msg void OnOffline();
  85. afx_msg void OnOnhide();
  86. afx_msg void OnOnline();
  87. afx_msg void OnSearch();
  88. afx_msg void OnPersoninfoSetup();
  89. afx_msg void OnMultisend();
  90. afx_msg void OnSendtoAll();
  91. afx_msg void OnMessageManage();
  92. afx_msg void OnShowOnline();
  93. afx_msg void OnSendBroadcast();
  94. afx_msg void OnAddFriend();
  95. //}}AFX_MSG
  96. afx_msg LRESULT OnTrayNotification(WPARAM wp,LPARAM lp);
  97. afx_msg LRESULT OnHotKey(WPARAM wParam,LPARAM lParam);
  98. afx_msg LRESULT OnOutbarNotify(WPARAM wParam, LPARAM lParam);
  99. afx_msg LRESULT ProcRecv(WPARAM wParam,LPARAM lParam);
  100. afx_msg LRESULT OnAddFriendRefresh(WPARAM wParam,LPARAM lParam);
  101. DECLARE_MESSAGE_MAP()
  102. };
  103. /////////////////////////////////////////////////////////////////////////////
  104. //{{AFX_INSERT_LOCATION}}
  105. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  106. #endif // !defined(AFX_MAINFRM_H__EDC351A8_4F64_11D5_B12C_CA5F4F71E900__INCLUDED_)