Cool Controls
Copyright © The Code Project 1997 - 1998, All Rights Reserved

Just as a reminder, we assume that a common control can be called "cool" if it can take normal or hot state. By definition, a window is in a hot state when the mouse cursor is over it or it has focus. Otherwise a window is in normal state. Naturally, in order to distinguish between a window in different states some graphical effects should be applied. E.g. the drawing of window borders in different states might be different. 

COXCoolCtrl class is the basic class that is used to create cool controls. This is a template class and it can be easily used in order to create "cool" versions of common controls. Actually our implementation of classes for cool common controls doesn't have any public functions, so it's strongly recommended to refer to COXCoolCtrl reference for the functionality available for all cool controls (e.g. all cool controls support tooltips). 

When we were talking about implementation of "cool" versions of cool controls we mentioned that it doesn't require too much work to be done because almost everything is covered by COXCoolCtrl. Actually, for the following common controls "cool" state will be supported automatically if you use corresponding MFC class as template argument.
 
Common Control	MFC class	UTB class	
			
Edit control		CEdit		COXCoolCtrl<CEdit>	
Rich edit control		CRichEditCtr	COXCoolCtrl<CRichEditCtrl> 	
Tree view		CTreeCtr	COXCoolCtrl<CTreeCtrl> 	
List view		CListCtrl		COXCoolCtrl<CListCtrl> 	
List box			CListBox	COXCoolCtrl<CListBox> 	
Progress bar		CProgressCtrl	COXCoolCtrl<CProgressCtrl> 	
Hot key control		CHotKeyCtrl	COXCoolCtrl<CHotKeyCtrl> 	
Date-time picker		CDateTimeCtrl	COXCoolCtrl<CDateTimeCtrl> 	
Month calendar		CMonthCalCtrl	COXCoolCtrl<CMonthCalCtrl> 	
IP Address control	CIPAddressCtrl	COXCoolCtrl<CIPAddressCtrl> 	

For the other common controls, where additional drawing routines were required, we had to come up with new classes. Below you will find the list of all such controls and the corresponding Ultimate Toolbox classes. 

Common Control	MFC class	UTB class 	

Push button 			
Check button		CButton		COXCoolButton 	
Radio button controls			
Spin button		CSpinButtonCtrl	COXCoolSpinButtonCtrl 	
Combo box		CComboBox	COXCoolComboBox 	
Slider			CSliderCtrl	COXCoolSliderCtrl 	
Scroll bar		CScrollBar	COXCoolScrollBar 	

We would like to emphasize again that these classes do not have any public functions of their own.  These implementations do not add any public functions to the standard implementation.  So the only change you need to worry about is in the declarations. 

All above mentioned classes can be used without any restrictions in place of the standard ones. Take look at the CoolControls sample that demonstrates the use of all cool controls classes. This sample can be found in .\Samples\gui\CoolControls