/************************************************************************/
/*  Copyright (C), 2016-2020, [IT], 保留所有权利;
/*  模 块 名：;
/*  描    述：;
/*
/*  版    本：[V];
/*  作    者：[IT];
/*  日    期：[11/4/2016];
/*
/*
/*  注    意：;
/*
/*  修改记录：[IT];
/*  修改日期：;
/*  修改版本：;
/*  修改内容：;
/************************************************************************/

#ifndef __COMBO_TREE_CTRL__
#define __COMBO_TREE_CTRL__


#pragma once

// 自定义函数;
#define TREECTRL_CHECK_STATE_CHANGE		(WM_USER + 100)
#define WMU_CLOSE_CONTROL				(WM_USER + 101)

// 前置声明;
class CTreeComboBox;
class CComboTreeCtrl : public CTreeCtrl
{
public:
	CComboTreeCtrl();
	virtual ~CComboTreeCtrl();
public:
	void Display(IN CRect rc);

public:
	virtual BOOL PreTranslateMessage(MSG* pMsg);

public:
	void Init(CTreeComboBox* pCombo)
	{
		m_pCombo = pCombo;
	};

protected:
	afx_msg void OnKillfocus(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnClick(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnKeydown(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg LRESULT OnTreeCtrlCheckStateChange(WPARAM wParam, LPARAM lParam);
	DECLARE_MESSAGE_MAP()
private:
	CTreeComboBox* m_pCombo;
	HTREEITEM FindItem(IN const CString& strName, IN HTREEITEM hRoot);
};

#endif // __COMBO_TREE_CTRL__
