📄 ooextoolbar.hpp
字号:
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
// @end =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// @class: (FUNCTIONAL)
// This class manage an extended command ui.
// @base public | CCmdUI
// @end =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
class CCoolCmdUI : public CCmdUI // class private to this file !
{
public: // re-implementations only
virtual void Enable( BOOL bOn );
virtual void SetCheck( int nCheck );
};
// Start =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// Class declaration.
// ------------------------------------------------------------------------
// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// @class: (FUNCTIONAL)
// This class manage an extended toolbar based on bitmap.
// @base public | COOExToolbar
// @end =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
class COOBmpToolBar : public COOExToolBar
{
// --------------------------------------------------------------------
// @group Macro definition.
// --------------------------------------------------------------------
DECLARE_DYNAMIC( COOBmpToolBar )
// --------------------------------------------------------------------
// @group Structure definition.
// --------------------------------------------------------------------
private:
public:
class CExBitmap
{
public:
UINT m_nResourceId;
COLORREF m_clrTransparent;
};
protected:
// --------------------------------------------------------------------
// @group Data definition.
// --------------------------------------------------------------------
private:
// @Access The bitmap image.
CExBitmap m_256Image[ NB_POSSIBLE_MODE ]; // @CMember The 256 color bitmap id list.
CExBitmap m_16Image[ NB_POSSIBLE_MODE ]; // @CMember The 16 color bitmap id list.
public:
protected:
// --------------------------------------------------------------------
// @group Implementation Method definition.
// --------------------------------------------------------------------
private:
// @Access Usefull private method.
// @CMember Generic method to build an image list.
void BuildImageList( CImageList& _rImageList, const CExBitmap& _rBitmap );
public:
// @Access Class Initialization method.
COOBmpToolBar( void ); // @CMember Constructor.
~COOBmpToolBar( void ); // @CMember Destructor.<nl>
protected:
// --------------------------------------------------------------------
// @group Functionnal Method definition.
// --------------------------------------------------------------------
private:
public:
// @Access Bitmap adding method.
// @CMember To set the small disable bitmap.
void SetBitmap( UINT _nBmpId, ImageMode_ _ImageMode, COLORREF _clrBk, bool _b256 = true );
// @Access Image list initialization method.
virtual void InitImageList( void ); // @CMember Set the correct image list in the control.
protected:
// --------------------------------------------------------------------
// @group MFC Definition.
// --------------------------------------------------------------------
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL( COOBmpToolBar )
public:
protected:
//}}AFX_VIRTUAL
// --------------------------------------------------------------------
// @group Generated message map functions.
// --------------------------------------------------------------------
protected:
//{{AFX_MSG( COOBmpToolBar )
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
// @end =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
// Start =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// Class declaration.
// ------------------------------------------------------------------------
// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// @class: (FUNCTIONAL)
// This class manage an extended toolbar based on bitmap.
// @base public | COOExToolbar
// @end =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
class COOIconToolBar : public COOExToolBar
{
// --------------------------------------------------------------------
// @group Macro definition.
// --------------------------------------------------------------------
DECLARE_DYNAMIC( COOIconToolBar )
// --------------------------------------------------------------------
// @group Structure definition.
// --------------------------------------------------------------------
private:
public:
protected:
// --------------------------------------------------------------------
// @group Data definition.
// --------------------------------------------------------------------
private:
public:
protected:
// --------------------------------------------------------------------
// @group Implementation Method definition.
// --------------------------------------------------------------------
private:
// @Access Private usefull method.
HICON ConvertIconToGrayScale( HICON _hIcon, CSize _sizeImage ); // @CMember To convert the given icon into a gray scale icon.
public:
// @Access Class Initialization method.
COOIconToolBar( void ); // @CMember Constructor.
~COOIconToolBar( void ); // @CMember Destructor.<nl>
protected:
// --------------------------------------------------------------------
// @group Functionnal Method definition.
// --------------------------------------------------------------------
private:
public:
// @Access Icon adding method.
// @CMember To add icon.
void SetIcon( UINT _nStandardIcon, UINT _nDisableIcon = 0, UINT _nHotIcon = 0 );
protected:
// --------------------------------------------------------------------
// @group MFC Definition.
// --------------------------------------------------------------------
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL( COOIconToolBar )
public:
protected:
//}}AFX_VIRTUAL
// --------------------------------------------------------------------
// @group Generated message map functions.
// --------------------------------------------------------------------
protected:
//{{AFX_MSG( COOIconToolBar )
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
// @end =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#endif // #define _OOExToolBar_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -