BG.cpp
资源名称:ceditor.rar [点击查看]
上传用户:hgtech
上传日期:2022-06-07
资源大小:4455k
文件大小:2k
源码类别:
词法分析
开发平台:
Visual C++
- // BG.cpp : implementation file
- //
- #include "stdafx.h"
- #include "C_Editor.h"
- #include "BG.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // BG
- IMPLEMENT_DYNCREATE(BG, CListView)
- BG::BG()
- {
- }
- BG::~BG()
- {
- }
- BEGIN_MESSAGE_MAP(BG, CListView)
- //{{AFX_MSG_MAP(BG)
- ON_UPDATE_COMMAND_UI(ID_COMPILE_SYNTAX_CHECK, OnUpdateCompileSyntaxCheck)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // BG drawing
- void BG::OnDraw(CDC* pDC)
- {
- CDocument* pDoc = GetDocument();
- // TODO: add draw code here
- }
- /////////////////////////////////////////////////////////////////////////////
- // BG diagnostics
- #ifdef _DEBUG
- void BG::AssertValid() const
- {
- CListView::AssertValid();
- }
- void BG::Dump(CDumpContext& dc) const
- {
- CListView::Dump(dc);
- }
- #endif //_DEBUG
- /////////////////////////////////////////////////////////////////////////////
- // BG message handlers
- BOOL BG::PreCreateWindow(CREATESTRUCT& cs)
- {
- // TODO: Add your specialized code here and/or call the base class
- cs.style=cs.style|LVS_REPORT;
- return CListView::PreCreateWindow(cs);
- }
- void BG::OnInitialUpdate()
- {
- CListView::OnInitialUpdate();
- // TODO: Add your specialized code here and/or call the base class
- CListCtrl &one=GetListCtrl(); //声明one为引用
- LVCOLUMN col;
- col.mask=LVCF_WIDTH;
- if(!one.GetColumn(0,&col))
- {
- one.SetExtendedStyle(LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES|LVS_EX_UNDERLINEHOT);
- one.InsertColumn(0,"错误所在行:",LVCFMT_LEFT,100);
- one.InsertColumn(1," 错误原因:",LVCFMT_LEFT,900);
- }
- }
- void BG::OnUpdateCompileSyntaxCheck(CCmdUI* pCmdUI)
- {
- // TODO: Add your command update UI handler code here
- AfxMessageBox("AfxMessge");
- }