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

📄 eatingdlg.h

📁 本程序是操作系统中比较典型的线程同步算法中的哲学家进餐问题,为防止死锁,采取了两个条件(筷子空闲)同时满足时再允许进餐的办法来解决。期望与大家一起学习交流!
💻 H
字号:
// eatingDlg.h : header file
//

#if !defined(AFX_EATINGDLG_H__84BAE4F1_5806_4E53_86FE_DBCA4F50676E__INCLUDED_)
#define AFX_EATINGDLG_H__84BAE4F1_5806_4E53_86FE_DBCA4F50676E__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

/////////////////////////////////////////////////////////////////////////////
// CEatingDlg dialog
#include "GradientStatic.h"
#include "eatingStruct.h"




class CEatingDlg : public CDialog
{
// Construction
public:
	CEatingDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CEatingDlg)
	enum { IDD = IDD_EATING_DIALOG };
	CSliderCtrl	m_AdjustSpeed;
	CButton	m_okBtn;
	CButton	m_stopBtn;
	CButton	m_beginBtn;
	CGradientStatic	m_wndView;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CEatingDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	void InitStruct();
	HICON m_hIcon;
	Thinkers m_thinker;
	CFont font;
	BOOL  m_HasInit;
	int speed;

	// Generated message map functions
	//{{AFX_MSG(CEatingDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnBtnBegin();
	afx_msg void OnBtnStop();
	virtual void OnOK();
	afx_msg void OnDestroy();
	afx_msg void OnOutofmemorySlider1(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnCustomdrawSlider1(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnButton1();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_EATINGDLG_H__84BAE4F1_5806_4E53_86FE_DBCA4F50676E__INCLUDED_)

⌨️ 快捷键说明

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