-
大小: 1.01MB文件類(lèi)型: .rar金幣: 1下載: 0 次發(fā)布日期: 2023-09-11
- 語(yǔ)言: 其他
- 標(biāo)簽: PSCAD??3機(jī)??9節(jié)點(diǎn)??
資源簡(jiǎn)介
PSCAD3機(jī)9節(jié)點(diǎn)模型 用于PSCAD經(jīng)典仿真
代碼片段和文件信息
//?BmpProgCtrl.cpp?:?implementation?file
//
#include?“stdafx.h“
#include?“l(fā)istdemo.h“
#include?“BmpProgCtrl.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CBmpProgCtrl
CBmpProgCtrl::CBmpProgCtrl()
{
m_nLower?=?0;
m_nUpper?=?100;
m_nStep?=?10;
m_nPos?=?0;
pDCBack?=?new?CDC;
pDCFore?=?new?CDC;
bmpBack.LoadBitmap(IDB_BACK);
bmpFore.LoadBitmap(IDB_FORE);
}
CBmpProgCtrl::~CBmpProgCtrl()
{
delete?pDCBack;
delete?pDCFore;
}
BEGIN_MESSAGE_MAP(CBmpProgCtrl?CStatic)
//{{AFX_MSG_MAP(CBmpProgCtrl)
ON_WM_PAINT()
ON_WM_TIMER()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?CBmpProgCtrl?message?handlers
void?CBmpProgCtrl::SetRange(int?nLower?int?nUpper)
{
if(nUpper?>?nLower)
{
m_nLower?=?nLower;
m_nUpper?=?nUpper;
}
else
{
m_nLower?=?nUpper;
m_nUpper?=?nLower;
}
}
int?CBmpProgCtrl::SetPos(int?nPos)
{
if(m_nLower?<=?nPos?&&?m_nUpper?>=?nPos)
{
m_nPos?=?nPos;
return?1;
}
return?0;
}
int?CBmpProgCtrl::OffsetPos(int?nPos)
{
CRect?tempRect?=?m_rect;
tempRect.left?=?m_length*m_rect.Width();
m_nPos?+=?nPos;
if(m_nPos>m_nUpper)
{
m_nPos?=?m_nUpper;
InvalidateRect(&tempRect);
return?0;
}
InvalidateRect(&tempRect);
return?1;
}
int?CBmpProgCtrl::SetStep(int?nStep)
{
if(nStep>0)
{
m_nStep?=?nStep;
return?1;
}
return?0;
}
int?CBmpProgCtrl::StepIt()
{
CRect?tempRect?=?m_rect;
tempRect.left?=?m_length*m_rect.Width();
m_nPos?+=?m_nStep;
if(m_nPos>m_nUpper)
{
m_nPos?=?m_nUpper;
InvalidateRect(&tempRect);
return?0;
}
InvalidateRect(&tempRect);
return?1;
}
void?CBmpProgCtrl::OnPaint()?
{
m_length?=?(float)m_nPos/(m_nUpper-m_nLower);
CPaintDC?dc(this);
GetClientRect(&m_rect);
pDCBack->CreateCompatibleDC(&dc);
pDCFore->CreateCompatibleDC(&dc);
bmpBack.GetBitmap(&bmback);
bmpFore.GetBitmap(&bmfore);
pDCBack->Selectobject(bmpBack);
dc.StretchBlt(00m_rect.Width()m_rect.Height()pDCBack00bmback.bmWidthbmback.bmHeightSRCCOPY);
(CBitmap*)pDCFore->Selectobject(bmpFore);
dc.StretchBlt(00m_rect.Width()*m_lengthm_rect.Height()pDCFore00bmfore.bmWidth*m_lengthbmfore.bmHeightSRCCOPY);
pDCBack->DeleteDC();
pDCFore->DeleteDC();
}
int?CBmpProgCtrl::GetPos()
{
return?m_nPos;
}
void?CBmpProgCtrl::GetRange(int?&lower?int?&upper)
{
lower?=?m_nLower;
upper?=?m_nUpper;
}
?屬性????????????大小?????日期????時(shí)間???名稱(chēng)
-----------?---------??----------?-----??----
?????文件???????2634??2007-09-09?20:32??v3\BmpProgCtrl.cpp
?????文件???????1561??2007-09-09?20:32??v3\BmpProgCtrl.h
?????文件???????7984??2007-09-05?16:06??v3\Client.cpp
?????文件???????2159??2007-09-05?16:06??v3\Client.h
?????文件??????????0??2007-09-11?15:21??v3\Debug\.~xiajie~
?????文件??????20833??2007-09-09?20:32??v3\Debug\BmpProgCtrl.obj
?????文件??????32534??2007-09-05?17:50??v3\Debug\Client.obj
?????文件??????75837??2007-09-05?16:01??v3\Debug\CSVLineParser.obj
?????文件??????63220??2007-09-05?17:50??v3\Debug\DownLoad.obj
?????文件?????311384??2007-09-11?22:57??v3\Debug\ListDemo.exe
?????文件?????695992??2007-09-11?22:57??v3\Debug\ListDemo.ilk
?????文件??????38380??2007-09-09?21:12??v3\Debug\ListDemo.obj
?????文件????5497884??2007-09-05?16:01??v3\Debug\ListDemo.pch
?????文件?????934912??2007-09-11?22:57??v3\Debug\ListDemo.pdb
?????文件??????37200??2007-09-11?22:57??v3\Debug\ListDemo.res
?????文件?????112099??2007-09-11?15:44??v3\Debug\ListDemoDlg.obj
?????文件??????48339??2007-09-05?16:01??v3\Debug\ListItem.obj
?????文件?????111611??2007-09-08?22:22??v3\Debug\ListReport.obj
?????文件??????76367??2007-09-05?17:50??v3\Debug\Mutl.obj
?????文件?????101868??2007-09-05?17:50??v3\Debug\Public.obj
?????文件??????35387??2007-09-05?17:50??v3\Debug\SocketFtp.obj
?????文件??????54252??2007-09-05?17:50??v3\Debug\SocketHttp.obj
?????文件?????105557??2007-09-05?16:01??v3\Debug\StdAfx.obj
?????文件?????394240??2007-12-18?22:39??v3\Debug\vc60.idb
?????文件?????503808??2007-09-11?15:44??v3\Debug\vc60.pdb
?????文件??????18615??2007-09-05?16:09??v3\DownLoad.cpp
?????文件???????6046??2007-09-05?16:09??v3\DownLoad.h
?????文件??????56044??2007-12-18?22:39??v3\ListDemo.aps
?????文件???????2504??2007-12-18?22:39??v3\ListDemo.clw
?????文件???????2392??2007-09-08?14:43??v3\ListDemo.cpp
............此處省略44個(gè)文件信息
評(píng)論
共有 條評(píng)論