📄 lifedlg.h
字号:
// LifeDlg.h : header file
//
#if !defined(AFX_LIFEDLG_H__22A3508A_A898_11D3_B05F_0080C8F1A0D3__INCLUDED_)
#define AFX_LIFEDLG_H__22A3508A_A898_11D3_B05F_0080C8F1A0D3__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
const iWMax=200; //宽度
const iHMax=200; //高度
const iHor=10; //横坐标
const iVer=30; //纵坐标
/////////////////////////////////////////////////////////////////////////////
// CLifeDlg dialog
class CLifeDlg : public CDialog
{
// Construction
public:
CLifeDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CLifeDlg)
enum { IDD = IDD_LIFE_DIALOG };
float m_dens;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CLifeDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
double dRand; //控制生命点出现频率
CToolBar m_ToolLife;
bool bPause; //是否暂停演化
COLORREF colBK; //背景颜色
COLORREF colLife; //生命颜色
COLORREF colDie; //死亡颜色
void OnOK();
int iTime; //生命演化一代的时间间隔
//用刻度条控制
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CLifeDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnBegin();
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnExit();
afx_msg void OnStop();
afx_msg void OnInitMenu();
afx_msg void OnOpen();
afx_msg void OnSet();
afx_msg void OnAbout();
afx_msg void OnExitMenuLoop();
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnClear();
afx_msg void OnRandom();
afx_msg void OnSave();
afx_msg void OnChangeDensEdit();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_LIFEDLG_H__22A3508A_A898_11D3_B05F_0080C8F1A0D3__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -