|
#if !defined(AFX_TOGGLEBUTTON_H__711AF673_BCE0_11D3_9FE1_006067718D04__INCLUDED_)
#define AFX_TOGGLEBUTTON_H__711AF673_BCE0_11D3_9FE1_006067718D04__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ToggleButton.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CToggleButton window
class CToggleButton : public CButton
{
// Construction
public:
CToggleButton();
// Attributes
public:
// Operations
public:
DWORD SetHPos(DWORD style); // Set the horizonatal alignment style
DWORD SetVPos(DWORD style); // Set the vertical alignment style
BOOL GetState() { return depressed; } // returns state, TRUE if depressed
BOOL SetState(BOOL newstate)
{ BOOL old = depressed; depressed = newstate;
InvalidateRect(NULL); return old; } // sets new state, returns old state
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CToggleButton)
public:
virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CToggleButton();
// Generated message map functions
protected:
BOOL depressed;
//{{AFX_MSG(CToggleButton)
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_TOGGLEBUTTON_H__711AF673_BCE0_11D3_9FE1_006067718D04__INCLUDED_)
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.