|
|
|
|
|
|
|
|
|
#include "stdafx.h"
|
|
|
|
|
#include "LaiPuLaser.h"
|
|
|
|
|
#include "DlgProgress.h"
|
|
|
|
|
#include "afxdialogex.h"
|
|
|
|
|
#include "GlobalDrawMgr.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define WORK_TIMER1 1
|
|
|
|
|
#define WORK_TIME_DELAY1 20
|
|
|
|
|
|
|
|
|
|
IMPLEMENT_DYNAMIC(CDlgProgress, CDialogEx)
|
|
|
|
|
|
|
|
|
|
CDlgProgress::CDlgProgress(CWnd* pParent /*=NULL*/)
|
|
|
|
|
: CDialogEx(CDlgProgress::IDD, pParent)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CDlgProgress::~CDlgProgress()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CDlgProgress::DoDataExchange(CDataExchange* pDX)
|
|
|
|
|
{
|
|
|
|
|
CDialogEx::DoDataExchange(pDX);
|
|
|
|
|
DDX_Control(pDX, IDC_PROGRESS1, m_WorkProgress1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BEGIN_MESSAGE_MAP(CDlgProgress, CDialogEx)
|
|
|
|
|
ON_WM_TIMER()
|
|
|
|
|
END_MESSAGE_MAP()
|
|
|
|
|
|
|
|
|
|
BOOL CDlgProgress::OnInitDialog()
|
|
|
|
|
{
|
|
|
|
|
CDialogEx::OnInitDialog();
|
|
|
|
|
//<2F><><EFBFBD>öԻ<C3B6><D4BB><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB>
|
|
|
|
|
CRect rect;
|
|
|
|
|
CWnd* pWnd = AfxGetMainWnd();
|
|
|
|
|
pWnd->GetWindowRect(rect);
|
|
|
|
|
|
|
|
|
|
CPoint pos = gDraw->GetProgressDlgPos();
|
|
|
|
|
|
|
|
|
|
MoveWindow(rect.left+pos.x, rect.top+pos.y, 500, 90);
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD>ùرհ<D8B1>ť
|
|
|
|
|
CMenu* pMenu = this->GetSystemMenu(FALSE);
|
|
|
|
|
pMenu->ModifyMenu(SC_CLOSE,MF_BYCOMMAND | MF_GRAYED );
|
|
|
|
|
SetTimer(WORK_TIMER1,WORK_TIME_DELAY1,NULL);
|
|
|
|
|
|
|
|
|
|
UpdateData(FALSE);
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
//<2F>ػ<EFBFBD>һ<EFBFBD><D2BB><EFBFBD>ּ<EFBFBD><D6BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>봫<EFBFBD>ݸ<EFBFBD>view
|
|
|
|
|
BOOL CDlgProgress::PreTranslateMessage(MSG* pMsg)
|
|
|
|
|
{
|
|
|
|
|
if(pMsg->message==WM_KEYDOWN)
|
|
|
|
|
{
|
|
|
|
|
char c = pMsg->wParam;
|
|
|
|
|
if(c==VK_RETURN || c==VK_ESCAPE)
|
|
|
|
|
{
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return CDialogEx::PreTranslateMessage(pMsg);
|
|
|
|
|
}
|
|
|
|
|
void CDlgProgress::OnTimer(UINT nIDEvent)
|
|
|
|
|
{
|
|
|
|
|
if(nIDEvent == WORK_TIMER1)
|
|
|
|
|
{
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
if(m_WorkProgress1.GetPos()>99)
|
|
|
|
|
CDialog::OnOK();
|
|
|
|
|
}
|
|
|
|
|
CDialog::OnTimer(nIDEvent);
|
|
|
|
|
}
|
|
|
|
|
|