#pragma once #include "afxwin.h" class CLogEdit : public CEdit { public: CLogEdit(); ~CLogEdit(); public: void SetMaxLineCount(int line); void AppendText(const char* pszText); BOOL IsScrollBarAtBottom(); private: int m_nMaxLines; int m_nTrimLines; BOOL m_bAutoScroll; // ÊÇ·ñ×Ô¶¯¹ö¶¯ DECLARE_MESSAGE_MAP() afx_msg void OnContextMenu(CWnd* pWnd, CPoint point); afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar); public: afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt); };