ag_finddialog.cpp

来自「一个外国人写的词法分析程序」· C++ 代码 · 共 56 行

CPP
56
字号
// AG_FindDialog.cpp : implementation file
//

#include "stdafx.h"
#include "RegExDemo.h"
#include "AG_FindDialog.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CAG_FindDialog dialog


CAG_FindDialog::CAG_FindDialog(CWnd* pParent /*=NULL*/)
	: CDialog(CAG_FindDialog::IDD, pParent)
{
	//{{AFX_DATA_INIT(CAG_FindDialog)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void CAG_FindDialog::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CAG_FindDialog)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CAG_FindDialog, CDialog)
	//{{AFX_MSG_MAP(CAG_FindDialog)
	ON_BN_CLICKED(IDC_CLOSE_BUTTON, OnCloseButton)
	ON_BN_CLICKED(IDC_FIND_NEXT, OnFindNext)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CAG_FindDialog message handlers

void CAG_FindDialog::OnCloseButton() 
{
	ShowWindow(SW_HIDE);
}

void CAG_FindDialog::OnFindNext() 
{
	if(AfxGetMainWnd()->SendMessage(WM_FIND_NEXT, 0, 0) == -1)
		AfxMessageBox(_T("Done!"));
}

⌨️ 快捷键说明

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