资源简介
语音识别系统源码,是一个很不错的C++代码,有兴趣的伙伴们抽时间可以看一下把。
代码片段和文件信息
// Label.cpp : implementation file
//
#include “stdafx.h“
#include “robot.h“
#include “Label.h“
//#include “shellapi.h“
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CLabel
CLabel::CLabel()
{
m_crText = GetSysColor(COLOR_WINDOWTEXT);
m_hBrush = ::CreateSolidBrush(GetSysColor(COLOR_3DFACE));
::Getobject((HFONT)GetStockobject(DEFAULT_GUI_FONT)sizeof(m_lf)&m_lf);
m_font.CreateFontIndirect(&m_lf);
m_bTimer = FALSE;
m_bState = FALSE;
m_blink = TRUE;
m_hCursor = NULL;
m_Type = None;
m_hwndBrush = ::CreateSolidBrush(GetSysColor(COLOR_3DFACE));
}
CLabel::~CLabel()
{
m_font.Deleteobject();
::Deleteobject(m_hBrush);
}
CLabel& CLabel::SetText(const CString& strText)
{
SetWindowText(strText);
return *this;
}
CLabel& CLabel::SetTextColor(COLORREF crText)
{
m_crText = crText;
RedrawWindow();
return *this;
}
CLabel& CLabel::SetFontBold(BOOL bBold)
{
m_lf.lfWeight = bBold ? FW_BOLD : FW_NORMAL;
ReconstructFont();
RedrawWindow();
return *this;
}
CLabel& CLabel::SetFontUnderline(BOOL bSet)
{
m_lf.lfUnderline = bSet;
ReconstructFont();
RedrawWindow();
return *this;
}
CLabel& CLabel::SetFontItalic(BOOL bSet)
{
m_lf.lfItalic = bSet;
ReconstructFont();
RedrawWindow();
return *this;
}
CLabel& CLabel::SetSunken(BOOL bSet)
{
if (!bSet)
ModifystyleEx(WS_EX_STATICEDGE0SWP_DRAWframe);
else
ModifystyleEx(0WS_EX_STATICEDGESWP_DRAWframe);
return *this;
}
CLabel& CLabel::SetBorder(BOOL bSet)
{
if (!bSet)
Modifystyle(WS_BORDER0SWP_DRAWframe);
else
Modifystyle(0WS_BORDERSWP_DRAWframe);
return *this;
}
CLabel& CLabel::SetFontSize(int nSize)
{
nSize*=-1;
m_lf.lfHeight = nSize;
ReconstructFont();
RedrawWindow();
return *this;
}
CLabel& CLabel::SetBkColor(COLORREF crBkgnd)
{
if (m_hBrush)
::Deleteobject(m_hBrush);
m_hBrush = ::CreateSolidBrush(crBkgnd);
return *this;
}
CLabel& CLabel::SetFontName(const CString& strFont)
{
strcpy(m_lf.lfFaceNamestrFont);
ReconstructFont();
RedrawWindow();
return *this;
}
BEGIN_MESSAGE_MAP(CLabel CStatic)
//{{AFX_MSG_MAP(CLabel)
ON_WM_CTLCOLOR_REFLECT()
ON_WM_TIMER()
ON_WM_LBUTTONDOWN()
ON_WM_SETCURSOR()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CLabel message handlers
HBRUSH CLabel::CtlColor(CDC* pDC UINT nCtlColor)
{
// TODO: Change any attributes of the DC here
// TODO: Return a non-NULL brush if the parent‘s handler should not be called
if (CTLCOLOR_STATIC == nCtlColor)
{
pDC->Selectobject(&m_font);
pDC->SetTextColor(m_crText);
pDC->SetBkMode(TRANSPARENT);
}
if (m_Type == Background)
{
if (!m_bState)
return m_hwndBrush;
}
return m_hBrush;
}
void CLa
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 595 2002-01-06 02:32 语音识别系统\DUTTY.INI
文件 4642 2002-01-07 13:22 语音识别系统\ROBOT\Label.cpp
文件 2083 2001-12-25 21:55 语音识别系统\ROBOT\Label.h
文件 3314 2001-12-27 14:58 语音识别系统\ROBOT\MainFrm.cpp
文件 1588 2001-11-22 15:27 语音识别系统\ROBOT\MainFrm.h
文件 4287 2001-11-07 20:16 语音识别系统\ROBOT\ReadMe.txt
文件 302 2001-11-21 03:11 语音识别系统\ROBOT\RES\BITMAP3.BMP
文件 302 2001-11-21 03:11 语音识别系统\ROBOT\RES\BITMAP4.BMP
文件 302 2001-11-21 03:11 语音识别系统\ROBOT\RES\BITMAP5.BMP
文件 302 2001-11-21 03:11 语音识别系统\ROBOT\RES\BITMAP6.BMP
文件 302 2001-11-21 03:11 语音识别系统\ROBOT\RES\BITMAP7.BMP
文件 302 2001-11-21 21:03 语音识别系统\ROBOT\RES\BITMAP8.BMP
文件 302 2001-11-21 03:11 语音识别系统\ROBOT\RES\BMP0.BMP
文件 302 2001-11-21 21:03 语音识别系统\ROBOT\RES\BMP00001.BMP
文件 302 2001-11-21 21:03 语音识别系统\ROBOT\RES\BMP00002.BMP
文件 302 2001-11-21 21:03 语音识别系统\ROBOT\RES\BMP00003.BMP
文件 302 2001-11-21 21:03 语音识别系统\ROBOT\RES\BMP00004.BMP
文件 302 2001-11-21 03:11 语音识别系统\ROBOT\RES\BMP1.BMP
文件 302 2001-11-21 20:45 语音识别系统\ROBOT\RES\BMP10.BMP
文件 302 2001-11-21 21:03 语音识别系统\ROBOT\RES\BMP13.BMP
文件 302 2001-11-21 21:03 语音识别系统\ROBOT\RES\BMP14.BMP
文件 302 2001-11-21 21:03 语音识别系统\ROBOT\RES\BMP15.BMP
文件 302 2001-11-21 21:03 语音识别系统\ROBOT\RES\BMP18.BMP
文件 302 2001-11-21 21:03 语音识别系统\ROBOT\RES\BMP2.BMP
文件 302 2001-11-21 03:27 语音识别系统\ROBOT\RES\BMP9.BMP
文件 766 2001-12-27 14:51 语音识别系统\ROBOT\RES\ICO00001.ICO
文件 766 2001-11-26 17:04 语音识别系统\ROBOT\RES\ICON1.ICO
文件 1078 2001-11-07 20:16 语音识别系统\ROBOT\RES\ROBOT.ICO
文件 397 2001-11-07 20:16 语音识别系统\ROBOT\RES\ROBOT.RC2
文件 1078 2001-11-07 20:16 语音识别系统\ROBOT\RES\robotDoc.ico
............此处省略32个文件信息
相关资源
- 狼吃羊C++代码
- libstdc++-3.4.6-9.i386_libstdc++-3.4.6-11.x86_
- C++ Builder DLL
- windows下c实现telnet代码
- 梯度下降求函数极值C++代码
- VC++ 串口调试助手源代码
- 四种VC表格控件源码
- 基于QtQuick的QCustomPlot实现
- 04737 C++程序设计 精讲 串讲 笔记 音频
- 矩阵类的运算符重载
- vc++做的考试系统c/s模式
- KCF跟踪算法c++
- ftp的C++源码实现,可以进行文件传输
- c++实现计算器
- VC++ 向指定串口发送和接收数据可十六
- 数据结构课程设计CC++描述[阮宏一][程
- vc++FTP搜索工具()
- 基于VC++的图像修复源代码
- Google C++编码规范
- 简单电梯c++实现
- AES/ECB/PKCS5Padding C++实现
- c++商品管理
- 打印出有向图中的所有环C++
- cocos2dx 3.17 2048游戏的源码
- 计算机组成原理booth算法C源码
- C++中缀表达式求值
- 一个数字水印的VC++源程序,支持图片
- C++大学教程(第七版)](美)戴特尔
- Visual C++串口通信
- 蜘蛛纸牌VC++
评论
共有 条评论