home *** CD-ROM | disk | FTP | other *** search
- // -------------------------------------------------------------------------
- // Copyright @ 1997 TCK Software, Incorporated
- // All Rights Reserved
- // -------------------------------------------------------------------------
- #ifndef __VHexStatic_H__
- #define __VHexStatic_H__
-
- #include "VCtl.h"
-
- // -------------------------------------------------------------------------
- // A special static control for displaying binary info
- // -------------------------------------------------------------------------
- class VHexStatic : public VCtl
- {
- protected:
- int m_nLineHeight; // Height of 1 line (3 total)
- BOOL m_bHexOn; // Show hex chars
- CString m_hex1;
- CString m_hex2;
-
- char HexHi(char c); // Gets High Hex char
- char HexLo(char c); // Gets Low Hex char
-
- public:
- VHexStatic(); // Constructor
- VHexStatic(VRow *pRow, int nId, LPCSTR szText, int x, int y, int cx, int cy);
- VHexStatic(VHexStatic &x) { *this = x; } // Copy Constructor
- VHexStatic& operator =(VHexStatic &x); // Assignment Operator
-
-
- // SetHexText should be used to set the controls text
- void SetHexText(LPCSTR szBuf, int nLength);
-
- // --------- Get Member Functions --------------
- BOOL HexOn() { return m_bHexOn; }
- int LineHeight() { return m_nLineHeight; }
-
- // --------- Set Member Functions --------------
- void Init(VRow *pRow, int nId, LPCSTR szText, int x, int y, int cx, int cy);
- void HexOn(BOOL bFlag) { m_bHexOn = bFlag; }
- void LineHeight(int nHeight) { m_nLineHeight = nHeight; }
-
- // --------- Implementation Functions --------------
- virtual void OnDraw(CDC *pDC, LPRECT pRect, BOOL bGridMode);
- };
-
- #endif
-