資源簡(jiǎn)介
修改static控件顯示led指示燈,可以設(shè)置形狀(圓、方框、橢圓)以及修改顏色,該代碼是一個(gè)demo程序,可以指導(dǎo)如何使用,使用VS2008開(kāi)發(fā)
代碼片段和文件信息
///////////////類cpp文件
//?LED.cpp?:?implementation?file
//
?
#include?“stdafx.h“
//#include?“colortext.h“
#include?“LED.h“
?
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
?
/////////////////////////////////////////////////////////////////////////////
//?CLED
?
CLED::CLED()
{
m_crBK=RGB(255255255);
m_crOnFG=RGB(02550);
m_crOffFG=RGB(25500);
m_iType=0;
m_bOn=true;
m_brOnFG=new?CBrush(m_crOnFG);
m_brOffFG=new?CBrush(m_crOffFG);
m_sOnString=“on“;
m_sOffString=“off“;
m_bTextOn=true;
?
}
?
CLED::~CLED()
{
?
delete?m_brOffFG;
delete?m_brOnFG;
}
?
?
BEGIN_MESSAGE_MAP(CLED?CStatic)
//{{AFX_MSG_MAP(CLED)
ON_WM_CREATE()
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件?????163840??2018-04-16?23:46??staticLed\Debug\staticLed.exe
?????文件???????4331??2018-04-16?22:31??staticLed\staticLed\LED.cpp
?????文件???????2074??2018-04-16?23:05??staticLed\staticLed\LED.h
?????文件???????2905??2018-04-16?22:25??staticLed\staticLed\ReadMe.txt
????.......?????67777??2007-11-28?16:21??staticLed\staticLed\res\staticLed.ico
?????文件????????365??2018-04-16?22:25??staticLed\staticLed\res\staticLed.rc2
?????文件????????819??2018-04-16?23:37??staticLed\staticLed\resource.h
?????文件?????105384??2018-04-16?23:37??staticLed\staticLed\staticLed.aps
?????文件???????1692??2018-04-16?22:25??staticLed\staticLed\staticLed.cpp
?????文件????????463??2018-04-16?22:25??staticLed\staticLed\staticLed.h
?????文件???????5422??2018-04-16?23:37??staticLed\staticLed\staticLed.rc
?????文件???????5618??2018-04-16?22:56??staticLed\staticLed\staticLed.vcproj
?????文件???????3448??2018-04-16?23:46??staticLed\staticLed\staticLedDlg.cpp
?????文件????????680??2018-04-16?23:37??staticLed\staticLed\staticLedDlg.h
?????文件????????142??2018-04-16?22:25??staticLed\staticLed\stdafx.cpp
?????文件???????1854??2018-04-16?22:25??staticLed\staticLed\stdafx.h
?????文件???????1030??2018-04-16?22:25??staticLed\staticLed\targetver.h
?????文件????????893??2018-04-16?22:26??staticLed\staticLed.sln
????..A..H.?????13312??2018-04-16?23:46??staticLed\staticLed.suo
?????目錄??????????0??2018-04-16?22:25??staticLed\staticLed\res
?????目錄??????????0??2018-04-17?08:07??staticLed\Debug
?????目錄??????????0??2018-04-17?08:08??staticLed\staticLed
?????目錄??????????0??2018-04-17?08:07??staticLed
-----------?---------??----------?-----??----
???????????????382049????????????????????23
評(píng)論
共有 條評(píng)論