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
DigitST.h
Package: cdigitst.zip [view]
Upload User: dhjcdma
Upload Date: 2007-01-02
Package Size: 102k
Code Size: 2k
Category:
Static control
Development Platform:
Visual C++
- #ifndef _DIGITST_H
- #define _DIGITST_H
- #if _MSC_VER >= 1000
- #pragma once
- #endif // _MSC_VER >= 1000
- // DigitST.h : header file
- //
- // Min number of digits we can display
- #define ST_MIN_PRECISION 1
- // Max number of digits we can display (it can be increased)
- #define ST_MAX_PRECISION 10
- // Space left around the bitmap for border
- #define BORDER_SPACE 3
- class CDigitST : public CStatic
- {
- public:
- CDigitST();
- virtual ~CDigitST();
- enum { ST_LEFT = 0x01,
- ST_TOP = 0x02,
- ST_RIGHT = 0x04,
- ST_BOTTOM = 0x08};
- public:
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CDigitST)
- //}}AFX_VIRTUAL
- public:
- BOOL SetStyle(UINT nBitmapId, int nPrecision);
- void SetValue(int nValue, BOOL bRepaint = TRUE);
- int GetValue();
- void SetPrecision(int nPrecision, BOOL bResize = TRUE);
- int GetPrecision();
- void SetResize(DWORD dwResize, BOOL bResize = TRUE);
- DWORD GetResize();
- void SetZeroPadding(BOOL bPad = FALSE, BOOL bRepaint = TRUE);
- BOOL GetZeroPadding();
- void Inc(BOOL bRepaint = TRUE);
- void Dec(BOOL bRepaint = TRUE);
- static const char* GetVersionC();
- static const short GetVersionI();
- protected:
- //{{AFX_MSG(CDigitST)
- afx_msg void OnPaint();
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- private:
- void Resize();
- void PrepareString(char* szDest);
- void DrawDigits(CDC* pDC);
- CBitmap m_bmDigit;
- int m_nWidth;
- int m_nHeight;
- int m_nPrecision;
- int m_nValue;
- BOOL m_bZeroPadding;
- DWORD m_dwResize;
- };
- /////////////////////////////////////////////////////////////////////////////
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
- #endif