|
Revision 5, 1.3 kB
(checked in by qbert, 6 years ago)
|
Initial ( and last :( ) commit
|
| Line | |
|---|
| 1 |
// ReplaceEdit.cpp : implementation file |
|---|
| 2 |
// |
|---|
| 3 |
|
|---|
| 4 |
#include "stdafx.h" |
|---|
| 5 |
#include "replaceEdit.h" |
|---|
| 6 |
#include "mainfrm.h" |
|---|
| 7 |
|
|---|
| 8 |
#ifdef _DEBUG |
|---|
| 9 |
#define new DEBUG_NEW |
|---|
| 10 |
#undef THIS_FILE |
|---|
| 11 |
static char THIS_FILE[] = __FILE__; |
|---|
| 12 |
#endif |
|---|
| 13 |
|
|---|
| 14 |
///////////////////////////////////////////////////////////////////////////// |
|---|
| 15 |
// CReplaceEdit |
|---|
| 16 |
|
|---|
| 17 |
CReplaceEdit::CReplaceEdit() |
|---|
| 18 |
{ |
|---|
| 19 |
} |
|---|
| 20 |
|
|---|
| 21 |
CReplaceEdit::~CReplaceEdit() |
|---|
| 22 |
{ |
|---|
| 23 |
} |
|---|
| 24 |
|
|---|
| 25 |
|
|---|
| 26 |
BEGIN_MESSAGE_MAP(CReplaceEdit, CXTFlatEdit) |
|---|
| 27 |
//{{AFX_MSG_MAP(CReplaceEdit) |
|---|
| 28 |
ON_WM_KEYUP() |
|---|
| 29 |
//}}AFX_MSG_MAP |
|---|
| 30 |
END_MESSAGE_MAP() |
|---|
| 31 |
|
|---|
| 32 |
///////////////////////////////////////////////////////////////////////////// |
|---|
| 33 |
// CReplaceEdit message handlers |
|---|
| 34 |
|
|---|
| 35 |
void CReplaceEdit::OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags) |
|---|
| 36 |
{ |
|---|
| 37 |
|
|---|
| 38 |
if ( nChar == VK_ESCAPE ) { |
|---|
| 39 |
|
|---|
| 40 |
CMainFrame* m = (CMainFrame*)Globals::theApp.m_pMainWnd; |
|---|
| 41 |
if ( m ){ |
|---|
| 42 |
m->ShowControlBar(&(m->m_wndFindToolBar),false,false); |
|---|
| 43 |
CElephantView* v = m->GetActiveView(); |
|---|
| 44 |
if ( v ) |
|---|
| 45 |
{ |
|---|
| 46 |
CScintillaCtrl& rCtrl = v->GetCtrl(); |
|---|
| 47 |
rCtrl.SetFocus(); |
|---|
| 48 |
} |
|---|
| 49 |
|
|---|
| 50 |
return; |
|---|
| 51 |
} |
|---|
| 52 |
// MDIActivate( |
|---|
| 53 |
|
|---|
| 54 |
} |
|---|
| 55 |
|
|---|
| 56 |
|
|---|
| 57 |
if ( nChar == VK_RETURN ) { |
|---|
| 58 |
CMainFrame* m = (CMainFrame*)Globals::theApp.m_pMainWnd; |
|---|
| 59 |
if ( m ){ |
|---|
| 60 |
m->OnFindBarReplace(); |
|---|
| 61 |
} |
|---|
| 62 |
} |
|---|
| 63 |
|
|---|
| 64 |
CXTFlatEdit::OnKeyUp(nChar, nRepCnt, nFlags); |
|---|
| 65 |
} |
|---|