📄 functions_listctrl.cpp
字号:
// Functions_ListCtrl.cpp : implementation file
//
#include "stdafx.h"
#include "TrafficExecLaw.h"
#include "Functions_ListCtrl.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CFunctions_ListCtrl
CFunctions_ListCtrl::CFunctions_ListCtrl()
{
}
CFunctions_ListCtrl::~CFunctions_ListCtrl()
{
}
BEGIN_MESSAGE_MAP(CFunctions_ListCtrl, CListCtrl)
//{{AFX_MSG_MAP(CFunctions_ListCtrl)
ON_NOTIFY_REFLECT(NM_DBLCLK, OnDblclk)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CFunctions_ListCtrl message handlers
extern CTrafficExecLawApp theApp;
void CFunctions_ListCtrl::OnDblclk(NMHDR* pNMHDR, LRESULT* pResult)
{
// TODO: Add your control notification handler code here
int nSel;
CString str;
nSel=this->GetCurSel ();
this->DoOneFunction (nSel);
*pResult = 0;
}
int CFunctions_ListCtrl::GetCurSel()
{
POSITION po;
po=this->GetFirstSelectedItemPosition ();
if(po!=NULL)
return this->GetNextSelectedItem (po);
return -1;
}
#include "ExecLawSheet_Dlg.h"
void CFunctions_ListCtrl::DoExecLaw()
{
CExecLawSheet_Dlg c_sheet(L"交通执法",this,0);
c_sheet.DoModal ();
}
#include "SearchCar_Dlg.h"
void CFunctions_ListCtrl::DoSearchCar()
{
CSearchCar_Dlg c_scd;
c_scd.DoModal ();
}
void CFunctions_ListCtrl::DoOneFunction(int idFunc)
{
CString str;
switch (idFunc)
{
case 0:
str+=theApp.tcModuleFilePath;
str+=L"\\law.txt";
::WinExec (L"pword.exe",str);
break;
case 1:
break;
case 2:
DoExecLaw();
break;
case 3:
DoSearchCar();
break;
case 4:
DoMessManager();
break;
case 5:
DoPhone();
break;
}
}
#include "MessageManager_Sheet.h"
void CFunctions_ListCtrl::DoMessManager()
{
CMessageManager_Sheet c_mms(L"信息管理",this,0);
c_mms.DoModal ();
}
void CFunctions_ListCtrl::DoPhone()
{
theApp.phonePort.pPhoneTrd ->PostThreadMessage (WU_PHONE_OPEN,0,0);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -