📄 notepaddlg.h
字号:
// NotepadDlg.h : header file
//
#if !defined(AFX_NOTEPADDLG_H__DAB25CDE_FEF9_45CD_98AC_913F4241E113__INCLUDED_)
#define AFX_NOTEPADDLG_H__DAB25CDE_FEF9_45CD_98AC_913F4241E113__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
/////////////////////////////////////////////////////////////////////////////
// CNotepadDlg dialog
#include "InputMethddlg.h"
typedef enum NOTE_BTNID
{
NOTE_EXIT,
// NOTE_TITLE,
NOTE_TITLEUP,
NOTE_TITLEONE,
NOTE_TITLETWO,
NOTE_TITLETHREE,
NOTE_TITLEDOWN,
NOTE_TEXT,
NOTE_UPPAGE,
NOTE_DOWNPAGE,
NOTE_NEW, //新建
NOTE_OPEN, //打开
NOTE_SAVE, //保存
NOTE_DEL, //删除
NOTEPAD_END,
};
struct _MYNOTEBTN
{
UINT status;
UINT defbmp;
UINT prebmp;
UINT disbmp;
RECT rectbtn;
};
class CNotepadDlg : public CDialog
{
// Construction
public:
CNotepadDlg(CWnd* pParent = NULL); // standard constructor
void InitResource();
void OnBtnUpPage(); //上翻一页
void OnBtnDownPage(); //下翻一页
void OnNotepadBtnText();
void OnBtnTitleUp();
void OnBtnTitleOne();
void OnBtnTitleTwo();
void OnBtnTitleThree();
void OnBtnTitleDown();
void OnNotepadBtnNew(); //新建
void OnNotepadBtnSave(); //保存
void OnNotepadBtnOpen(); //打开
void OnNotepadBtnDel(); //删除
int GetBtnIDFormPoint(POINT pt);
void DrawNotepadBtnText(int nID, CDC * pDC);
void DrawTextToBackforTZ(CDC *pDC, int charHigh, int charWidth, int left, int top, int right, int bottom,
COLORREF crColor, UINT format, unsigned short *text, unsigned short *type);
CInputMethddlg * pInputDlg;
private:
TCHAR NoteFileName[10];
TCHAR * m_Text; //显示区文字
BOOL m_Firstflag, g_UpPageflag, g_DownPageflag;
TCHAR m_Titleone[7], m_Titletwo[7], m_Titlethree[7];
int g_TitleCount, g_downtitleflag; //总文件名计数,文件名下翻标识
int g_Notetextlen, g_DownRowflag; //总文字数,下翻一行
int g_templen,g_Row, g_col; //最近的回车换行之前的字符串长度,行计数,列计数
int ptext,* pArray ; //上下翻行位置
CBitmap bitmapback, NoteTextbmp;
CBitmap ExitbmpSel,ExitbmpUnsel; //退出按钮
CBitmap TitleBarbmp; //文件名
CBitmap TitleUpbmp,TitleDownbmp; //文件名上下翻
CBitmap UppagebmpSel,UppagebmpUnsel,UppagebmpDis; //上翻一页
CBitmap DownpagebmpSel,DownpagebmpUnsel,DownpagebmpDis; //下翻一页
CBitmap NoteBtnSel, NoteBtnUnsel; //新建,保存,删除按钮
public:
// Dialog Data
//{{AFX_DATA(CNotepadDlg)
enum { IDD = IDD_NOTEPAD_DIALOG };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CNotepadDlg)
public:
virtual BOOL DestroyWindow();
virtual BOOL PreTranslateMessage(MSG* pMsg);
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CNotepadDlg)
virtual BOOL OnInitDialog();
afx_msg void OnPaint();
afx_msg BOOL OnEraseBkgnd(CDC * pDC);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft eMbedded Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_NOTEPADDLG_H__DAB25CDE_FEF9_45CD_98AC_913F4241E113__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -