📄 cbperbar.h
字号:
/////////////
// CBPerbar.h : v0010
// Written by : Li Haijun
// Compiler : Microsoft Visual C++ 4.0 & DirectX
// Library : No .Lib
// Copyright (C) : 1997 WayAhead Corporation
// v0010 : Mar.21.1997
/////////////
// to declear the class to show and update the percent process bar
// eg. building process, general blood...
///////////////////////////////////////////////////////////////////////////
#ifndef __CBPERCENTBAR_H__
#define __CBPERCENTBAR_H__
#include "stdafx.h"
#include "Assert.h"
class CPercentBar
{
//data member
public:
// the surface that this process percent bar is load on
CDDSurface m_BitmapSurface;
CDDSurface m_ProcessBarSurface;
// Attributes
public:
char m_nFileNameId; // name of this DIB file name
// data member
int m_dwX;
int m_dwY;
int m_nFrameWidth; // the width of the frame around
RECT m_rBar; // the rectangle of this percent bar
int m_nCurrentPercent; // the current percent of this percent bar to show
int m_nColor; // the color of this percent bar to fill
//member funciton
public:
CPercentBar(); //constructor
~CPercentBar(); //destructor
public:
//to preload the bitmap background of this percent bar
BOOL PreLoad( int FilenameId, int x, int y, int FrameWidth, int Color=184 );
// to release the surface of this percent bar
void Release(void);
// to set the new position of this percent bar
void SetPosition(int x, int y) ;
// to update the rectangle area of the percent bar to stay ( from back buffer to the front buffer )
void Update(void);
// to blit this percent bar to the just area of back buffer
void Blit(int NewPercent=-10);
//blit this percent bar to back buffer and then update it
void Show(void);
// to update this percent bar with a new input percent
void UpdateData(int NewPercent );
};
////////////////////
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -