| title | CMFCSpinButtonCtrl Class | Microsoft Docs | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ms.custom | ||||||||||||||
| ms.date | 11/04/2016 | |||||||||||||
| ms.reviewer | ||||||||||||||
| ms.suite | ||||||||||||||
| ms.technology |
|
|||||||||||||
| ms.tgt_pltfrm | ||||||||||||||
| ms.topic | reference | |||||||||||||
| f1_keywords |
|
|||||||||||||
| dev_langs |
|
|||||||||||||
| helpviewer_keywords |
|
|||||||||||||
| ms.assetid | 8773f259-4d3f-4bca-a71c-09e0c71bc843 | |||||||||||||
| caps.latest.revision | 25 | |||||||||||||
| author | mikeblome | |||||||||||||
| ms.author | mblome | |||||||||||||
| manager | ghogen | |||||||||||||
| translation.priority.ht |
|
The CMFCSpinButtonCtrl class supports a visual manager that draws a spin button control.
class CMFCSpinButtonCtrl : public CSpinButtonCtrl
| Name | Description |
|---|---|
CMFCSpinButtonCtrl::CMFCSpinButtonCtrl |
Default constructor. |
CMFCSpinButtonCtrl::~CMFCSpinButtonCtrl |
Destructor. |
| Name | Description |
|---|---|
| CMFCSpinButtonCtrl::OnDraw | Repaints the current spin button control. |
To use a visual manager to draw a spin button control in your application, replace all instances of the CSpinButtonCtrl class with the CMFCSpinButtonCtrl class.
The following example demonstrates how to create an object of the CMFCSpinButtonCtrl class and use its Create method.
[!code-cppNVC_MFC_RibbonApp#25]
Header: afxspinbuttonctrl.h
Repaints the current spin button control.
virtual void OnDraw(CDC* pDC);
[in] pDC
A pointer to a device context.
The framework calls the CMFCSpinButtonCtrl::OnPaint method to handle the CWnd::OnPaint message, and that method in turn calls this CMFCSpinButtonCtrl::OnDraw method. Override this method to customize the way the framework draws the spin button control.