📄 stmcomshowthread.cpp
字号:
// STMComShowThread.cpp : implementation file
//
#include "stdafx.h"
#include "GSM_Ctrl_Prj.h"
#include "STMComShowThread.h"
#include "ClueOnDlg.h"
#include "Common.h"
#include "afxmt.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
CEvent g_eventTM;
CClueOnDlg CSTMComShowThread::m_clueDlg;// = CClueOnDlg::CClueOnDlg();
/////////////////////////////////////////////////////////////////////////////
// CSTMComShowThread
IMPLEMENT_DYNCREATE(CSTMComShowThread, CWinThread)
CSTMComShowThread::CSTMComShowThread()
{
InitializeCriticalSection(&m_csSend);
}
CSTMComShowThread::~CSTMComShowThread()
{
DeleteCriticalSection(&m_csSend);
}
BOOL CSTMComShowThread::InitInstance()
{
// TODO: perform and per-thread initialization here
return TRUE;
}
int CSTMComShowThread::ExitInstance()
{
// TODO: perform any per-thread cleanup here
return CWinThread::ExitInstance();
}
BEGIN_MESSAGE_MAP(CSTMComShowThread, CWinThread)
//{{AFX_MSG_MAP(CSTMComShowThread)
// NOTE - the ClassWizard will add and remove mapping macros here.
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CSTMComShowThread message handlers
int CSTMComShowThread::Run()
{
// TODO: Add your specialized code here and/or call the base class
int res;
while (1)
{
WaitForSingleObject(g_eventTM.m_hObject,INFINITE);
EnterCriticalSection(&m_csSend);
res = m_clueDlg.DoModal();
LeaveCriticalSection(&m_csSend);
// if(res==IDOK){
// AfxGetMainWnd()->SendMessage(MSG_CALL_OR_MSG_IN,CALL_ACCEPT,0L);
// }else if(res==IDCANCEL){
// AfxGetMainWnd()->SendMessage(MSG_CALL_OR_MSG_IN,CALL_HUNGUP,0L);
// }
}
return CWinThread::Run();
}
void CSTMComShowThread::SetShowMsg(CString str){
m_strMsg = str;
if (CClueOnDlg::m_isShow)
{
m_clueDlg.SetShowStr(m_strMsg);
m_clueDlg.SetDlgItemText(IDC_TELCLUE,m_strMsg);
}else
m_clueDlg.SetShowStr(m_strMsg);
}
bool CSTMComShowThread::IsDlgShow(){
if (CClueOnDlg::m_isShow)
return true;
else
return false;
}
void CSTMComShowThread::EnableDlgOK(bool flg){
m_clueDlg.EnableOKBtn(flg);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -