XPStyleButtonST.h
资源名称:MiniCA2.rar [点击查看]
上传用户:dengkfang
上传日期:2008-12-30
资源大小:5233k
文件大小:2k
源码类别:
CA认证
开发平台:
Visual C++
- //
- // Class: CXPStyleButtonST
- //
- // Compiler: Visual C++
- // Tested on: Visual C++ 6.0
- //
- // Version: See GetVersionC() or GetVersionI()
- //
- // Created: 21/January/2002
- // Updated: 24/January/2003
- //
- // Author: Davide Calabro' davide_calabro@yahoo.com
- // http://www.softechsoftware.it
- //
- // Disclaimer
- // ----------
- // THIS SOFTWARE AND THE ACCOMPANYING FILES ARE DISTRIBUTED "AS IS" AND WITHOUT
- // ANY WARRANTIES WHETHER EXPRESSED OR IMPLIED. NO REPONSIBILITIES FOR POSSIBLE
- // DAMAGES OR EVEN FUNCTIONALITY CAN BE TAKEN. THE USER MUST ASSUME THE ENTIRE
- // RISK OF USING THIS SOFTWARE.
- //
- // Terms of use
- // ------------
- // THIS SOFTWARE IS FREE FOR PERSONAL USE OR FREEWARE APPLICATIONS.
- // IF YOU USE THIS SOFTWARE IN COMMERCIAL OR SHAREWARE APPLICATIONS YOU
- // ARE GENTLY ASKED TO DONATE 5$ (FIVE U.S. DOLLARS) TO THE AUTHOR:
- //
- // Davide Calabro'
- // P.O. Box 65
- // 21019 Somma Lombardo (VA)
- // Italy
- //
- #ifndef _XPSTYLEBTNST_H
- #define _XPSTYLEBTNST_H
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- #include "BtnST.h"
- #include "ThemeHelperST.h"
- class CXPStyleButtonST : public CButtonST
- {
- public:
- CXPStyleButtonST();
- virtual ~CXPStyleButtonST();
- DECLARE_DYNCREATE(CXPStyleButtonST)
- void SetThemeHelper(CThemeHelperST* pTheme);
- DWORD DrawAsToolbar(BOOL bDrawAsToolbar, BOOL bRepaint = TRUE);
- static short GetVersionI() {return 12;}
- static LPCTSTR GetVersionC() {return (LPCTSTR)_T("1.2");}
- static void SetAllThemeHelper(CWnd * pWnd, CThemeHelperST* pTheme)
- {
- CWnd * pChild = pWnd->GetWindow( GW_CHILD );
- while ( pChild != NULL )
- {
- if ( pChild->IsKindOf( RUNTIME_CLASS(CXPStyleButtonST)))
- ((CXPStyleButtonST *) pChild)->SetThemeHelper( pTheme );
- pChild = pChild->GetWindow( GW_HWNDNEXT );
- }
- }
- protected:
- virtual DWORD OnDrawBackground(CDC* pDC, CRect* pRect);
- virtual DWORD OnDrawBorder(CDC* pDC, CRect* pRect);
- private:
- CThemeHelperST* m_pTheme;
- BOOL m_bDrawAsToolbar; // Use flat toolbar-style ?
- };
- #endif