ViewBox.h
上传用户:hkb425
上传日期:2007-06-16
资源大小:34191k
文件大小:1k
- // ViewBox.h: interface for the CViewBox class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_VIEWBOX_H__C88584EB_AB82_11D6_8155_5254AB37CDC9__INCLUDED_)
- #define AFX_VIEWBOX_H__C88584EB_AB82_11D6_8155_5254AB37CDC9__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- #include "scrollbar.h"
- class CViewBox
- {
- public:
- CViewBox();
- virtual ~CViewBox();
- void SetViewBox(RECT rect,char *filename);
- void SetViewBox(RECT rect,unsigned int texID);
- void SetText(char *filename);
- void RenderViewBox();
- private:
- void UpdateViewBox();
- void DrawBackground();
- int m_iLineHeight; //每行高
- int m_numLine; //总行数
- int m_iShowLine; //筐中容纳行数
- bool m_bText; //图片还是文字?
- bool m_bShowScroll;
- RECT m_rect;
- int m_iHead; //显示第一行的号码
- int m_iPos;
- char *m_string;
- CScrollBar m_cScrollBar;
- };
- #endif // !defined(AFX_VIEWBOX_H__C88584EB_AB82_11D6_8155_5254AB37CDC9__INCLUDED_)