15,979
社区成员
发帖
与我相关
我的任务
分享
#pragma once
class CListCtrl_Column_Picker : public CListCtrl
{
struct ColumnState
{
ColumnState()
:m_Visible(false)
,m_OrgWidth(0)
,m_OrgPosition(-1)
{}
bool m_Visible;
int m_OrgWidth; // Width it had before being hidden
int m_OrgPosition; // Position it had before being hidden
};
CSimpleArray<ColumnState> m_ColumnStates;//error here,提示这里错误如题
int GetColumnStateCount();
void InsertColumnState(int nCol, bool bVisible, int nOrgWidth = 0);
void DeleteColumnState(int nCol);
ColumnState& GetColumnState(int nCol);
DECLARE_MESSAGE_MAP()
virtual afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
virtual afx_msg LRESULT OnDeleteColumn(WPARAM wParam, LPARAM lParam);
virtual afx_msg LRESULT OnInsertColumn(WPARAM wParam, LPARAM lParam);
virtual afx_msg LRESULT OnSetColumnWidth(WPARAM wParam, LPARAM lParam);
virtual afx_msg BOOL OnHeaderBeginResize(UINT id, NMHDR* pNmhdr, LRESULT* pResult);
virtual afx_msg BOOL OnHeaderEndDrag(UINT id, NMHDR* pNmhdr, LRESULT* pResult);
virtual afx_msg void OnContextMenu(CWnd*, CPoint point);
virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
virtual void PreSubclassWindow();
public:
bool IsColumnVisible(int nCol);
int GetFirstVisibleColumn();
BOOL ShowColumn(int nCol, bool bShow);
BOOL SetColumnWidthAuto(int nCol = -1, bool includeHeader = false);
};