|
// CalcKey.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CCalcKey window
#include "oxshape.h"
class CCalcKey : public CWnd, public COXShape
{
DECLARE_SHAPECLASS(CCalcKey);
private:
CString m_strTitle;
BOOL m_bHasFocus;
BOOL m_bIsPressed;
COLORREF m_crText;
COLORREF m_crBk;
COLORREF m_crAnimText;
COLORREF m_crAnimBk;
private:
HWND GetHWND() { return m_hWnd; }
void FireClick() { GetParent()->SendMessage(WM_COMMAND,
MAKEWPARAM(GetDlgCtrlID(),BN_CLICKED),
(LPARAM) m_hWnd); }
// Construction
public:
CCalcKey();
// Attributes
public:
void SetColors(COLORREF crText=-1, COLORREF crBk=-1, COLORREF crAnimText=-1,
COLORREF crAnimBk=-1);
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CCalcKey)
protected:
virtual void PostNcDestroy();
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CCalcKey();
// Generated message map functions
protected:
//{{AFX_MSG(CCalcKey)
afx_msg void OnPaint();
afx_msg LONG OnSetText(WPARAM, LPARAM);
afx_msg LONG OnGetText(WPARAM wParam, LPARAM lParam);
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnSetFocus(CWnd* pOldWnd);
afx_msg void OnKillFocus(CWnd* pNewWnd);
afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg void OnTimer(UINT nIDEvent);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
|
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.
In January 2005, David Cunningham and Chris Maunder created TheUltimateToolbox.com, a new group dedicated to the continued development, support and growth of Dundas Software’s award winning line of MFC, C++ and ActiveX control products.
Ultimate Grid for MFC, Ultimate Toolbox for MFC, and Ultimate TCP/IP have been stalwarts of C++/MFC development for a decade. Thousands of developers have used these products to speed their time to market, improve the quality of their finished products, and enhance the reliability and flexibility of their software.