00001
00002
00003
00004
00005
00006 #if !defined(AFX_TOOLBAREX_H__58B8C9AE_B53F_41DE_913E_E539488B949D__INCLUDED_)
00007 #define AFX_TOOLBAREX_H__58B8C9AE_B53F_41DE_913E_E539488B949D__INCLUDED_
00008
00009 #if _MSC_VER > 1000
00010 #pragma once
00011 #endif
00012
00013 #include "list.h"
00014 #include "plugins.h"
00015
00016 struct fsTButtonInfo
00017 {
00018 int idCommand;
00019 BYTE bStyle;
00020 CString strToolTip;
00021 int iName;
00022
00023 fsTButtonInfo (int cmd, BYTE style, LPCSTR pszTip, int iString) : idCommand (cmd), bStyle (style),
00024 strToolTip (pszTip), iName (iString) {};
00025 fsTButtonInfo () {};
00026 };
00027
00028 class CToolBarEx : public CToolBar
00029 {
00030
00031 public:
00032 CToolBarEx();
00033
00034 public:
00035
00036 public:
00037
00038
00039
00040
00041 public:
00042 CImageList* get_Images();
00043 void AutoSize () const;
00044
00045 BOOL InsertGroup (wgTButtonInfo* pButtons, CBitmap* pBitmap, CBitmap *pBmpDisabled, int cButtons);
00046
00047 BOOL ShowGroup (int iGrp, int iWhere);
00048
00049 void HideGroup (int iGrp);
00050
00051 BOOL OnTBGetButtonInfo (NMHDR* nm);
00052 BOOL OnNotify(LPNMHDR nm);
00053
00054 void UpdateGroupToolTips (int iGrp, LPCSTR* ppszTips, UINT uSize);
00055
00056 BOOL Create(CWnd* pParent);
00057 virtual ~CToolBarEx();
00058
00059 protected:
00060 int m_cNames;
00061
00062 struct fsTBInfo : fsTButtonInfo
00063 {
00064 int iImage;
00065 };
00066
00067 fsTBInfo* FindButton (UINT nID);
00068
00069 void UpdateSize();
00070
00071 CToolBarCtrl* m_bar;
00072
00073 fs::list <fs::list <fsTBInfo> > m_vGroups;
00074
00075 CImageList m_images, m_dimages;
00076
00077
00078 afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
00079
00080
00081 DECLARE_MESSAGE_MAP()
00082 };
00083
00084
00085
00086 #endif