root/trunk/BuildListCtrl.cpp

Revision 5, 1.3 kB (checked in by qbert, 6 years ago)

Initial ( and last :( ) commit

Line 
1 // BuildListCtrl.cpp : implementation file
2 //
3
4 #include "stdafx.h"
5 #include "Elephant.h"
6 #include "BuildListCtrl.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 // CBuildListCtrl
16
17 CBuildListCtrl::CBuildListCtrl()
18 {
19 }
20
21 CBuildListCtrl::~CBuildListCtrl()
22 {
23 }
24
25
26 BEGIN_MESSAGE_MAP(CBuildListCtrl, CListCtrl)
27     //{{AFX_MSG_MAP(CBuildListCtrl)
28     ON_WM_RBUTTONDOWN()
29     ON_WM_KEYUP()
30     //}}AFX_MSG_MAP
31 END_MESSAGE_MAP()
32
33 /////////////////////////////////////////////////////////////////////////////
34 // CBuildListCtrl message handlers
35
36 void CBuildListCtrl::OnRButtonDown(UINT nFlags, CPoint point)
37 {
38     LoadAndShowMenu(IDR_BUILDRPT_MENU,point,this); 
39     CListCtrl::OnRButtonDown(nFlags, point);
40    
41    
42 }
43
44
45 void CBuildListCtrl::OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags)
46 {
47     // TODO: Add your message handler code here and/or call default
48
49     if ( nChar == VK_ESCAPE )
50     {
51
52         CMainFrame* m = (CMainFrame*)Globals::theApp.m_pMainWnd;
53         if ( m ){
54        
55         CElephantView* v = m->GetActiveView();
56         if ( v )
57         {
58             CScintillaCtrl& rCtrl = v->GetCtrl();
59             rCtrl.SetFocus();
60         }
61
62         return;
63         }
64        
65
66
67     }
68
69     CListCtrl::OnKeyUp(nChar, nRepCnt, nFlags);
70 }
Note: See TracBrowser for help on using the browser.