//-------------------------------------------------------------------------- // // Microsoft Visual C++ generated include file. // // Include file for BarIndicator.cpp // //-------------------------------------------------------------------------- // $Archive: /WirelessUSB/WUSB Kits/CY4632 LS KBM RDK/DocSrc/CD_Root/Software/Source Code/WirelessUSBSysTray/BarIndicator.h $ // $Modtime: 2/06/04 11:08a10/01/04 9:50a $ // $Revision: 34 $ //-------------------------------------------------------------------------- // // Copyright 2003-2004, Cypress Semiconductor Corporation. // // This software is owned by Cypress Semiconductor Corporation (Cypress) // and is protected by and subject to worldwide patent protection (United // States and foreign), United States copyright laws and international // treaty provisions. Cypress hereby grants to licensee a personal, // non-exclusive, non-transferable license to copy, use, modify, create // derivative works of, and compile the Cypress Source Code and derivative // works for the sole purpose of creating custom software in support of // licensee product to be used only in conjunction with a Cypress integrated // circuit as specified in the applicable agreement. Any reproduction, // modification, translation, compilation, or representation of this // software except as specified above is prohibited without the express // written permission of Cypress. // // Disclaimer: CYPRESS MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, // WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. // Cypress reserves the right to make changes without further notice to the // materials described herein. Cypress does not assume any liability arising // out of the application or use of any product or circuit described herein. // Cypress does not authorize its products for use as critical components in // life-support systems where a malfunction or failure may reasonably be // expected to result in significant injury to the user. The inclusion of // Cypress’ product in a life-support systems application implies that the // manufacturer assumes all risk of such use and in doing so indemnifies // Cypress against all charges. // // Use may be limited by and subject to the applicable Cypress software // license agreement. // //-------------------------------------------------------------------------- #pragma once #include "MemDC.h" // define some standard colors that can be used // for the battery and signal strengthquality indicators const COLORREF m_rgbStandardColors[] = { RGB(0, 0, 0), // 0 - Black RGB(255, 255, 255), // 1 - White RGB(128, 0, 0), // 2 - Dark Red RGB(0, 128, 0), // 3 - Dark Green RGB(128, 128, 0), // 4 - Dark Yellow RGB(0, 0, 128), // 5 - Dark Blue RGB(128, 0, 128), // 6 - Dark Magenta RGB(0, 128, 128), // 7 - Dark Cyan RGB(192, 192, 192), // 8 - Light Grey RGB(128, 128, 128), // 9 - Dark Grey RGB(255, 0, 0), // 10 - Red RGB(0, 255, 0), // 11 - Green RGB(255, 255, 0), // 12 - Yellow RGB(0, 0, 255), // 13 - Blue RGB(255, 0, 255), // 14 - Magenta RGB(0, 255, 255), // 15 - Cyan }; // define caption types #define BAR_CAPTION_NONE 0 // no captions #define BAR_CAPTION_PERCENT 1 // display percent #define BAR_CAPTION_VALUE 2 // display bar value // CBarIndicator class CBarIndicator : public CProgressCtrl { DECLARE_DYNAMIC(CBarIndicator) public: CBarIndicator(); virtual ~CBarIndicator(); void SetColor(COLORREF beginningColor = m_rgbStandardColors[13], COLORREF endingColor = m_rgbStandardColors[10], COLORREF backgroundColor = m_rgbStandardColors[1], COLORREF textColor = m_rgbStandardColors[0]) { m_BeginningColor = beginningColor; m_EndingColor = endingColor; m_BackGroundColor = backgroundColor; m_TextColor = textColor; } void SetBarControl(bool bHoriz = true, bool bReverse = false, unsigned long captionType = BAR_CAPTION_NONE) { m_bHoriz = bHoriz; m_bReverse = bReverse; m_ulCaptionType = captionType; } protected: void PaintBar(CPaintDC *pDC, int nRight, int nBottom, int nWidth); COLORREF m_BeginningColor; COLORREF m_EndingColor; COLORREF m_BackGroundColor; COLORREF m_TextColor; bool m_bHoriz; bool m_bReverse; unsigned long m_ulCaptionType; DECLARE_MESSAGE_MAP() public: afx_msg void OnPaint(); };