ChatControls.h
上传用户:maryhy001
上传日期:2007-05-02
资源大小:2317k
文件大小:2k
源码类别:

网格计算

开发平台:

Visual C++

  1. #ifndef _CHATCONTROLS_H
  2. #define _CHATCONTROLS_H
  3. #include "resource.h"
  4. #include "GfxOutBarCtrl.h"
  5. //CChatRichEditCtrl class.
  6. class CChatRichEditCtrl : public CRichEditCtrl
  7. {
  8. DECLARE_DYNCREATE(CChatRichEditCtrl)
  9. public:
  10. CChatRichEditCtrl();
  11. ~CChatRichEditCtrl();
  12. BOOL Setlogfile(LPCSTR lpszLogfile);
  13. void AppendText(LPCSTR lpszToOrFrm, LPCSTR lpszUserName, LPCSTR lpszContents);
  14. BOOL SaveToFile(LPCSTR lpszFilename, const BOOL bOverwrite);
  15. static DWORD CALLBACK StreamOutCallback(DWORD dwCookie, 
  16.  LPBYTE pbBuff, 
  17.  LONG cb, LONG *pcb);
  18. // Implementation
  19. protected:
  20. // Generated message map functions
  21. //{{AFX_MSG(CChatRichEditCtrl)
  22. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  23. //}}AFX_MSG
  24. DECLARE_MESSAGE_MAP()
  25. protected:
  26. void WriteLog(LPCSTR lpszloginfo, UINT uncount);
  27. protected:
  28. CFont m_guifont;
  29. HANDLE m_hlogfile;
  30. };
  31. //CChatInputEdit class.
  32. #define UWM_CHARINPUTOVER WM_APP + 355
  33. class CChatInputEdit : public CEdit
  34. {
  35. DECLARE_DYNCREATE(CChatInputEdit)
  36. public:
  37. CChatInputEdit();
  38. ~CChatInputEdit();
  39. public:
  40. virtual BOOL PreTranslateMessage(MSG* pMsg);
  41. // Implementation
  42. protected:
  43. // Generated message map functions
  44. //{{AFX_MSG(CChatInputEdit)
  45. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  46. //}}AFX_MSG
  47. DECLARE_MESSAGE_MAP()
  48. private:
  49. CFont m_guifont;
  50. };
  51. //CChatGfxOutBarCtrl class.
  52. class CChatGfxOutBarCtrl : public CGfxOutBarCtrl
  53. {
  54. public:
  55. CChatGfxOutBarCtrl();
  56. ~CChatGfxOutBarCtrl();
  57. BOOL ExistsAgent(const int nFolderIndex, const int nAgentId, int &nItemIndex);
  58. BOOL GetImageIndex(WORD wHeadportraitIndex, int &nNormalImageIndex, int &nDisableImageIndex);
  59.     // Generated message map functions
  60. protected:
  61.     //{{AFX_MSG(CChatPanelBar)
  62.     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  63. //}}AFX_MSG
  64.     DECLARE_MESSAGE_MAP()
  65. protected:
  66. CImageList m_imaLarge;
  67. CImageList m_imaSmall;
  68. int m_nImageManCount,
  69. m_nImageWomanCount;
  70. };
  71. #endif //!_CHATCONTROLS_H