⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 anirremotectl.h

📁 AnirOCX - An OCX to add remote control support to your Windows applications
💻 H
字号:
#include "anir32.h"


//forward declaration
class CAnirRemoteCtrl;

class COCXRemote : public CAnirRemoteControl
{
public: 
//constructors / Destructors
  COCXRemote() { m_pControl = NULL; };

//methods
  void SetControl(CAnirRemoteCtrl* pControl) { m_pControl = pControl; };

protected:
  virtual void ProcessReceivedData(BYTE data, BOOL bRepeat);
  CAnirRemoteCtrl* m_pControl;
};



class CAnirRemoteCtrl : public COleControl
{
	DECLARE_DYNCREATE(CAnirRemoteCtrl)

  friend class COCXRemote;

// Constructor
public:
	CAnirRemoteCtrl();

// Overrides
	virtual void OnDraw(CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid);
	virtual void DoPropExchange(CPropExchange* pPX);
	virtual void OnResetState();
  virtual BOOL OnSetExtent(LPSIZEL lpSizeL);
  virtual BOOL OnProperties(LPMSG lpMsg, HWND hWndParent, LPCRECT lpRect);


// Implementation
protected:
	~CAnirRemoteCtrl();

	DECLARE_OLECREATE_EX(CAnirRemoteCtrl)    // Class factory and guid
	DECLARE_OLETYPELIB(CAnirRemoteCtrl)      // GetTypeInfo
	DECLARE_OLECTLTYPE(CAnirRemoteCtrl)		// Type name and misc status

//member variables
  COCXRemote m_Remote;
  HICON m_hLogo;

// Message maps
	//{{AFX_MSG(CAnirRemoteCtrl)
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

// Dispatch maps
	//{{AFX_DISPATCH(CAnirRemoteCtrl)
	afx_msg BOOL Start(short nPort);
	afx_msg BOOL Stop();
	afx_msg short GetPort();
	afx_msg BOOL GetIsStarted();
	//}}AFX_DISPATCH
	DECLARE_DISPATCH_MAP()

	afx_msg void AboutBox();

// Event maps
	//{{AFX_EVENT(CAnirRemoteCtrl)
	void FireProcessReceivedData(short nData, BOOL bRepeat)
		{FireEvent(eventidProcessReceivedData,EVENT_PARAM(VTS_I2  VTS_BOOL), nData, bRepeat);}
	//}}AFX_EVENT
	DECLARE_EVENT_MAP()

// Dispatch and event IDs
public:
	enum {
	//{{AFX_DISP_ID(CAnirRemoteCtrl)
	dispidStart = 1L,
	dispidStop = 2L,
	dispidGetPort = 3L,
	dispidGetIsStarted = 4L,
	eventidProcessReceivedData = 1L,
	//}}AFX_DISP_ID
	};
};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -