|
Revision 5, 1.3 kB
(checked in by qbert, 6 years ago)
|
Initial ( and last :( ) commit
|
| Line | |
|---|
| 1 |
// BuildEditCtrl.cpp : implementation file |
|---|
| 2 |
// |
|---|
| 3 |
|
|---|
| 4 |
#include "stdafx.h" |
|---|
| 5 |
#include "Elephant.h" |
|---|
| 6 |
#include "BuildEditCtrl.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 |
// CBuildEditCtrl |
|---|
| 16 |
|
|---|
| 17 |
CBuildEditCtrl::CBuildEditCtrl() |
|---|
| 18 |
{ |
|---|
| 19 |
|
|---|
| 20 |
} |
|---|
| 21 |
|
|---|
| 22 |
CBuildEditCtrl::~CBuildEditCtrl() |
|---|
| 23 |
{ |
|---|
| 24 |
} |
|---|
| 25 |
|
|---|
| 26 |
|
|---|
| 27 |
BEGIN_MESSAGE_MAP(CBuildEditCtrl, CEdit) |
|---|
| 28 |
//{{AFX_MSG_MAP(CBuildEditCtrl) |
|---|
| 29 |
ON_WM_LBUTTONDBLCLK() |
|---|
| 30 |
ON_WM_RBUTTONDOWN() |
|---|
| 31 |
//}}AFX_MSG_MAP |
|---|
| 32 |
END_MESSAGE_MAP() |
|---|
| 33 |
|
|---|
| 34 |
///////////////////////////////////////////////////////////////////////////// |
|---|
| 35 |
// CBuildEditCtrl message handlers |
|---|
| 36 |
|
|---|
| 37 |
void CBuildEditCtrl::OnLButtonDblClk(UINT nFlags, CPoint point) |
|---|
| 38 |
{ |
|---|
| 39 |
|
|---|
| 40 |
int line = HIWORD(CharFromPos(point ) ); |
|---|
| 41 |
char buf[4096]; |
|---|
| 42 |
GetLine(line,buf,4096 ); |
|---|
| 43 |
|
|---|
| 44 |
string file; |
|---|
| 45 |
string text(buf); |
|---|
| 46 |
int num; |
|---|
| 47 |
|
|---|
| 48 |
if (GetFileAndLineNumber(text, num, file) ) { |
|---|
| 49 |
if (file.find("_random") == string::npos ) static_cast<CMainFrame*>(Globals::theApp.m_pMainWnd)->GotoFileAndLineNumber(file,num,buf); |
|---|
| 50 |
} |
|---|
| 51 |
|
|---|
| 52 |
//this->SetSel(0,0,true ); |
|---|
| 53 |
//CEdit::OnLButtonDblClk(nFlags, point); |
|---|
| 54 |
} |
|---|
| 55 |
|
|---|
| 56 |
void CBuildEditCtrl::OnRButtonDown(UINT nFlags, CPoint point) |
|---|
| 57 |
{ |
|---|
| 58 |
|
|---|
| 59 |
LoadAndShowMenu(IDR_BUILDRPT_MENU,point,this); |
|---|
| 60 |
CEdit::OnRButtonDown(nFlags, point); |
|---|
| 61 |
|
|---|
| 62 |
} |
|---|