note.h

来自「一个提示软件」· C头文件 代码 · 共 56 行

H
56
字号
// Note.h: interface for the CNote class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_NOTE_H__8BFEB8A3_FA1F_11D5_9A92_00A0C9D5029B__INCLUDED_)
#define AFX_NOTE_H__8BFEB8A3_FA1F_11D5_9A92_00A0C9D5029B__INCLUDED_

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

#include "stdafx.h"
#include <time.h>

// CNote class represents the sticky note
class CNote  
{
private:
	CFont m_font;			// default font
	LOGFONT m_lf;			// default structure

public:

	// These data members will be used to set up the default attributes of the new note
	// and they will be persisted into the file to have the note saved.
	// It's ok to declare these data members public since CNote class 
	// is a private member of CNoteDlg class, though the correct way is to use
	// member functions to access them.
	string m_strNoteText;	// note's text		
	string m_strFontName;	// note's name of the font
	LONG m_lFontHeight;		// note's height of the font, in device units
	LONG m_lWeight;			// specifies the weight of the font in the range 0 through 1000
	BOOL m_bItalic;			// specifies an italic font if set to true
	string m_strTimestamp;	// when the note was created
	COLORREF m_clrBkgnd;	// background color
	int m_nID;				// unique note's id, used to identify the note in the collection

	CNote(); 

	CNote(const CNote& rhs);

	~CNote(); 

	bool operator==(const CNote& rhs);

	CNote& operator=(const CNote& rhs);

protected:

	string GenerateTimestamp();

	int GenerateID();
};

#endif // !defined(AFX_NOTE_H__8BFEB8A3_FA1F_11D5_9A92_00A0C9D5029B__INCLUDED_)

⌨️ 快捷键说明

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