⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 prjtreec.h

📁 一个完整的编辑器的代码(很值得参考
💻 H
字号:

#ifndef __PRJTREEC_H__INCLUDED__
#define __PRJTREEC_H__INCLUDED__

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000

#include "apptreec.h"
#include "theadctl.h"
#include "project.h"

#define TVHT_ONITEMICON1 0x1000

#define PRJTREEC_HEADER 0x0001
#define PRJTREEC_TABBEDCOLS 0x0002
#define PRJTREEC_SHOWDESC 0x0004
#define PRJTREEC_SHOWICON 0x0004

/////////////////////////////////////////////////////////////////////////////
// CProjectTreeCtrl window

#pragma warning ( disable : 4512 )
class CProjectTreeCtrl : public CAppTreeCtrl
  {
    // Construction
public :
    CProjectTreeCtrl ();

    // Attributes
public :
    bool m_bWasSelected;
    CImageList m_objStatusImages;
    HTREEITEM m_hPointedItem;
    bool m_bDblClk;
    CTreeHeaderCtrl m_ctlHeader;
    DWORD m_dwLayout;

    // Overrides
    // ClassWizard generated virtual function overrides
    //{{AFX_VIRTUAL(CProjectTreeCtrl)
    //}}AFX_VIRTUAL
    BOOL Create (DWORD dwStyle, CRect rect, CWnd * pParentWnd, UINT nID);
    virtual void Paint (void);

    // Implementation
public :
    virtual ~CProjectTreeCtrl ();
    HTREEITEM InsertFile (LPCTSTR lpszItem, int nImage, int nSelectedImage, LPARAM lParam, HTREEITEM hParent);
    HTREEITEM InsertGroup (LPCTSTR lpszItem, int nImage, int nSelectedImage, LPARAM lParam, HTREEITEM hParent);
    DWORD GetLayout ();
    void SetLayout (DWORD dwLayout);
    void PopulateItem (CProjectItem *pParent, HTREEITEM hParent);
    void Populate ();
    void PopulateEmpty ();
    void MakeColumns ();
    void PopulateName ();
    BOOL ExpandItem (HTREEITEM hItem, UINT nCode);

    // Generated message map functions
protected :
    //{{AFX_MSG(CProjectTreeCtrl)
    afx_msg void OnSelectionChanged (NMHDR * pNMHDR, LRESULT * pResult);
    afx_msg void OnBeginLabelEdit (NMHDR * pNMHDR, LRESULT * pResult);
    afx_msg void OnEndLabelEdit (NMHDR * pNMHDR, LRESULT * pResult);
    afx_msg void OnItemExpanded (NMHDR * pNMHDR, LRESULT * pResult);
    afx_msg int OnCreate (LPCREATESTRUCT lpCreateStruct);
    afx_msg void OnDestroy ();
    afx_msg void OnLButtonDblClk (UINT nFlags, CPoint point);
    afx_msg void OnPaint ();
    afx_msg void OnLButtonDown (UINT nFlags, CPoint point);
    afx_msg void OnLButtonUp (UINT nFlags, CPoint point);
    afx_msg void OnRButtonDown (UINT nFlags, CPoint point);
    afx_msg void OnRButtonUp (UINT nFlags, CPoint point);
    afx_msg void OnSize (UINT nType, int cx, int cy);
    afx_msg LONG OnAppendMenu (WPARAM wParam, LPARAM lParam);
    afx_msg LONG OnProcessMenu (WPARAM wParam, LPARAM lParam);
    afx_msg LONG OnAppendProps (WPARAM wParam, LPARAM lParam);
    afx_msg void OnProperties ();
    afx_msg void OnOpen();
    afx_msg void OnUpdateOpen(CCmdUI* pCmdUI);
    afx_msg void OnNewFile();
    afx_msg void OnUpdateNewFile(CCmdUI* pCmdUI);
    afx_msg void OnNewGroup();
    afx_msg void OnUpdateNewGroup(CCmdUI* pCmdUI);
    afx_msg void OnAddFile();
    afx_msg void OnUpdateAddFile(CCmdUI* pCmdUI);
    afx_msg void OnRemoveItem();
    afx_msg void OnUpdateRemoveItem(CCmdUI* pCmdUI);
    afx_msg void OnItemProperties();
    afx_msg void OnUpdateItemProperties(CCmdUI* pCmdUI);
    afx_msg void OnRenameItem();
    afx_msg void OnRefresh();
    //}}AFX_MSG
    // afx_msg LONG OnHitTest (WPARAM wParam, LPARAM lParam);
    // afx_msg void OnTimer (UINT nIDEvent);
    DECLARE_MESSAGE_MAP ()
  };
#pragma warning ( default : 4512 )

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.

#endif // __PRJTREEC_H__INCLUDED__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -