AgentManager/DLG_Process.cpp
2025-01-22 15:45:17 +08:00

82 lines
1.6 KiB
C++

// DLG_Process.cpp : implementation file
//
#include "stdafx.h"
#include "smsmanager.h"
#include "DLG_Process.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// DLG_Process dialog
DLG_Process::DLG_Process(CWnd* pParent /*=NULL*/)
: CDialog(DLG_Process::IDD, pParent)
{
//{{AFX_DATA_INIT(DLG_Process)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
memset( m_szTitle , 0 , sizeof(m_szTitle) );
m_bInit = false;
}
void DLG_Process::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(DLG_Process)
DDX_Control(pDX, IDC_PROCESS_PROCESS, m_Process);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(DLG_Process, CDialog)
//{{AFX_MSG_MAP(DLG_Process)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// DLG_Process message handlers
void DLG_Process::SetProcess(long lAll, long lCur)
{
if (m_bInit)
{
m_Process.SetRange32(0, lAll);
m_Process.SetPos(lCur);
if (lCur >= lAll)
{
m_bInit = false;
CDialog::OnOK();
}
}
}
void DLG_Process::SetProcessTitle(const TCHAR *pMsg)
{
_tcscpy(m_szTitle , pMsg );
if (m_bInit && _tcslen(m_szTitle) > 0)
SetWindowText(m_szTitle);
}
BOOL DLG_Process::OnInitDialog()
{
CDialog::OnInitDialog();
m_Process.SetRange( 0 , 100 );
if ( _tcslen(m_szTitle)>0)
SetWindowText( m_szTitle );
m_bInit = true;
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}