📄 pjctl.h
字号:
#if !defined(AFX_PJCTL_H__9F2E2DE7_5F6E_4366_98B6_36DB4C09B149__INCLUDED_)
#define AFX_PJCTL_H__9F2E2DE7_5F6E_4366_98B6_36DB4C09B149__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// PJCtl.h : Declaration of the CPJCtrl ActiveX Control class.
/////////////////////////////////////////////////////////////////////////////
// CPJCtrl : See PJCtl.cpp for implementation.
class CPJCtrl : public COleControl
{
DECLARE_DYNCREATE(CPJCtrl)
// Constructor
public:
CPJCtrl();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CPJCtrl)
public:
virtual void OnDraw(CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid);
virtual void DoPropExchange(CPropExchange* pPX);
virtual void OnResetState();
//}}AFX_VIRTUAL
// Implementation
protected:
~CPJCtrl();
DECLARE_OLECREATE_EX(CPJCtrl) // Class factory and guid
DECLARE_OLETYPELIB(CPJCtrl) // GetTypeInfo
DECLARE_PROPPAGEIDS(CPJCtrl) // Property page IDs
DECLARE_OLECTLTYPE(CPJCtrl) // Type name and misc status
// Message maps
//{{AFX_MSG(CPJCtrl)
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
// Dispatch maps
//{{AFX_DISPATCH(CPJCtrl)
afx_msg short GetIndex();
afx_msg void SetIndex(short nNewValue);
afx_msg BOOL GetIsBK();
afx_msg void SetIsBK(BOOL bNewValue);
afx_msg BOOL GetCanMove();
afx_msg void SetCanMove(BOOL bNewValue);
//}}AFX_DISPATCH
DECLARE_DISPATCH_MAP()
afx_msg void AboutBox();
// Event maps
//{{AFX_EVENT(CPJCtrl)
//}}AFX_EVENT
DECLARE_EVENT_MAP()
// Dispatch and event IDs
public:
enum {
//{{AFX_DISP_ID(CPJCtrl)
dispidIndex = 1L,
dispidIsBK = 2L,
dispidIsMove = 3L,
//}}AFX_DISP_ID
};
protected:
short m_nIndex; //牌的索引值,其合法范围为0~31
BOOL m_bBK; //当其为真时显示牌的背面,否则显示牌的正面
BOOL m_bCanMove; //运行时控件是否允许被拖动
BOOL m_bMoving; //是否正在拖动控件
CPoint OldPoint;
CRect m_rectOld; //保存原来的矩形位置
long m_ptX,m_ptY;
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_PJCTL_H__9F2E2DE7_5F6E_4366_98B6_36DB4C09B149__INCLUDED)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -