Click here to Skip to main content
15,886,919 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how to identify the drive type? Pin
VCProgrammer4-Sep-12 22:15
VCProgrammer4-Sep-12 22:15 
GeneralRe: how to identify the drive type? Pin
Richard MacCutchan4-Sep-12 23:00
mveRichard MacCutchan4-Sep-12 23:00 
GeneralRe: how to identify the drive type? Pin
VCProgrammer5-Sep-12 2:54
VCProgrammer5-Sep-12 2:54 
GeneralRe: how to identify the drive type? Pin
Richard MacCutchan5-Sep-12 3:06
mveRichard MacCutchan5-Sep-12 3:06 
GeneralRe: how to identify the drive type? Pin
VCProgrammer5-Sep-12 21:36
VCProgrammer5-Sep-12 21:36 
GeneralRe: how to identify the drive type? Pin
Richard MacCutchan5-Sep-12 23:12
mveRichard MacCutchan5-Sep-12 23:12 
GeneralRe: how to identify the drive type? Pin
VCProgrammer12-Sep-12 23:16
VCProgrammer12-Sep-12 23:16 
QuestionHelp with threads Pin
AndrewG12314-Sep-12 9:31
AndrewG12314-Sep-12 9:31 
In the code for part of a project I am working on is the following use of a thread:

if(txt == "Start" && UpdateData(true))
	{
		
		// reserve instrument
		if(!m_inst->StartOperation())
		{
			MessageBox("The Instrument is Currently in use by another function");
			return;
		}
		
		
		if(! CreateData(m_MaxFreq, m_Resolution))
			return;
		
		EnableItems(false);
		m_Continue = true;
		m_datacount = 0;
		GetDlgItem(IDC_SPECTRUM_START)->SetWindowText("Stop");
		
		m_Thread = AfxBeginThread(Acq_Data,this,THREAD_PRIORITY_HIGHEST);
	
		
		return;	
}


My goal is to make the data acquired and then displayed continuously. I tried to just loop the thread, but this did not work. I realize I may have to modify the member function the thread calls (Acq_Data), but I am not sure. If someone has a good suggestion (or general thread advice) it would be great help. I can also provide more info if needed (as there is little additional code provided in this initial post relating to the other member functions).

Thanks!
AnswerRe: Help with threads Pin
pasztorpisti4-Sep-12 10:01
pasztorpisti4-Sep-12 10:01 
SuggestionRe: Help with threads Pin
David Crow4-Sep-12 10:09
David Crow4-Sep-12 10:09 
GeneralRe: Help with threads Pin
AndrewG12314-Sep-12 10:17
AndrewG12314-Sep-12 10:17 
SuggestionRe: Help with threads Pin
pasztorpisti4-Sep-12 12:09
pasztorpisti4-Sep-12 12:09 
QuestionRe: Help with threads Pin
AndrewG12314-Sep-12 13:37
AndrewG12314-Sep-12 13:37 
AnswerRe: Help with threads Pin
pasztorpisti4-Sep-12 14:18
pasztorpisti4-Sep-12 14:18 
GeneralRe: Help with threads Pin
Joe Woodbury4-Sep-12 17:16
professionalJoe Woodbury4-Sep-12 17:16 
GeneralRe: Help with threads Pin
pasztorpisti4-Sep-12 22:33
pasztorpisti4-Sep-12 22:33 
GeneralRe: Help with threads Pin
Albert Holguin5-Sep-12 12:23
professionalAlbert Holguin5-Sep-12 12:23 
GeneralRe: Help with threads Pin
Richard MacCutchan4-Sep-12 22:06
mveRichard MacCutchan4-Sep-12 22:06 
QuestionRe: Help with threads Pin
David Crow5-Sep-12 3:15
David Crow5-Sep-12 3:15 
AnswerRe: Help with threads Pin
pasztorpisti5-Sep-12 3:31
pasztorpisti5-Sep-12 3:31 
GeneralRe: Help with threads Pin
David Crow5-Sep-12 3:46
David Crow5-Sep-12 3:46 
GeneralRe: Help with threads Pin
pasztorpisti5-Sep-12 3:55
pasztorpisti5-Sep-12 3:55 
GeneralRe: Help with threads Pin
Albert Holguin5-Sep-12 12:26
professionalAlbert Holguin5-Sep-12 12:26 
AnswerRe: Help with threads Pin
Chuck O'Toole5-Sep-12 3:57
Chuck O'Toole5-Sep-12 3:57 
GeneralRe: Help with threads Pin
Albert Holguin5-Sep-12 12:25
professionalAlbert Holguin5-Sep-12 12:25 

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.