一个原创地仪表控件.doc

  1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
一个原创地仪表控件.doc

一个原创地仪表控件 2.CMeter类的使用方法 (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 application not only demonstrates the basics of using the Microsoft Foundation classes but is also a starting point for writing your application. This file contains a summary of what you will find in each of the files that make 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 e

文档评论(0)

shbky123 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档