?? 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 + -