资源简介
在MFC中向ListCtrl的subItem0添加icon图标,用定时器定时去改变图标。
代码片段和文件信息
// ListSubItem0Icon.cpp : Defines the class behaviors for the application.
//
#include “stdafx.h“
#include “ListSubItem0Icon.h“
#include “ListSubItem0IconDlg.h“
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CListSubItem0IconApp
BEGIN_MESSAGE_MAP(CListSubItem0IconApp CWinApp)
ON_COMMAND(ID_HELP &CWinApp::onhelp)
END_MESSAGE_MAP()
// CListSubItem0IconApp construction
CListSubItem0IconApp::CListSubItem0IconApp()
{
// support Restart Manager
m_dwRestartManagerSupportFlags = AFX_RESTART_MANAGER_SUPPORT_RESTART;
// TODO: add construction code here
// Place all significant initialization in InitInstance
}
// The one and only CListSubItem0IconApp object
CListSubItem0IconApp theApp;
// CListSubItem0IconApp initialization
BOOL CListSubItem0IconApp::InitInstance()
{
// InitCommonControlsEx() is required on Windows XP if an application
// manifest specifies use of ComCtl32.dll version 6 or later to enable
// visual styles. Otherwise any window creation will fail.
INITCOMMONCONTROLSEX InitCtrls;
InitCtrls.dwSize = sizeof(InitCtrls);
// Set this to include all the common control classes you want to use
// in your application.
InitCtrls.dwICC = ICC_WIN95_CLASSES;
InitCommonControlsEx(&InitCtrls);
CWinApp::InitInstance();
AfxEnableControlContainer();
// Create the shell manager in case the dialog contains
// any shell tree view or shell list view controls.
CShellManager *pShellManager = new CShellManager;
// Activate “Windows Native“ visual manager for enabling themes in MFC controls
CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerWindows));
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable you should remove from the following
// the specific initialization routines you do not need
// Change the registry key under which our settings are stored
// TODO: You should modify this string to be something appropriate
// such as the name of your company or organization
SetRegistryKey(_T(“Local AppWizard-Generated Applications“));
CListSubItem0IconDlg dlg;
m_pMainWnd = &dlg;
INT_PTR nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}
else if (nResponse == -1)
{
TRACE(traceAppMsg 0 “Warning: dialog creation failed so application is terminating unexpectedly.\n“);
TRACE(traceAppMsg 0 “Warning: if you are using MFC controls on the dialog you cannot #define _AFX_NO_MFC_CONTROLS_IN_DIALOGS.\n“);
}
// Delete the shell manager created above.
if (pShellManager != NULL)
{
delete pShellManager;
}
#ifndef _AFXDLL
ControlBarCleanUp();
#endif
// Since the dialog has been closed return FALSE so that we exit
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
..A..H. 27648 2017-11-23 11:09 ListSubItem0Icon\.vs\ListSubItem0Icon\v14\.suo
文件 216576 2017-11-23 11:08 ListSubItem0Icon\Debug\ListSubItem0Icon.exe
文件 111928 2017-11-23 09:54 ListSubItem0Icon\ListSubItem0Icon\ListSubItem0Icon.aps
文件 3095 2017-11-23 09:35 ListSubItem0Icon\ListSubItem0Icon\ListSubItem0Icon.cpp
文件 565 2017-11-23 09:35 ListSubItem0Icon\ListSubItem0Icon\ListSubItem0Icon.h
文件 12572 2017-11-23 09:54 ListSubItem0Icon\ListSubItem0Icon\ListSubItem0Icon.rc
文件 10650 2017-11-23 09:55 ListSubItem0Icon\ListSubItem0Icon\ListSubItem0Icon.vcxproj
文件 2343 2017-11-23 09:55 ListSubItem0Icon\ListSubItem0Icon\ListSubItem0Icon.vcxproj.filters
文件 5392 2017-11-23 11:08 ListSubItem0Icon\ListSubItem0Icon\ListSubItem0IconDlg.cpp
文件 879 2017-11-23 11:07 ListSubItem0Icon\ListSubItem0Icon\ListSubItem0IconDlg.h
文件 5413 2017-11-23 09:35 ListSubItem0Icon\ListSubItem0Icon\ReadMe.txt
....... 67777 2015-09-20 17:20 ListSubItem0Icon\ListSubItem0Icon\res\ListSubItem0Icon.ico
文件 816 2017-11-23 09:35 ListSubItem0Icon\ListSubItem0Icon\res\ListSubItem0Icon.rc2
文件 1150 2017-11-23 09:53 ListSubItem0Icon\ListSubItem0Icon\res\resp_faild.ico
文件 1150 2017-11-23 09:53 ListSubItem0Icon\ListSubItem0Icon\res\resp_ok.ico
文件 1558 2017-11-23 09:57 ListSubItem0Icon\ListSubItem0Icon\Resource.h
文件 218 2017-11-23 09:35 ListSubItem0Icon\ListSubItem0Icon\stdafx.cpp
文件 1753 2017-11-23 09:35 ListSubItem0Icon\ListSubItem0Icon\stdafx.h
文件 314 2017-11-23 09:35 ListSubItem0Icon\ListSubItem0Icon\targetver.h
文件 1330 2017-11-23 09:35 ListSubItem0Icon\ListSubItem0Icon.sln
文件 69332992 2017-11-23 11:09 ListSubItem0Icon\ListSubItem0Icon.VC.db
目录 0 2017-11-23 09:35 ListSubItem0Icon\.vs\ListSubItem0Icon\v14
目录 0 2017-11-23 09:35 ListSubItem0Icon\.vs\ListSubItem0Icon
目录 0 2017-11-23 09:53 ListSubItem0Icon\ListSubItem0Icon\res
...D.H. 0 2017-11-23 09:35 ListSubItem0Icon\.vs
目录 0 2017-11-23 11:09 ListSubItem0Icon\Debug
目录 0 2017-11-23 11:09 ListSubItem0Icon\ListSubItem0Icon
目录 0 2017-11-23 11:09 ListSubItem0Icon
----------- --------- ---------- ----- ----
69806119 28
............此处省略1个文件信息
相关资源
- 兄弟原厂中文维修手册-DCP-1518-1519-M
- 数字图像处理实习程序
- VS平台下的MFC版坦克大战
- MFC实现的简单的画图工具
- ADO连接数据库-基于mfc的简单实现
- MFC实现迷宫搜索——Easy参考
- SMTP服务器端MFC
- 约瑟夫环问题的MFC简单实现
- MFC树形控件CTreeCtrl显示文件路径及文
- c++课设 井字棋游戏
- vs2012 mfc程序用Socket实现两台计算机间
- MFC计算机图形学-三维图形几何变换斜
- MFC+OpenGL三维绘图
- MFC Windows程序设计(第二版)(中文版
- FaceMFC.part3
- mfc 仿YY登陆界面,源码。仅供学习。
- duilib相关(duilib库及源码、duilib的M
- MFC仿QQ局域网聊天软件
- MFC两张图片拼接
- VS2013写的简单小游戏俄罗斯方块
- SerialAPP 开始研究MFC
- MFC学生选课系统263525
- VS2010+MFC 使用WinAPI实现串口通信
- opencv 车牌识别 vs2010 mfc
- 用MFC编写的对mysql数据库的操作
- 利用MFC的Picture控件显示图像和视频
- MFC五子棋源码以及exe文件
- 通过MFC的MCI实现的音乐播放器VC可视化
- mfc socket编程实现聊天与文件传输vs2
- MFC socket编程 简易聊天工具及文件
评论
共有 条评论