Click here to Skip to main content
12,548,514 members (46,979 online)
Click here to Skip to main content


158 bookmarked

Threads with MFC

, 1 Feb 2003
Multithreading Programming with a MFC environment.
// Threads.h : main header file for the THREADS application

#if !defined(AFX_THREADS_H__FD617454_1520_401D_9D9A_8F021E336709__INCLUDED_)
#define AFX_THREADS_H__FD617454_1520_401D_9D9A_8F021E336709__INCLUDED_

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

#ifndef __AFXWIN_H__
	#error include 'stdafx.h' before including this file for PCH
#define RUNNING true
#define END false
#include "resource.h"		// main symbols
#include <stdio.h>
#include <stdlib.h>
#include <time.h>

// CThreadsApp:
// See Threads.cpp for the implementation of this class

class CThreadsApp : public CWinApp
	void PaintEndLine(COLORREF winersColor);
	//COLORREF m_winersColor;
	bool m_winner;
	void CreateFilesForSlidersPosition();
	bool m_SpeakerEnable;
	void Initialize();
	bool m_Thread5_LoopType;
	bool m_Thread4_LoopType;
	bool m_Thread3_LoopType;
	bool m_Thread2_LoopType;
	bool m_Thread1_LoopType;
	time_t m_ThreadsActivationTime;
	time_t m_ThreadsCreationTime;
	bool m_ThreadsState;
	int m_shift5;
	int m_shift4;
	int m_shift3;
	int m_shift2;
	int m_shift1;
//Setting an array of Thraeds pointers
	CWinThread* m_pThreads[5];
// Overrides
	// ClassWizard generated virtual function overrides
	virtual BOOL InitInstance();

// Implementation

		// NOTE - the ClassWizard will add and remove member functions here.
		//    DO NOT EDIT what you see in these blocks of generated code !

extern CThreadsApp theApp;

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

#endif // !defined(AFX_THREADS_H__FD617454_1520_401D_9D9A_8F021E336709__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.


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


About the Author

Aria Ansari
Software Developer
Denmark Denmark
No Biography provided

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.161021.1 | Last Updated 2 Feb 2003
Article Copyright 2003 by Aria Ansari
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid