|
#pragma once
#include "resource.h"
#include "ViewTaskList.h"
// CFormTask form view
class CFormTask : public CFormView
{
DECLARE_DYNCREATE(CFormTask)
protected:
CFormTask(); // protected constructor used by dynamic creation
virtual ~CFormTask();
public:
enum { IDD = IDD_FORM };
#ifdef _DEBUG
virtual void AssertValid() const;
#ifndef _WIN32_WCE
virtual void Dump(CDumpContext& dc) const;
#endif
#endif
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
DECLARE_MESSAGE_MAP()
public:
virtual void OnInitialUpdate();
afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct);
afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
afx_msg void OnUpdateFileOpen(CCmdUI *pCmdUI);
afx_msg void OnFileOpen();
afx_msg void OnBnClickedBtnBrowse();
afx_msg void OnBnClickedStart();
afx_msg void OnBnClickedRadioShutdown();
afx_msg void OnBnClickedRadioClose();
afx_msg void OnBnClickedRadioActionnone();
afx_msg LRESULT OnTaskSetParamFinished(WPARAM wParam, LPARAM lParam);
afx_msg LRESULT OnTaskExecState(WPARAM wParam, LPARAM lParam);
afx_msg LRESULT OnScheduleFinished (WPARAM wParam, LPARAM lParam);
public:
void Init(CViewTaskList* pView) { m_pViewTaskList = pView;};
void WaitScheduleThreadEnd() {
if (m_hThread) {
::PostThreadMessage(m_dwThreadID, WM_QUIT,0,0); // if m_dwThreadID valid then we archived out goal, otherwise, nothing bad.
::WaitForSingleObject(m_hThread, INFINITE);
}
};
protected:
CThreadSchedule* m_pThread; // schedule thread.
DWORD m_dwThreadID; // stores schedule thread id
HANDLE m_hThread; // schedule thread handle, used to wait for it to end first.
CString m_sUsr;
CString m_sPwd;
CString m_sSvr;
CString m_sTaskFileName;
CViewTaskList* m_pViewTaskList;
};
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.