📄 skinprogress.cpp
字号:
/******************************************************************************/
/* NAME : SkinProgress.cpp */
/* PURPOSE : Place a bitmapped progress bar into the status bar */
/* CREATED_BY : Kochise (kochise@caramail.com) */
/* CREATION_DATE : $C_DATE=YYYY/MM/DD$ 22003/05/02 */
/* MODIFIED_BY : Kochise (kochise@caramail.com) */
/* MODIFICATION_DATE : $M_DATE=YYYY/MM/DD$ 2003/07/12 */
/* LANGUAGE : MFC Visual C++ 6 */
/* MPROC_TYPE : Microsoft Windows compatible computer */
/* */
/*
$Log: E:\Projects\NoeZooArc\SkinProgressTest.zoo\SkinProgressTest\SkinProgress.cpp.adiff $
*
* Rev 1.02 : July 12 2003 14:01:53 (Kochise)
* Base : CSkinProgress 1.32dev
* extracting files : no error
* parsing files : no error
* diff engine : no error
* modify.public.constructor:CSkinProgress
* touch.protected.function:CreateCommon
* modify.protected.function:ProgressInStatusBar
* modify.protected.function:ProgressInDialog
* modify.public.function:SetRange
* touch.public.function:SetPos
* modify.public.function:GetPos
* touch.public.function:SetStart
* modify.public.function:GetStart
* modify.public.function:Reset
* add.public.function:SetProgress
* add.public.function:GetProgress
* modify.public.function:RefreshPanes
* touch.protected.function:CompactText
* modify.protected.function:GetTimed
* modify.protected.function:UpdateProgress
* modify.protected.function:OnPaint
* compiling project files : no error
* packing files : no error
* http://www.codeproject.com/miscctrl/CSkinProgress.asp
*
* Rev 1.01 : July 06 2003 22:08:37 (Kochise)
* Base : CSkinProgress 1.28 Devel
* extracting files : no error
* parsing files : no error
* diff engine : no error
* modify.public.constructor:CSkinProgress
* add.public.constructor:CSkinProgress
* modify.public.function:SetBitmap
* modify.public.function:ConvBitmap
* modify.public.function:SetRange
* modify.public.function:SetPos
* modify.public.function:OffsetPos
* modify.public.function:StepIt
* modify.public.function:SetSize
* add.public.function:GetSize
* add.public.function:GetPos
* add.public.function:GetStep
* add.public.function:GetLower
* add.public.function:GetUpper
* add.public.function:SetStart
* add.public.function:GetStart
* add.public.function:Reset
* modify.public.function:SetText
* mutate.function:protected.ResizeTextPane->public.RefreshPanes
* modify.public.function:RefreshPanes
* mutate.function:public.Clear->protected.Clear
* add.protected.function:GetTargetRect
* mutate.protected.function:Create->CreateCommon
* modify.protected.function:CreateCommon
* add.protected.function:ProgressInStatusBar
* add.protected.function:ProgressInDialog
* modify.protected.function:CompactText
* add.protected.function:UpdateProgress
* modify.protected.function:OnPaint
* compiling project files : no error
* packing files : no error
* http://www.codeproject.com/miscctrl/CSkinProgress.asp
*
* Rev 1.00 : May 25 2003 13:25:12 (Kochise)
* First archived version and released onto CodeProject.
* Base : CSkinProgress 1.12 Devel
* add.public.constructor:CSkinProgress
* add.public.constructor:CSkinProgress
* add.public.function:SetRange
* add.public.function:SetText
* add.public.function:SetSize
* add.public.function:SetBitmap
* add.public.function:CopyBitmap
* add.public.function:ConvBitmap
* add.public.function:SetPos
* add.public.function:OffsetPos
* add.public.function:SetStep
* add.public.function:StepIt
* add.public.function:Clear
* add.public.destructor:~CSkinProgress
* add.protected.function:Create
* add.protected.function:GetStatusBar
* add.protected.function:ResizeTextPane
* add.protected.function:CompactText
* add.protected.function:GetTimed
* add.protected.function:OnEraseBkgnd
* add.protected.function:OnPaint
* add.protected.function:OnSizing
* add.protected.function:OnSize
* add.protected.function:OnTimer
* compiling project files : no error
* packing files : no error
* http://www.codeproject.com/useritems/CSkinProgress.asp
*
*/
/******************************************************************************/
// SkinProgress.cpp : implementation file
//
#include "stdafx.h"
#include "SkinProgress.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CSkinProgress
// g_Global : g_ = Global
// i_Input : i_ = Input
// no z...
// m_Member : m_ = Member
// o_Output : o_ = Output
// ... : use your imagination
// aArray : a = Array (array)
// bBool : b = Boolean (boolean, true/false)
// cConstant : c = Constant (constant, whatever...)
// dDefine : d = Define (simple define or defined value)
// nNumber : n = Number (char, long, int, whatever...)
// oObject : o = Object (C++ class)
// pPointer : p = Pointer (typicaly a 32 bits ulong address)
// sStruct : s = Struct (structure)
// uUnion : u = Union (join two or more values of the same size under a common name)
// poRemoteClass : po = Pointer on Object
// cdConstantDef : cd = Constant Define, typicaly a constant defined value
// usUnionStruct : us = Union of Structures
// ... : use your imagination
// o_psBitmap : CBitmap::GetBitmap((BITMAP*) o_psBitmap); // s = BITMAP, p = *, o_ means it's an output
// <Value>
// [Function]
// TYPICAL LIFE TIME
//
// CSkinProgress(...) -------> StepIt() ----------------------------> ~CSkinProgress() USER
// | | | SIDE
// ..|...........................|.......................................|.........................
// | | |
// '-> Create(...) | '-> Clear() OBJECT
// | | SIDE
// +-> GetStatusBar() |
// +-> SetRange(...) |
// +-> SetBitmap(...) '----------->
// '---------------------------------> RefreshPanes() --------,
// ,---------------------------------> | |
// | ,-> | |
// | | | |
// | | +-> GetStatusBar() |
// | | +-> GetTimed(...) |
// | | '-> CompactText(...) |
// ........|...............................|..........................|............................
// | | | WINDOWS
// OnSizing(...) -> OnSize(...) OnEraseBkgnd(...) '-> OnPaint() SIDE
#ifndef dCSP_RESOURCE_BITMAP
/*** anAQUA_BITMAP ************************************************************/
/* Purpose : The default embedded progress bar image, if resource bitmap not */
/* used instead. */
/* Unit : unsigned char */
/* Range : [0-255] - LIMITED selection */
/* List : None */
/* Example : None */
/******************************************************************************/
unsigned char anAQUA_BITMAP[5760] =
{ // B, G, R, A -> Set to 0xFF for CAlphaBlendBitmap
0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF,
0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF,
0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0xFF, 0xBD, 0xBD, 0xBD, 0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