Skip to content

Latest commit

 

History

History
81 lines (51 loc) · 2.33 KB

cmfcspinbuttonctrl-class.md

File metadata and controls

81 lines (51 loc) · 2.33 KB
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: CMFCSpinButtonCtrl Class
CMFCSpinButtonCtrl Class
11/04/2016
CMFCSpinButtonCtrl
AFXSPINBUTTONCTRL/CMFCSpinButtonCtrl
AFXSPINBUTTONCTRL/CMFCSpinButtonCtrl::OnDraw
CMFCSpinButtonCtrl [MFC], OnDraw
8773f259-4d3f-4bca-a71c-09e0c71bc843

CMFCSpinButtonCtrl Class

The CMFCSpinButtonCtrl class supports a visual manager that draws a spin button control.

Syntax

class CMFCSpinButtonCtrl : public CSpinButtonCtrl

Members

Public Constructors

Name Description
CMFCSpinButtonCtrl::CMFCSpinButtonCtrl Default constructor.
CMFCSpinButtonCtrl::~CMFCSpinButtonCtrl Destructor.

Public Methods

Name Description
CMFCSpinButtonCtrl::OnDraw Repaints the current spin button control.

Remarks

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.

Example

The following example demonstrates how to create an object of the CMFCSpinButtonCtrl class and use its Create method.

[!code-cppNVC_MFC_RibbonApp#25]

Inheritance Hierarchy

CObject

CCmdTarget

CWnd

CSpinButtonCtrl

CMFCSpinButtonCtrl

Requirements

Header: afxspinbuttonctrl.h

CMFCSpinButtonCtrl::OnDraw

Repaints the current spin button control.

virtual void OnDraw(CDC* pDC);

Parameters

pDC
[in] A pointer to a device context.

Remarks

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.

See also

Hierarchy Chart
Classes
CMFCVisualManager Class