2025-11-27 16:46:48 +09:00

70 lines
4.0 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\froman Times New Roman;}{\f3\froman Times New Roman;}}
{\colortbl\red0\green0\blue0;\red0\green0\blue255;}
\deflang1033\pard\plain\f2\fs36\cf1\b CoolToolBar classes
\par \plain\f2\fs20
\par \plain\f2\fs28\b COXCoolToolBar & COXCoolToolBarCmdUI
\par \plain\f2\fs20
\par \plain\f2\fs20\b WHAT IS IT?
\par \plain\f2\fs20
\par CoolToolBar is a class which allows the developer to implement any available Windows toolbars.
\par
\par \plain\f2\fs20\b FEATURES
\par \plain\f2\fs20
\par
\par
\par flat mode
\par
\par cool mode (can be used in CoolBars)
\par
\par in flat mode draws gripper and separators (Office'97 look)
\par
\par list mode (looks like Links toolbar in IE 3.0)
\par
\par set different image lists for default, disabled and hot mode (to get the effect like in IE 3.0)
\par
\par set text color for default and hot mode
\par
\par 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)
\par
\par change CoolToolBar style at run-time
\par
\par minor customization functionality using standard Customize dialog
\par
\par persistence - you can save and load state of CoolToolBar
\par
\par
\par
\par
\par \plain\f2\fs20\b HOW TO USE
\par \plain\f2\fs20
\par
\par
\par 1. add #include "OXCoolToolBar.h" to your "MainFrm.h" header file;
\par 2. change CToolBar to COXCoolToolBar in the mainfrm.h; after creation of CoolToolBar:
\par 3. use IniSizes(CSize& sizeImage) if you use non-standard size of images for buttons
\par 4. CoolToolBar created with flat style set by default, if you don't want this feature call SetFlat(FALSE);
\par 5. if you are going to use CoolToolBar within CoolBar then call SetCool(TRUE);
\par 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;
\par 7. if you want to set text to buttons then set max width of buttons and max number of text rows in a button;
\par 8. if needed call functions to set images to show in default, disabled and hot mode:
\par \tab HIMAGELIST SetDefaultImageList(HIMAGELIST hImageList)
\par \tab HIMAGELIST SetDisabledImageList(HIMAGELIST hImageList)
\par \tab HIMAGELIST SetHotImageList(HIMAGELIST hImageList)
\par If you create your Image Lists in a resource file, it is recommended that you use to create Image Lists \~\~\~\~\~\~\~ COXCoolToolBar-inner function:
\par \tab HIMAGELIST AddImageList(UINT nImageListID, int cx=16, int cGrow=0, COLORREF \tab crMask=RGB(255,0,255));
\par In this case you shouldn't care about deleting used Image Lists, COXCoolToolBar destructor will do this job for you;
\par 9. if needed, call functions to set Text Color in default and/or hot mode:
\par \tab void SetDefaultTextColor(COLORREF crTextColor);
\par \tab void SetHotTextColor(COLORREF crTextColor);
\par 10. if needed set indent to CoolToolBar 11.call UpdateSizes() to correctly set sizes of buttons;
\par
\par
\par
\par \plain\f2\fs20\b In order to use CoolToolBar, \~ steps 1,2 and 11 have to be taken; steps 4 to 10 can be taken in any order
\par \plain\f2\fs20
\par \plain\f2\fs20\b Remarks:
\par \plain\f2\fs20
\par 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;
\par 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;
\par }