Click here to Skip to main content
15,898,588 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to calculate vertical scroll bar's width Pin
Peter, Chan19-Jun-07 21:06
Peter, Chan19-Jun-07 21:06 
AnswerRe: How to calculate vertical scroll bar's width Pin
Nibu babu thomas19-Jun-07 21:35
Nibu babu thomas19-Jun-07 21:35 
GeneralRe: How to calculate vertical scroll bar's width Pin
Peter, Chan19-Jun-07 22:19
Peter, Chan19-Jun-07 22:19 
AnswerRe: How to calculate vertical scroll bar's width Pin
Hamid_RT20-Jun-07 9:09
Hamid_RT20-Jun-07 9:09 
QuestionThread Question {MOD} Pin
Programm3r19-Jun-07 20:59
Programm3r19-Jun-07 20:59 
AnswerRe: Thread Question {MOD} Pin
Cedric Moonen19-Jun-07 21:22
Cedric Moonen19-Jun-07 21:22 
QuestionRe: Thread Question {MOD} Pin
Programm3r19-Jun-07 21:30
Programm3r19-Jun-07 21:30 
AnswerRe: Thread Question {MOD} Pin
Cedric Moonen19-Jun-07 21:43
Cedric Moonen19-Jun-07 21:43 
Programm3r wrote:
If I may be so bold as to ask for an example if it is possible.


Something like this:

class CThread
{
public:
	CThread();
	virtual ~CThread();

	void StartThread();
	void ThreadFunc();

	HANDLE m_hThread;
};


DWORD WINAPI ThreadProc(LPVOID lpParam)
{
	CThread* pThread = (CThread*)lpParam;
	if (pThread)
		pThread->ThreadFunc();
	return 0;
}

CThread::CThread() 
{
}

CThread::~CThread()
{

}

void CThread::StartThread()
{
	m_hThread = CreateThread(NULL,0,ThreadProc,this,0,NULL);
}

void CThread::ThreadFunc()
{
   // Here you can access members of the class in the separate thread
}





Cédric Moonen
Software developer

Charting control [v1.2]

GeneralRe: Thread Question {MOD} Pin
Programm3r19-Jun-07 21:53
Programm3r19-Jun-07 21:53 
QuestionHow to create common memory for two ocx Pin
Surendra Vishwkarma19-Jun-07 19:24
Surendra Vishwkarma19-Jun-07 19:24 
GeneralRe: How to create common memory for two ocx Pin
Matthew Faithfull20-Jun-07 3:54
Matthew Faithfull20-Jun-07 3:54 
QuestionDebug Assertion Failed! _CrtIsValidHeapPointer( pUserData) Pin
Shouvik Das19-Jun-07 18:48
Shouvik Das19-Jun-07 18:48 
AnswerRe: Debug Assertion Failed! _CrtIsValidHeapPointer( pUserData) Pin
Jonathan [Darka]19-Jun-07 21:44
professionalJonathan [Darka]19-Jun-07 21:44 
AnswerRe: Debug Assertion Failed! _CrtIsValidHeapPointer( pUserData) Pin
Mike Dimmick20-Jun-07 4:14
Mike Dimmick20-Jun-07 4:14 
AnswerRe: Debug Assertion Failed! _CrtIsValidHeapPointer( pUserData) Pin
Hamid_RT20-Jun-07 8:59
Hamid_RT20-Jun-07 8:59 
GeneralRe: Debug Assertion Failed! _CrtIsValidHeapPointer( pUserData) Pin
Shouvik Das20-Jun-07 20:40
Shouvik Das20-Jun-07 20:40 
Questionhow to switch from IDR_MAINFRAME to IDR_MENU1 Pin
vikramkarthik19-Jun-07 18:25
vikramkarthik19-Jun-07 18:25 
AnswerRe: how to switch from IDR_MAINFRAME to IDR_MENU1 Pin
Iain Clarke, Warrior Programmer19-Jun-07 23:33
Iain Clarke, Warrior Programmer19-Jun-07 23:33 
AnswerRe: how to switch from IDR_MAINFRAME to IDR_MENU1 Pin
Hamid_RT20-Jun-07 8:59
Hamid_RT20-Jun-07 8:59 
QuestionThread / Memory Pin
Rose8119-Jun-07 17:40
Rose8119-Jun-07 17:40 
AnswerRe: Thread / Memory Pin
Matthew Faithfull20-Jun-07 3:16
Matthew Faithfull20-Jun-07 3:16 
QuestionAn Strange Problem in constructor [modified] Pin
vibindia19-Jun-07 16:16
vibindia19-Jun-07 16:16 
AnswerRe: An Strange Problem in constructor [modified] Pin
George L. Jackson19-Jun-07 16:52
George L. Jackson19-Jun-07 16:52 
AnswerRe: An Strange Problem in constructor Pin
_anil_19-Jun-07 19:30
_anil_19-Jun-07 19:30 
GeneralRe: An Strange Problem in constructor Pin
Jonathan [Darka]19-Jun-07 21:46
professionalJonathan [Darka]19-Jun-07 21:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.