Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #include <memory>
- using std::shared_ptr;
- using std::make_shared;
- class CListCtrlEx : public CListCtrl
- {
- DECLARE_DYNAMIC(CListCtrlEx)
- public:
- CListCtrlEx();
- virtual ~CListCtrlEx();
- void GetCurrentFont(LOGFONT& lf) const;
- void SetupFont(int nSize, const CString& strName);
- protected:
- DECLARE_MESSAGE_MAP()
- private:
- virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
- virtual void PreSubclassWindow();
- virtual BOOL PreTranslateMessage(MSG* pMsg);
- void UpdateFocusCell(int nCol);
- void MoveFocusCell(bool right);
- void DrawInitialCell(const CRect& rcBounds, CDC* const pDC);
- void HighLightItem(BOOL bRight, const CRect& rcBounds, const CRect& rcRightCell, CDC* const pDC);
- BOOL EnsureColumnVisible(int nCol, bool bPartialOK);
- BOOL GetCellRect(int nRow, int nCol, CRect& rect);
- afx_msg void OnCustomdraw(NMHDR *pNMHDR, LRESULT *pResult);
- afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
- afx_msg void MeasureItem (LPMEASUREITEMSTRUCT lpMeasureItemStruct);
- afx_msg LRESULT OnSetFont(WPARAM wParam, LPARAM lParam);
- afx_msg LRESULT OnFocusChanged(WPARAM wParam, LPARAM lParam);
- private:
- int m_nFocusCell;
- int m_nItem;
- BOOL m_bFocus;
- shared_ptr<CFont> m_pFont;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement