Click here to Skip to main content
15,887,370 members
Articles / Desktop Programming / MFC

Job-based Multithreading

Rate me:
Please Sign up or sign in to vote.
1.60/5 (2 votes)
12 May 2002Ms-PL5 min read 110.7K   1.8K   32  
A threadpool class supporting job objects which runs on (almost) all Windows versions
// JMSampleDlg.h : header file
//

#if !defined(AFX_JMSAMPLEDLG_H__38EB89AC_1BDB_4B1D_B7B3_80988B4F34FF__INCLUDED_)
#define AFX_JMSAMPLEDLG_H__38EB89AC_1BDB_4B1D_B7B3_80988B4F34FF__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "jobmanager.h"
#include "FileInfoEx.h"

/////////////////////////////////////////////////////////////////////////////
// CJMSampleDlg dialog

class CJMSampleDlg : public CDialog
{
// Construction
public:
	CJMSampleDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CJMSampleDlg)
	enum { IDD = IDD_JMSAMPLE_DIALOG };
	CComboBox	m_cCombo;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CJMSampleDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CJMSampleDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnSelchangeCombo();
	virtual void OnOK();
	virtual void OnCancel();
	afx_msg void OnClose();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

private:
	CFileInfoExArray m_files;
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_JMSAMPLEDLG_H__38EB89AC_1BDB_4B1D_B7B3_80988B4F34FF__INCLUDED_)

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.

License

This article, along with any associated source code and files, is licensed under The Microsoft Public License (Ms-PL)


Written By
Software Developer (Senior)
Portugal Portugal
Software Smith, Blacksmith, Repeat Founder, Austrian, Asgardian.

Comments and Discussions