📄 listctrlex.cpp
字号:
// ListCtrlEx.cpp : implementation file
//
#include "stdafx.h"
#include "GpsSC.h"
#include "ListCtrlEx.h"
#include "GpsSCView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CListCtrlEx
CListCtrlEx::CListCtrlEx()
{
m_pCurrView = NULL;
}
CListCtrlEx::~CListCtrlEx()
{
}
BEGIN_MESSAGE_MAP(CListCtrlEx, CListCtrl)
//{{AFX_MSG_MAP(CListCtrlEx)
ON_WM_LBUTTONDBLCLK()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CListCtrlEx message handlers
void CListCtrlEx::OnLButtonDblClk(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
int nItemIndex = -1;
CString strLongitude,strLatitude,strVehicleNO;
nItemIndex = GetNextItem(nItemIndex,LVNI_SELECTED);
if(nItemIndex!=-1)
{
strLongitude = GetItemText(nItemIndex,5);
strLatitude = GetItemText(nItemIndex,6);
strVehicleNO = GetItemText(nItemIndex,1);
if(m_pCurrView!=NULL)
((CGpsSCView*)m_pCurrView)->SendGXGY(strLongitude,strLatitude,strVehicleNO);
}
CListCtrl::OnLButtonDblClk(nFlags, point);
}
void CListCtrlEx::GetViewPoint(CView *pView)
{
m_pCurrView = pView;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -