Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
AnalogMeter.h
Package: vcPerfDemo.rar [view]
Upload User: haifei
Upload Date: 2022-07-20
Package Size: 77k
Code Size: 3k
Category:
WinSock-NDIS
Development Platform:
Visual C++
- #if !defined(AFX_ANALOGMETER_H__7B6C2C14_9681_11D2_9136_0020AF9FE21E__INCLUDED_)
- #define AFX_ANALOGMETER_H__7B6C2C14_9681_11D2_9136_0020AF9FE21E__INCLUDED_
- #if _MSC_VER >= 1000
- #pragma once
- #endif // _MSC_VER >= 1000
- // AnalogMeter.h : header file
- //
- /////////////////////////////////////////////////////////////////////////////
- // CAnalogMeter command target
- class CAnalogMeter : public CCmdTarget
- {
- DECLARE_DYNCREATE(CAnalogMeter)
- CAnalogMeter() ;
- virtual ~CAnalogMeter();
- // Attributes
- public:
- COLORREF m_colorGrid;
- COLORREF m_colorNeedle;
- COLORREF m_colorValue;
- double m_dMinScale;
- double m_dMaxScale;
- // Operations
- public:
- double m_dPercent; // 当前指针的百分比
- void ShowMeter(CDC *pDC, CRect rectBorder);
- void UpdateNeedle(CDC *pDC, double dPos);
- void SetRange (double dMin, double dMax);
- void SetRangeDecimals(int nRangeDecimals);
- void SetValueDecimals(int nValueDecimals);
- void SetTitle(CString strTitle);
- double GetMaxRange() {return m_dMaxScale; } ;
- double GetMinRange() {return m_dMinScale; } ;
- int GetRangeDecimals() {return m_nRangeDecimals; } ;
- int GetValueDecimals() {return m_nValueDecimals; } ;
- CString GetTitle() {return m_strTitle; } ;
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CAnalogMeter)
- //}}AFX_VIRTUAL
- // Implementation
- protected:
- void DrawGrid (); // 画标尺
- void DrawNeedle(); // 画指针
- void ShowMeterImage(CDC *pDC);//显示整幅图
- bool m_boolUseBitmaps ;
- bool m_boolForceRedraw;
- int m_nRangeDecimals; // 范围值的小数点位数
- int m_nValueDecimals; // 当前值的小数点位数
- int m_nRectWidth;
- int m_nRectHeight;
- int m_nCXPix; // 指针中心(x,y)坐标
- int m_nCYPix; //
- int m_nRadiusPix; // 半径
- int m_nLeftLimitXPix;
- int m_nLeftLimitYPix;
- int m_nRightLimitXPix;
- int m_nRightLimitYPix;
- int m_nHalfBaseWidth;
- int m_nTextBaseSpacing;
- double m_dPI; // 180度的弧度值
- double m_dLimitAngleRad;
- double m_dRadiansPerValue; // m_dMaxScale-m_dMinScale范围内每个刻度的弧度值
- double m_dNeedlePos; // 指针的当前位置
- CString m_strTitle;
- CDC m_dcGrid;
- CBitmap m_bitmapGrid;
- CBitmap *m_pbitmapOldGrid;
- CDC m_dcNeedle ;
- CBitmap m_bitmapNeedle;
- CBitmap *m_pbitmapOldNeedle;
- CRect m_rectDraw;
- CRect m_rectOwner;
- CRect m_rectMinValue;
- CRect m_rectMaxValue;
- CRect m_rectValue;
- CFont m_fontValue;
- CBrush m_brushErase;
- CPen m_penErase;
- // Generated message map functions
- //{{AFX_MSG(CAnalogMeter)
- // NOTE - the ClassWizard will add and remove member functions here.
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- };
- /////////////////////////////////////////////////////////////////////////////
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
- #endif // !defined(AFX_ANALOGMETER_H__7B6C2C14_9681_11D2_9136_0020AF9FE21E__INCLUDED_)