59 lines
1.6 KiB
C++
59 lines
1.6 KiB
C++
#ifndef W_GROUP_BOX_H
|
|
#define W_GROUP_BOX_H
|
|
|
|
#include "adui.h"
|
|
#include "acui.h"
|
|
|
|
class TUTIL_IMPEXP WGroupBox:public CDialog
|
|
{
|
|
protected:
|
|
bool m_bFold;//是否折叠
|
|
bool m_bActive;//是否激活
|
|
CSize m_initSize;//初始大小
|
|
public:
|
|
WGroupBox():m_bFold(false),m_bActive(false){}
|
|
virtual ~WGroupBox(){}
|
|
|
|
BOOL Create(UINT nIDTemplate,CWnd*pParentWnd=NULL);
|
|
void Fold();
|
|
void UnFold();
|
|
bool IsFold()const{return m_bFold;}//ok
|
|
|
|
bool operator>(const WGroupBox&)const{return false;}
|
|
bool operator<(const WGroupBox&)const{return false;}
|
|
public:
|
|
virtual BOOL PreTranslateMessage(MSG* pMsg);
|
|
DECLARE_MESSAGE_MAP()
|
|
afx_msg void OnNcPaint();
|
|
afx_msg BOOL OnNcActivate(BOOL);
|
|
afx_msg void OnNcLButtonDown(UINT nFlags,CPoint point);
|
|
afx_msg void OnNcLButtonDblClk(UINT nHitTest,CPoint point);
|
|
#if ADS<17
|
|
afx_msg UINT OnNcHitTest(CPoint point);
|
|
#else
|
|
afx_msg LRESULT OnNcHitTest(CPoint point);
|
|
#endif/*ADS<17*/
|
|
};
|
|
class TUTIL_IMPEXP WGroupBoxes:public CWnd
|
|
{
|
|
public:
|
|
PDList<WGroupBox> m_allGroup;
|
|
public:
|
|
BOOL Create(CWnd*pParent);
|
|
int GetHeight();
|
|
void RecalcLayout();
|
|
void AddGroup(WGroupBox* pGroupBox,UINT idTemplate);
|
|
void Clear();
|
|
void InsertGroup(int index,WGroupBox* pGroupBox,UINT idTemplate);
|
|
WGroupBox* FindGroup(const TCHAR* sName);
|
|
WGroupBox* GetGroup(int index){return m_allGroup.GetAt(index);}//ok
|
|
long GetGroupNum()const{return m_allGroup.GetLength();}//ok
|
|
public:
|
|
DECLARE_MESSAGE_MAP()
|
|
afx_msg LONG_PTR OnChildSize(UINT_PTR, LONG_PTR );
|
|
afx_msg void OnSize(UINT nFlag,int cx,int cy);
|
|
afx_msg void OnVScroll(UINT nSBCode,UINT nPos,CScrollBar* pScrollBar);
|
|
};
|
|
|
|
|
|
#endif |