



全文预览已结束
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
一个原创地仪表控件路过世纪飞扬的网站发现好些个仪表控件,可惜都要付费,这对于很多用户来说不得不说是一件憾事。最近两天导师项目不忙,就抽空做了一个仪表控件,是对照别人的仪表外观做的,在此公布出来大家讨论讨论,最好大家都写些免费的控件放在网上,好资源共享。如果有兄弟觉得好用的话,请在使用处留下俺的名号,这就够给我面子了。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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 应急救援预案谁发布的(3篇)
- 沥青路面维修施工方案(3篇)
- 别墅地下室防水施工方案(3篇)
- 网络监控施工方案(3篇)
- 2025年长租公寓智能化运营及设施维修服务协议
- 2025年深基坑支护与地基处理施工承包合同
- 2025型工业自动化生产线电气设计与施工总承包服务合同
- 2025年度健康养生主题餐厅设计咨询服务合同
- 2025年度生态友好型环保科技项目厂房委托建设协议书
- 2025年离婚财产分配与共同债务处理全面操作合同
- 2025年广西专业技术人员继续教育公需科目(三)答案
- GB/T 4666-2009纺织品织物长度和幅宽的测定
- GB/T 13912-2020金属覆盖层钢铁制件热浸镀锌层技术要求及试验方法
- 水轮发电机的基本结构课件
- 《空气动力学》配套教学课件
- 2023年西安陕鼓动力股份有限公司招聘笔试模拟试题及答案解析
- 送达地址确认书(完整版)
- 水泵设备单机试运转记录
- 完整版医院体检报告范本
- 速成意大利语(上)
- Q∕SY 1535-2012 海底管道混凝土配重层技术规范
评论
0/150
提交评论