1 Star 0 Fork 2

issicc/AutoPHS

forked from leegoobin/AutoPHS 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
statusbarthread.cpp 1.59 KB
一键复制 编辑 原始数据 按行查看 历史
uksoft 提交于 2014-11-26 16:31 . VSS代码移植到Git
// StatusBarThread.cpp : implementation file
//
#include "stdafx.h"
#include "autophs.h"
#include "StatusBarThread.h"
#include "FrmStatus.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CStatusBarThread
IMPLEMENT_DYNCREATE(CStatusBarThread, CWinThread)
CStatusBarThread::CStatusBarThread()
{
}
CStatusBarThread::~CStatusBarThread()
{
}
BOOL CStatusBarThread::InitInstance()
{
// TODO: perform and per-thread initialization here
m_bAutoDelete = TRUE;//߳Լ
CWnd wnd;
wnd.m_hWnd=NULL;
m_StatusBar.m_bThread=TRUE;
if( !IsWindow(m_StatusBar.GetSafeHwnd()) )
{
m_StatusBar.Create(IDD_STATUS,&wnd);
}
m_pMainWnd=&m_StatusBar;
m_pMainWnd->ShowWindow(SW_SHOW);
m_pMainWnd->UpdateWindow();
m_StatusBar.m_btnStop.ShowWindow(SW_SHOW);
SetEvent(hStatusCreateEvent);
return TRUE;
}
int CStatusBarThread::ExitInstance()
{
// TODO: perform any per-thread cleanup here
if(IsWindow(m_pMainWnd->GetSafeHwnd()))
{
//m_pMainWnd->DestroyWindow();
m_pMainWnd->ShowWindow(SW_HIDE);
}
return CWinThread::ExitInstance();
}
BEGIN_MESSAGE_MAP(CStatusBarThread, CWinThread)
//{{AFX_MSG_MAP(CStatusBarThread)
// NOTE - the ClassWizard will add and remove mapping macros here.
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CStatusBarThread message handlers
void CStatusBarThread::EndThread()
{
if(IsWindow(m_pMainWnd->GetSafeHwnd()))
{
//m_pMainWnd->DestroyWindow();
m_pMainWnd->ShowWindow(SW_HIDE);
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/issicccc/AutoPHS.git
git@gitee.com:issicccc/AutoPHS.git
issicccc
AutoPHS
AutoPHS
CAE

搜索帮助