dynamicsheet.h

来自「小型影碟出租企业管理系统」· C头文件 代码 · 共 86 行

H
86
字号
#if !defined(AFX_DYNAMICSHEET_H__B507746D_D6A6_4BA9_89F4_3D57FAC5042B__INCLUDED_)
#define AFX_DYNAMICSHEET_H__B507746D_D6A6_4BA9_89F4_3D57FAC5042B__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "LeaseDisk_Sent_Dialog.h"

#define MAX_PAGE  10

class DIALOGDATA 
{
public:
	 CDialog *m_nDialogPoint;
	 int      m_nIndex;
	 
     DIALOGDATA()
	 {
	   m_nDialogPoint=NULL;
     }

     DIALOGDATA(CDialog *dialoghWnd,int index)
	 {
	   m_nDialogPoint=dialoghWnd;
       m_nIndex=index;
	 }
};

typedef DIALOGDATA * LPDIALOGDATA;

class AFX_EXT_CLASS CDynamicSheet : public CWnd
{

public:
	CDynamicSheet();

    void Create(CWnd *parentWnd,CRect rc,int Style=0);

protected:
	int   m_nCreateStyle;
    CRect m_nClientRect;

    LPDIALOGDATA  DataList[MAX_PAGE];

	int  m_nDialogNumber;
	int  m_ActiveDialogNumber;
	CDialog *m_pCurrentDialog;

	int  m_nToolBarHeight;
	int  m_nStutasHeight;

	int  m_nButtonWidth;
	int  m_nButtonHeight;
    
	CRect m_nNewObjectRc;
public:
    //{{AFX_VIRTUAL(CDynamicSheet)
	//}}AFX_VIRTUAL
public:
	
	virtual ~CDynamicSheet();

protected:
	void GetSmallToolBarButtonRect(CRect *lpNewRc,CRect* lpNewOffsetRc,CRect *lpCloseRc,CRect *lpCloseOffsetRc);
	void DrawButton(CDC *pDC,LPRECT rc,bool bSelected=FALSE);
	void DrawPicture(CDC*pDC,LPRECT rc,UINT resourecID);
	void DrawSmallStutasBar(CDC *pDC,LPRECT rc);
    void DrawToolBar(CDC *pDC,LPRECT rc,bool isSelected=FALSE);
	int GetPointIn(CPoint point);
	void AdjustIndex(int index);
	void DeleteDialog(int index);
	void ShowActiveDialog(int index=0);
	void NewDialog();
	//{{AFX_MSG(CDynamicSheet)
	afx_msg void OnPaint();
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
    afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	//}}AFX_MSG
    DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}

#endif // !defined(AFX_DYNAMICSHEET_H__B507746D_D6A6_4BA9_89F4_3D57FAC5042B__INCLUDED_)

⌨️ 快捷键说明

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