Click here to Skip to main content
15,881,898 members
Articles / Programming Languages / C++

Combinations in C++, Part 2

Rate me:
Please Sign up or sign in to vote.
4.81/5 (30 votes)
12 Apr 2016CPOL15 min read 102.8K   2.3K   50  
Introduce 4 new algorithms on finding combinations
// TimeCombinationsDlg.h : header file
//

#pragma once
#include "afxwin.h"
#include "FindTotalComb.h"



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

// Dialog Data
	enum { IDD = IDD_TIMECOMBINATIONS_DIALOG };

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support


// Implementation
protected:
	bool VerifyInput();
	void EnableCtrls(BOOL bEnable);

	HICON m_hIcon;
	UINT m_nNumberOfProcessors;
	UINT m_nUseNumThread;
	UINT m_nR;
	UINT m_nN;
	UINT m_nTimes;
	CString szTotalComb;

	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()
public:
	CButton m_chkCpus;
	CEdit m_edtR;
	CEdit m_edtN;
	CEdit m_edtNumThreads;
	CStatic m_staticNumThreads;
	CEdit m_edtNumTimes;
	CButton m_btnFind;
	afx_msg void OnBnClickedChkCpus();
	afx_msg void OnBnDoubleclickedChkCpus();
	afx_msg void OnBnClickedFind();
	afx_msg LRESULT OnTaskDone(WPARAM wParam, LPARAM lParam);
};

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 Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Singapore Singapore
Shao Voon is from Singapore. His interest lies primarily in computer graphics, software optimization, concurrency, security, and Agile methodologies.

In recent years, he shifted focus to software safety research. His hobby is writing a free C++ DirectX photo slideshow application which can be viewed here.

Comments and Discussions