📄 findcombobx.cpp
字号:
// FindComboBx.cpp : implementation file
//
#include "stdafx.h"
#include "Wediter.h"
#include "FindComboBx.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CFindComboBx
CFindComboBx::CFindComboBx()
{
}
CFindComboBx::~CFindComboBx()
{
}
BEGIN_MESSAGE_MAP(CFindComboBx, CComboBox)
//{{AFX_MSG_MAP(CFindComboBx)
ON_CONTROL_REFLECT(CBN_SELCHANGE, OnSelchange)
ON_CONTROL_REFLECT(CBN_KILLFOCUS, OnKillfocus)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CFindComboBx message handlers
void CFindComboBx::OnSelchange()
{
// TODO: Add your control notification handler code here
CString mstr;
GetWindowText(mstr);
if(!mstr.IsEmpty())
{
pview->fd.bfind=TRUE;
pview->fd.text=mstr;
}
}
void CFindComboBx::OnKillfocus()
{
// TODO: Add your control notification handler code here
CString mstr;
GetWindowText(mstr);
if(!mstr.IsEmpty())
{
if(SelectString(0,mstr)==CB_ERR)
{
InsertString(0,mstr);
SetCurSel(0);
}
pview->fd.bfind=TRUE;
pview->fd.text=mstr;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -