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
WndValueImage.cpp
Package: SwordOnline.rar [view]
Upload User: dzyhzl
Upload Date: 2019-04-29
Package Size: 56270k
Code Size: 2k
Category:
Game Server Simulator
Development Platform:
C/C++
- /*****************************************************************************************
- // 界面窗口体系结构--值控制换帧的显示图形的窗口
- // Copyright : Kingsoft 2002
- // Author : Wooy(Wu yue)
- // CreateTime: 2002-12-10
- *****************************************************************************************/
- #include "KWin32.h"
- #include "KIniFile.h"
- #include "WndValueImage.h"
- #include "../../../Represent/iRepresent/iRepresentShell.h"
- extern iRepresentShell* g_pRepresentShell;
- //--------------------------------------------------------------------------
- // 功能:构造函数
- //--------------------------------------------------------------------------
- KWndValueImage::KWndValueImage()
- {
- m_nCurrentValue = 0;
- m_nFullValue = 1;
- }
- void KWndValueImage::Clone(KWndValueImage* pCopy)
- {
- if (pCopy)
- {
- KWndImage::Clone(pCopy);
- pCopy->m_nFrameCount = m_nFrameCount;
- pCopy->m_nCurrentValue = m_nCurrentValue;
- pCopy->m_nFullValue = m_nFullValue;
- }
- }
- //--------------------------------------------------------------------------
- // 功能:初始化窗口
- //--------------------------------------------------------------------------
- int KWndValueImage::Init(KIniFile* pIniFile, const char* pSection)
- {
- if (KWndImage::Init(pIniFile, pSection))
- {
- KImageParam Param;
- if(g_pRepresentShell &&
- g_pRepresentShell->GetImageParam(m_Image.szImage, &Param, m_Image.nType))
- {
- m_Image.nNumFrames = Param.nNumFrames;
- m_Image.nInterval = Param.nInterval;
- SetValue(m_nCurrentValue, m_nFullValue);
- }
- return true;
- }
- return false;
- }
- void KWndValueImage::SetValue(int nCurrentValue, int nFullValue)
- {
- m_nFullValue = nFullValue ? nFullValue : 1;
- m_nCurrentValue = nCurrentValue;
- if (m_Image.nNumFrames > 1)
- {
- m_Image.nFrame = nCurrentValue * (m_Image.nNumFrames - 1)/ m_nFullValue;
- }
- else
- m_Image.nFrame = 0;
- }