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

📄 demopanel.h

📁 模拟电子课程的教学演示程序
💻 H
字号:
#if !defined(AFX_DEMOPANEL_H__711C745E_B63A_4A40_8DCD_E5E0839CA7BE__INCLUDED_)
#define AFX_DEMOPANEL_H__711C745E_B63A_4A40_8DCD_E5E0839CA7BE__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// DemoPanel.h : header file
//
#include <afxtempl.h>

/////////////////////////////////////////////////////////////////////////////
// CDemoPanel window
struct PAGEINFO 
{
	CWnd*		pPage;
	WNDPROC 	pOldProc;	
	BOOL		bAutoDestroy;	
	int order;
};

#define PANEL_UP 0
#define PANEL_DOWN 1
#define PANEL_LEFT 2
#define PANEL_RIGHT 3

#define PANEL_TIMER WM_USER+111

class CDemoPanel : public CWnd
{
// Construction
public:
	CDemoPanel();

	BOOL Create(DWORD dwExStyle, DWORD dwStyle, UINT nPlaceholderID,
		CWnd* pParentWnd, UINT nID = 0);
	BOOL Create(DWORD dwExStyle, DWORD dwStyle, const RECT& rect, 
		CWnd* pParentWnd, UINT nID = 0);

    void AddPage(LPCTSTR caption, UINT nIDTemplate, CRuntimeClass* rtc,int order,BOOL bAutoDel=TRUE);
	int ShowPage(int i);
    void SetSpeed(int nSpeed);
	void SetStyle(int style);
public:
	static LPCTSTR m_lpszClassName;

	CRect m_rcClient;        //客户区大小
	CWnd *m_Parent;          //父窗口指针

	int m_xStartPos,m_yStartPos;
	int m_Style;
	int m_nSpeed;
	int m_iCurPage;
	int m_iOldPage;

	CArray<PAGEINFO*,PAGEINFO*>m_PageList;
	static LRESULT CALLBACK WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
	void RecalLayout();
// Attributes
public:

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CDemoPanel)
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CDemoPanel();

	// Generated message map functions
protected:
	//{{AFX_MSG(CDemoPanel)
	afx_msg void OnPaint();
	afx_msg void OnTimer(UINT nIDEvent);
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_DEMOPANEL_H__711C745E_B63A_4A40_8DCD_E5E0839CA7BE__INCLUDED_)

⌨️ 快捷键说明

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