Click here to Skip to main content
Click here to Skip to main content

3D Thermometer Control

, 2 Feb 2007
Rate this:
Please Sign up or sign in to vote.
3D Thermometer Control Drawn with GDI Plus

Sample Image - maximum width is 600 pixels


Drop-in MFC class to display temperature


I had the need to display temperature readings from sensors. After taking apart a couple of very nice controls written by Davide Calabro I decided to try and show off.


This project was built and tested on Windows XP using Visual Studio 2003 SP1

Using the code

  1. Add GDI+ support to your application: Starting with GDI+
  2. Add TempCtrl.h and TempCtrl.cpp to your project.
  3. Include TempCtrl.h in your main window/form view class.
  4. Create a member variable of type CTempCtrl.
  5. In the window initialization, subclass the thermometer:
    BOOL int CMainDlg::OnInitDialog()
        // ...
        // Setup thermometer control
        m_TempCtrl.SubclassDlgItem(IDC_TEMP, this);
        // ...


Very special thanks to Davide Calabro for his knob and cylinder progress controls:


The control's size currently has to be within a certain range to be look right. In the future I will dynamically set line widths, font sizes, etc from the control size.


Jan 31st 2007 - Original Article.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Software Developer
United States United States
No Biography provided

Comments and Discussions

GeneralNo explanation PinmemberNeville Franks4-Feb-07 9:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150224.1 | Last Updated 2 Feb 2007
Article Copyright 2007 by JJMatthews
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid