summaryrefslogtreecommitdiff
path: root/win/Transbar.h
blob: 1e375329ad9004d474d378ddec60cab9afb7748e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
// TransToolBar.h : header file
//

#ifndef _TRANSBAR_H_
#define _TRANSBAR_H_

#define MAX_BUTTONS			32
// difference between width of button(48) and width of buttonimage(30)
#define LARGEBUTTON_DX		18


typedef struct _BUTTONDATA {
    int iBitmap;
    int idCommand;
    BYTE fsState;
    BYTE fsStyle;				// TBSTYLE_DROPDOWN, TBSTYLE_BUTTON
    LPTSTR lpszButtonText;		// string to display in button
	LPTSTR lpszTooltip;
} BUTTONDATA, FAR* LPBUTTONDATA;

typedef struct _TOOLBARDATA {
	DWORD dwStyle;				// TBSTYLE_FLAT, TBSTYLE_LIST
	int idControl;				// control id
	int idbDefault;				// bitmapresource 
	int idbHot;					// bitmapresource when the mouse moves over the button
	int iButtons;				// number of buttens in the toolbar
	int iButtonCX;				// width of the buttons
	int iButtonCY;				// heigth of the buttons
	HIMAGELIST himl;
	BUTTONDATA ButtonData[MAX_BUTTONS];	// structures describing the buttons
} TOOLBARDATA, FAR* LPTOOLBARDATA;

/////////////////////////////////////////////////////////////////////////////
// CTransToolBar window

class CTransToolBar : public CToolBar
{
// Construction
public:
	void SetButtonStyle(int nIndex, UINT nStyle);
	void _GetButton(int nIndex, TBBUTTON* pButton) const;
	void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler);
	void _SetButton(int nIndex, TBBUTTON* pButton);
	BOOL Create(HWND hwndOwner);
	TOOLBARDATA m_ToolbarData;
	CTransToolBar();

// Attributes
public:

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CTransToolBar)
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CTransToolBar();

	// Generated message map functions
protected:
	//{{AFX_MSG(CTransToolBar)
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

	void OnUpdatePieceGroup(CCmdUI* pCmdUI);

	friend class CToolBar;
};

#endif // _TRANSBAR_H_

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