原创 LED数码管界面的演示-VC程序

2007-3-19 14:37 5550 5 5 分类: 软件与OS

这是来自http://www.codeproject.com/staticctrl/digistring.asp 的一个有趣的例子。


点击看大图


 


How to use (in a dialog):



  1. Add digistatic.h, digistatic.cpp, memdc.h, curvefit.h, curvefit.cpp and rgbcolor.h to your project environment.
  2. Add a static control to your dialog resource.
  3. Change its ID to something like IDC_LEDTEXT, open class-wizard and assign a member variable, type control (CStatic) to it (m_LedText for example).
  4. Open your dialog class's header file. Add #include "digistatic.h". Find the line CStatic m_LedText and replace the CStatic by CDigiStatic.
  5. In OnInitDialog() you can give it some text with SetText(), change the colors with SetColor() or for the background SetBkColor(). Or, you can set the right style with ModifyDigistyle().
  6. Compile and run.

程序包:zip

文章评论0条评论)

登录后参与讨论
我要评论
0
5
关闭 站长推荐上一条 /2 下一条