全文预览已结束
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
一个原创地仪表控件路过世纪飞扬的网站发现好些个仪表控件,可惜都要付费,这对于很多用户来说不得不说是一件憾事。最近两天导师项目不忙,就抽空做了一个仪表控件,是对照别人的仪表外观做的,在此公布出来大家讨论讨论,最好大家都写些免费的控件放在网上,好资源共享。如果有兄弟觉得好用的话,请在使用处留下俺的名号,这就够给我面子了。1效果图2CMeter类的使用方法(1) Meter.cpp和Meter.h以及MemDC.h加入到你的工程中。 (2) 在你的工程中放入一个图片框控件,并通过类向导声明一个CStatic类的对象,例如叫m_myMeter。 (3) 用CMeter替换m_myMeter的CStatic。 (4) 利用CMeter类的接口函数初始化。 (5) 更新数值UpdateNeedle(double dValue),显示指针变化。 3接口函数介绍 SetNeedleColor(COLORREF colorNeedle) 设置指针颜色SetRange(double dMin, double dMax) 设置仪表最大值最小值SetScaleDecimals(int nDecimals) 设置刻度显示精度(小数点后位数)SetValueDecimals(int nDecimals) 设置数值显示精度(小数点后位数)SetUnits(CString &strUnits) 设置单位SetColorTick(BOOL bColorTick) 是否显示彩色刻度SetTicks(int nTicks) 设置主刻度(分几大格) SetSubTicks(int nSubTicks) 设置子刻度(每大格分为几小格) SetAngleRange(int nStartAngleDeg, int nEndAngleDeg) 表盘圆弧起始终止角度= MICROSOFT FOUNDATION CLASS LIBRARY : MyMeter=AppWizard has created this MyMeter application for you. This applicationnot only demonstrates the basics of using the Microsoft Foundation classesbut is also a starting point for writing your application.This file contains a summary of what you will find in each of the files thatmake up your MyMeter application.MyMeter.dsp This file (the project file) contains information at the project level and is used to build a single project or subproject. Other users can share the project (.dsp) file, but they should export the makefiles locally.MyMeter.h This is the main header file for the application. It includes other project specific headers (including Resource.h) and declares the CMyMeterApp application class.MyMeter.cpp This is the main application source file that contains the application class CMyMeterApp.MyMeter.rc This is a listing of all of the Microsoft Windows resources that the program uses. It includes the icons, bitmaps, and cursors that are stored in the RES subdirectory. This file can be directly edited in MicrosoftVisual C+.MyMeter.clw This file contains information used by ClassWizard to edit existing classes or add new classes. ClassWizard also uses this file to store information needed to create and edit message maps and dialog data maps and to create prototype member functions.resMyMeter.ico This is an icon file, which is used as the applications icon. This icon is included by the main resource file MyMeter.rc.resMyMeter.rc2 This file contains resources that are not edited by Microsoft Visual C+. You should place all resources not editable bythe resource editor in this file./AppWizard creates one dialog class:MyMeterDlg.h, MyMeterDlg.cpp - the dialog These files contain your CMyMeterDlg class. This class defines the behavior of your applications main dialog. The dialogs template is in MyMeter.rc, which can be edited in MicrosoftVisual C+./Other standard files:StdAfx.h, StdAfx.cpp These files are used to build a precompiled header (PCH) file named MyMeter.pch and a precompiled types file named StdAfx.obj.Resource.h This is the standard header file, which defines new resource IDs. Microsoft Visual C+ reads and updates this file./Other notes:AppWizard uses TODO: to indicate parts of the source code youshould add to or customize.If your application uses MFC in a shared DLL, and your application is in a language other than the operating systems current language, youwill need to copy the corresponding localized resources MFC42XXX.DLLfrom the Microsoft Visual C+ CD-ROM onto the system or system32 directory,and rename it to be MFCLOC.DLL. (XXX stands for the language abbreviation.For
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026年晋城职业技术学院单招职业技能测试题库及参考答案详解
- 2026年福建农林大学金山学院单招职业倾向性考试题库参考答案详解
- 2026年福建船政交通职业学院单招职业倾向性考试题库及答案详解1套
- 2026年西安欧亚学院单招职业技能测试题库含答案详解
- 2026年山西运城农业职业技术学院单招职业技能测试题库及参考答案详解一套
- 2026年焦作新材料职业学院单招职业技能考试题库及参考答案详解
- 2026年阳光学院单招职业适应性考试题库参考答案详解
- 2026年抚州幼儿师范高等专科学校单招职业倾向性考试题库带答案详解
- 2026年邯郸幼儿师范高等专科学校单招职业倾向性测试题库含答案详解
- 2026年湘西民族职业技术学院单招职业适应性考试题库及参考答案详解1套
- 广西崇左市江州区2025-2026学年七年级上学期第三阶段素质评价历史试题 (含答案)
- 2025年烟花炮竹安全知识竞赛试题及答案
- 2025-2026学年上学期北京小学数学五年级期末典型卷1
- 2026年IT服务管理培训课件
- 洁具安装项目招投标文件模板
- 车辆安全课件模板下载
- 2025ACR指南:系统性红斑狼疮的治疗课件
- 北京市房山区2024-2025学年六年级上学期期末数学测试卷
- 【语文】包头市小学三年级上册期末试卷(含答案)
- 2025圭亚那金矿开采环境影响评估及环保措施设定分析集合
- 9.1 自然特征与农业 课件 2025-2026学年八年级地理下学期人教版
评论
0/150
提交评论