// control.h : header file
//
//#include "foxbar.h"
struct DrawState
{
		HBITMAP hbmMono;
		HBITMAP hbmMonoOld;
		HBITMAP hbmOldGlyphs;
};


/*
struct AFX_TBBUTTON
{
	UINT nID;        // Command ID that this button sends
	UINT nStyle;    // TBBS_ styles
	int iImage;     // index into mondo bitmap of this button's picture
						// or size of this spacer
};
*/      
#define MAX_BUTTON_NUM 50   
#define USER_DEF_COMM_NUM  8 
/////////////////////////////////////////////////////////////////////////////
// CCONTROL window

class CCONTROL : public CTipToolBar
{
// Construction
public:
	CCONTROL();
    CString m_strUsrDefComm[USER_DEF_COMM_NUM];
// Attributes
public:
       
      int  m_nMain[MAX_BUTTON_NUM];
      int  m_nSource[MAX_BUTTON_NUM]; 
      int  m_nBrowse[MAX_BUTTON_NUM]; 
      int  m_nVar[MAX_BUTTON_NUM];
      int  m_nStack[MAX_BUTTON_NUM];
      int  m_nTrace[MAX_BUTTON_NUM];
      int  m_nCPU[MAX_BUTTON_NUM];
      int  m_nShell[MAX_BUTTON_NUM];  
      int  m_nMem[MAX_BUTTON_NUM];
      int  m_nBMem[MAX_BUTTON_NUM]; 
      int  m_nPeri[MAX_BUTTON_NUM]; 
      
      UINT m_nMainCount;
      UINT m_nSourceCount;
      UINT m_nBrowseCount;
      UINT m_nVarCount;
      UINT m_nStackCount;  
      UINT m_nTraceCount;
      UINT m_nCPUCount;
      UINT m_nShellCount;
      UINT m_nMemCount;
      UINT m_nBMemCount;            
      UINT m_nPeriCount  ;
      
	  BOOL m_bCanMove;
private: 
    CRect m_WinRect;
    CPoint m_LBDPoint;
public:
   BOOL SetPos(DWORD);
   BOOL SetButtons(int FAR*, int); 
   BOOL ReplaceButton(int ,int);
   BOOL RemoveButton(int);  
   BOOL InsertButton(int,int,int); 
   BOOL IsButtonExsit(int iImage);
// Overrides
public:

// Implementation
public:
	virtual ~CCONTROL();
    BOOL SetWinButtons(UINT);
	// Generated message map functions
protected:     
	void SetButtonInfo(int , UINT , UINT , int);
 	void _SetButtonStyle(int  nIndex,UINT nStyle); 
 	AFX_TBBUTTON* _GetButtonPtr(UINT nIndex);   
	void InvalidateButton(int nIndex);
	void GetItemRect(int nIndex, LPRECT lpRect); 
	void DrawFrame(CRect)  ;
	void CalcInsideRect(CRect& rect) ;
	void DoPaint(CDC* );  
	int HitTest(CPoint point); // in window relative coords
	//{{AFX_MSG(CCONTROL)
	afx_msg void OnPaint();
	afx_msg void OnDestroy();
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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