📄 axtivextctrl.h
字号:
#pragma once
// axtivextCtrl.h : CaxtivextCtrl ActiveX 控件类的声明。
/**************************************
1. 在"类视图"中的"CaxtivextCtrl" 右键中 添加"事件" => "EVENT_STOCK_CLICK" 等
2. 在"类视图"中的"axtivextLib"中的 "_Daxtivext" 右键中添加"属性"=>"GetValue, SetValue, 变量value"等
3. short value,backbmp; 这些变量好像得手动添加 ///----手动添加-----
4. 变量类型如果不同, 可能会导致错误, 其中 "BOOL Getbackground()"中的 BOOL 跟 VARIANT_BOOL 似乎不同, 他们会导致
Page中的对应变量载入时出错
/***************************************/
// CaxtivextCtrl : 有关实现的信息,请参阅 axtivextCtrl.cpp。
class CaxtivextCtrl : public COleControl
{
DECLARE_DYNCREATE(CaxtivextCtrl)
// 构造函数
public:
CaxtivextCtrl();
short value,backbmp; ///----手动添加-----
BOOL background;
BOOL CancelPopup;
BOOL A14;
BOOL IsMove,m_IsMove;
BOOL IsGoHome;
CPoint OldPoint,origin;
CRect rect;
long xx,yy;
// 重写
public:
virtual void OnDraw(CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid);
virtual void DoPropExchange(CPropExchange* pPX);
virtual void OnResetState();
// 实现
protected:
~CaxtivextCtrl();
BEGIN_OLEFACTORY(CaxtivextCtrl) // 类工厂和 guid
virtual BOOL VerifyUserLicense();
virtual BOOL GetLicenseKey(DWORD, BSTR FAR*);
END_OLEFACTORY(CaxtivextCtrl)
DECLARE_OLETYPELIB(CaxtivextCtrl) // GetTypeInfo
DECLARE_PROPPAGEIDS(CaxtivextCtrl) // 属性页 ID
DECLARE_OLECTLTYPE(CaxtivextCtrl) // 类型名称和杂项状态
// 消息映射
DECLARE_MESSAGE_MAP()
// 调度映射
DECLARE_DISPATCH_MAP()
afx_msg void AboutBox();
// 事件映射
DECLARE_EVENT_MAP()
// 调度和事件 ID
public:
enum {
dispidClick = 1L, dispidIsGoHome = 6, dispidIsMove = 5, dispidCancelPopup = 4, dispidbackbmp = 3, dispidbackground = 2, dispidvalue = 1
};
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
protected:
afx_msg short GetValue(void);
afx_msg void SetValue(short newVal);
afx_msg BOOL Getbackground(void);
afx_msg void Setbackground(BOOL newVal);
afx_msg short Getbackbmp(void);
afx_msg void Setbackbmp(short newVal);
afx_msg BOOL GetCancelPopup(void);
afx_msg void SetCancelPopup(BOOL newVal);
afx_msg BOOL GetIsMove(void);
afx_msg void SetIsMove(BOOL newVal);
afx_msg BOOL GetIsGoHome(void);
afx_msg void SetIsGoHome(BOOL newVal);
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -