资源简介
配套书本学习更快,初学者 可以借鉴本代码学校到串口编程的方法。

代码片段和文件信息
// AnimateIcon.cpp : implementation of the CAnimateDlgIcon class
// written by Rajesh Parikh
// email : rparikh@usa.net
// Not protected by any copyright use it freely
//
/////////////////////////////////////////////////////////////////////////////
#include “stdafx.h“
#include “AnimateDlgIcon.h“
// default constructor
CAnimateDlgIcon::CAnimateDlgIcon()
{
m_iImageCounter = -1;
m_iMaxNoOfImages = -99;
m_imgList.m_hImageList = NULL;
}
// default do nothing destructor
CAnimateDlgIcon::~CAnimateDlgIcon()
{
DestroyIcon(hPrevIcon);
}
// This is the first function which needs to be called in order
// to fill the image list
// Parameters :
// ------------
// int IDOfImgListResource - pass the Resource ID of a toolbar resource
// containing the image list
// int numberOfImages - Number of images (16x16) in the toolbar resource
// transparentColor - RGB value of color you want to be transparent
BOOL CAnimateDlgIcon::SetImageList(int IDOfImgListResourceint numberOfImagesCOLORREF transparentColor)
{
if(numberOfImages <= 0)
return FALSE;
m_iMaxNoOfImages = numberOfImages;
VERIFY(m_imgList.Create(IDOfImgListResource161transparentColor));
return TRUE;
}
// This function needs to be called repetatively to show next image
// Parameters :
// ------------
// NONE
BOOL CAnimateDlgIcon::ShowNextImage()
{
if(m_imgList.m_hImageList == NULL)
return FALSE;
m_iImageCounter++;
if(m_iImageCounter >= m_iMaxNoOfImages)
m_iImageCounter =0;
// extract the icon from imagelist
hIcon = m_imgList.ExtractIcon(m_iImageCounter);
// send the message to frame to update icon
HICON hPrevIcon = (HICON) AfxGetMainWnd()->SetIcon(hIconFALSE);
// Free the previous icon resource
DestroyIcon(hPrevIcon);
return TRUE;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1833 1998-12-23 12:48 第05章\SCOMMV23\AnimateDlgIcon.cpp
文件 980 1998-12-23 11:40 第05章\SCOMMV23\AnimateDlgIcon.h
文件 5824 2015-07-01 16:47 第05章\SCOMMV23\Debug\AnimateDlgIcon.obj
文件 0 2015-07-01 16:47 第05章\SCOMMV23\Debug\AnimateDlgIcon.sbr
文件 46900 2015-07-01 16:47 第05章\SCOMMV23\Debug\HYPERli
文件 0 2015-07-01 16:47 第05章\SCOMMV23\Debug\HYPERli
文件 21236 2015-07-01 16:47 第05章\SCOMMV23\Debug\PushPin.obj
文件 0 2015-07-01 16:47 第05章\SCOMMV23\Debug\PushPin.sbr
文件 3187712 2015-07-01 16:47 第05章\SCOMMV23\Debug\SCOMM.bsc
文件 2195549 2015-07-01 16:47 第05章\SCOMMV23\Debug\SCOMM.exe
文件 2598584 2015-07-01 16:47 第05章\SCOMMV23\Debug\SCOMM.ilk
文件 22347 2015-07-01 16:47 第05章\SCOMMV23\Debug\SCOMM.obj
文件 6920796 2015-07-01 16:47 第05章\SCOMMV23\Debug\SCOMM.pch
文件 4252672 2015-07-01 16:47 第05章\SCOMMV23\Debug\SCOMM.pdb
文件 18416 2015-07-01 16:46 第05章\SCOMMV23\Debug\SCOMM.res
文件 0 2015-07-01 16:47 第05章\SCOMMV23\Debug\SCOMM.sbr
文件 109716 2015-07-01 16:47 第05章\SCOMMV23\Debug\SCOMMDlg.obj
文件 0 2015-07-01 16:47 第05章\SCOMMV23\Debug\SCOMMDlg.sbr
文件 27569 2015-07-01 16:47 第05章\SCOMMV23\Debug\SerialPort.obj
文件 0 2015-07-01 16:47 第05章\SCOMMV23\Debug\SerialPort.sbr
文件 105816 2015-07-01 16:47 第05章\SCOMMV23\Debug\StdAfx.obj
文件 1364834 2015-07-01 16:47 第05章\SCOMMV23\Debug\StdAfx.sbr
文件 214016 2015-07-01 16:48 第05章\SCOMMV23\Debug\vc60.idb
文件 372736 2015-07-01 16:47 第05章\SCOMMV23\Debug\vc60.pdb
文件 13096 1998-08-12 09:36 第05章\SCOMMV23\HYPERli
文件 3323 1998-08-12 09:36 第05章\SCOMMV23\HYPERli
文件 4622 1998-05-27 11:24 第05章\SCOMMV23\LABEL.CPP
文件 2093 1998-05-27 11:22 第05章\SCOMMV23\LABEL.H
文件 5893 2001-06-23 19:23 第05章\SCOMMV23\PushPin.cpp
文件 1310 2001-06-23 19:11 第05章\SCOMMV23\PushPin.h
............此处省略44个文件信息
相关资源
- VC 获得文件属性 获取文件的创建时
- 读者写者问题(读者优先,写者优先
- 用VC 编写的仿QQ聊天室程序源代码
- VC 游戏编程—附源代码
- IpHlpApi.h&IpHlpApi.lib
- vc 6.0开发的流程图编辑器
- VC 天空盒(skyBox)实现(附源代码)
- c MFC 画多边形
- VC 围棋源代码
- 用VC 编写的基于SNMP的路由器拓扑程序
- 清华大学郑莉C 语言程序设计课件
- ping 程序 C语言
- 操作系统实验综合设计【附代码】
- VC 编程实现活动主机扫描源代码
- vc 编写的基于TCP协议的客户/服务器
- 树状导航菜单的制作
- VC工程转Qt工程文件的工具
- 二进制方式打包和解包文件
- vc写的一个游戏里面三维场景漫游
- 学生成绩档案管理系统—保证可用
- 快递单邮政编码识别系统的实现
- 学生信息管理系统,非常详细
- 人脸识别系统设计-毕业设计
- Virtual Serial Port Driver.zip
- 多功能串口助手 DLT645/DLT698.45软件 模
- 广工信工图像处理作业
- opengl 实现的机器人行走
- OpenGL 超酷三维动画DEMO
- 串口猎人 串口助手
- de2开发板上的万年历
评论
共有 条评论