📄 myedit.cpp
字号:
// Myedit.cpp : implementation file
//
#include "stdafx.h"
#include "ebook.h"
#include "Myedit.h"
#include "ebookDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// Myedit
int ydown;
int yup;
Myedit::Myedit()
{
}
Myedit::~Myedit()
{
}
BEGIN_MESSAGE_MAP(Myedit, CEdit)
//{{AFX_MSG_MAP(Myedit)
ON_WM_LBUTTONDBLCLK()
ON_WM_LBUTTONDOWN()
ON_WM_LBUTTONUP()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// Myedit message handlers
void Myedit::OnLButtonDblClk(UINT nFlags, CPoint point)//封装一个Edit
{
// TODO: Add your message handler code here and/or call default
SetWindowPos(NULL,28,20,622,355,SWP_SHOWWINDOW );
CEdit::OnLButtonDblClk(nFlags, point);
}
void Myedit::OnLButtonDown(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
ydown=point.y;
CEdit::OnLButtonDown(nFlags, point);
}
void Myedit::OnLButtonUp(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
CEbookDlg *MyCEbook;
MyCEbook=( CEbookDlg *)GetParent();//得到父亲窗口
yup=point.y;
if (ydown<yup)
{
MyCEbook->Down();
}
if (ydown>yup)
{
MyCEbook->Up();
}
CEdit::OnLButtonUp(nFlags, point);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -