CoolToolBar classes 

COXCoolToolBar & COXCoolToolBarCmdUI

WHAT IS IT?

CoolToolBar is a class which allows the developer to implement any available Windows toolbars.

FEATURES

flat mode 

cool mode (can be used in CoolBars) 

in flat mode draws gripper and separators (Office'97 look) 

list mode (looks like Links toolbar in IE 3.0) 

set different image lists for default, disabled and hot mode (to get the effect like in IE 3.0) 

set text color for default and hot mode 

set of functions to set text to buttons in CoolToolBar (you can set MinMaxWidth of text in row and the number of text rows in buttons, you can automatically set text to buttons using string or menu resources)

change CoolToolBar style at run-time 

minor customization functionality using standard Customize dialog 

persistence - you can save and load state of CoolToolBar 

HOW TO USE

1.  add #include "OXCoolToolBar.h" to your "MainFrm.h" header file; 
2.  change CToolBar to COXCoolToolBar in the mainfrm.h; after creation of CoolToolBar: 
3.  use IniSizes(CSize& sizeImage) if you use non-standard size of images for buttons 
4.  CoolToolBar created with flat style set by default, if you don't want this feature call SetFlat(FALSE); 
5.  if you are going to use CoolToolBar within CoolBar then call SetCool(TRUE); 
6.  if you want you CoolToolBar to be customizable call SetBitmapIds(UINT* pIds, int nButtons) function to set an array of button Ids to use in Customize dialog andin save and load state functions (if you don't call this function your CoolToolBar is not customizable by default). It is up to you to create and delete (if needed) array of buttons ID; 
7.  if you want to set text to buttons then set max width of buttons and max number of text rows in a button; 
8.  if needed call functions to set images to show in default, disabled and hot mode:
	HIMAGELIST SetDefaultImageList(HIMAGELIST hImageList)
	HIMAGELIST SetDisabledImageList(HIMAGELIST hImageList) 
	HIMAGELIST SetHotImageList(HIMAGELIST hImageList) 
If you create your Image Lists in a resource file, it is recommended that you use to create Image Lists         COXCoolToolBar-inner function: 
	HIMAGELIST AddImageList(UINT nImageListID, int cx=16, int cGrow=0, COLORREF 	crMask=RGB(255,0,255));
In this case you shouldn't care about deleting used Image Lists, COXCoolToolBar destructor will do this job for you;
9.  if needed, call functions to set Text Color in default and/or hot mode:
	void SetDefaultTextColor(COLORREF crTextColor); 
	void SetHotTextColor(COLORREF crTextColor); 
10.  if needed set indent to CoolToolBar 11.call UpdateSizes() to correctly set sizes of buttons;

In order to use CoolToolBar,   steps 1,2 and 11 have to be taken; steps 4 to 10 can be taken in any order

Remarks: 

1.  although COXCoolToolBar heavily uses new commctrl.dll and most features available only if you use MFC>=4.2 you still can use customization functionality plus all functions   that are not based on SendMessage() functions; 
2.  there is one problem using CoolToolBar Customize dialog: if flat style is set then in customize dialog all buttons are drawn as transparent and button for separator is invisible;