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

📄 memorydlg1.h

📁 一个比较详细的操作系统进程同步模拟的例子
💻 H
字号:
#if !defined(AFX_MEMORYDLG1_H__2F6F090D_2466_42B8_AF49_865CB6D0807B__INCLUDED_)
#define AFX_MEMORYDLG1_H__2F6F090D_2466_42B8_AF49_865CB6D0807B__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// MemoryDlg1.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CMemoryDlg dialog
const int MAXSIZE = 10;
struct Partition 
{
	char    startAddr[6];//分区起始地址
	int     size;        //分区大小
	bool    isUse;       //标志分区是否可用
	int     UserID;      //分区的用户ID

};
Partition Memory[MAXSIZE]={{"0ewte",rand()%5 + 5,true},{"0adsf",rand()%5 + 5,true},
{"0rtee",rand()%5 + 5,true},{"0uiou",rand()%5 + 5,true},
{"0qeas",rand()%5 + 5,true},{"0jfgh",rand()%5 + 5,true},
{"0arfg",rand()%5 + 5,true},{"0sdfg",rand()%5 + 5,true},
{"0sfgg",rand()%5 + 5,true},{"0mnbv",rand()%5 + 5,true}};

class CMemoryDlg : public CDialog
{
// Construction
public:
	struct Partition * GetPartition();
	void InitalPartiton();
	void Show();
	struct Partition Memory[MAXSIZE];
	CMemoryDlg(CWnd* pParent = NULL);   // standard constructor
    //struct Partition Memory[MAXSIZE];
// Dialog Data
	//{{AFX_DATA(CMemoryDlg)
	enum { IDD = IDD_DIALOG5 };
	CListCtrl	m_ListCtrl_Memory;
	//}}AFX_DATA


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

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CMemoryDlg)
	virtual BOOL OnInitDialog();
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_MEMORYDLG1_H__2F6F090D_2466_42B8_AF49_865CB6D0807B__INCLUDED_)

⌨️ 快捷键说明

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