Click here to Skip to main content
15,920,031 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to call a function inside a thread Pin
Stephen Hewitt8-Nov-06 12:32
Stephen Hewitt8-Nov-06 12:32 
GeneralRe: How to call a function inside a thread Pin
Llasus8-Nov-06 12:41
Llasus8-Nov-06 12:41 
GeneralRe: How to call a function inside a thread Pin
Stephen Hewitt8-Nov-06 12:44
Stephen Hewitt8-Nov-06 12:44 
GeneralRe: How to call a function inside a thread Pin
Llasus8-Nov-06 13:00
Llasus8-Nov-06 13:00 
GeneralRe: How to call a function inside a thread Pin
Stephen Hewitt8-Nov-06 13:05
Stephen Hewitt8-Nov-06 13:05 
GeneralRe: How to call a function inside a thread Pin
Llasus8-Nov-06 13:13
Llasus8-Nov-06 13:13 
GeneralRe: How to call a function inside a thread Pin
Stephen Hewitt8-Nov-06 13:15
Stephen Hewitt8-Nov-06 13:15 
GeneralRe: How to call a function inside a thread Pin
Llasus8-Nov-06 13:27
Llasus8-Nov-06 13:27 
Ok here are cutout of the codes that i have..

in LPAServerDlg.h
class CLPAServerDlg : public CDialog<br />
{<br />
// 構築<br />
public:<br />
        //some declaration here<br />
	void AddListItem(CString strbufffn, CString strbuffip,<br />
		CString strbuffdate, CString strbuffstat);<br />
        //some declaration here<br />
}


in LPAServerDlg.cpp
//headers and definitions<br />
DWORD WINAPI ListenThread(LPVOID lParam);<br />
DWORD WINAPI ReceiveThread(LPVOID lParam); //heres the thread<br />
<br />
class CAboutDlg : public CDialog<br />
{<br />
//codes here<br />
};<br />
<br />
CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)<br />
{<br />
//codes here<br />
}<br />
//more codes here<br />
<br />
DWORD WINAPI ReceiveThread(LPVOID lParam)<br />
{<br />
...codes<br />
AddListItem(strbufffn, strbuffipa, "Time", "Printing");<br />
...codes<br />
}<br />
<br />
DWORD WINAPI ListenThread(LPVOID lParam)<br />
{<br />
..codes<br />
hThread = CreateThread(0, 0, ReceiveThread, (LPVOID)Message, 0, NULL);<br />
..codes<br />
}<br />
<br />
void CLPAServerDlg::AddListItem(CString strbufffn, CString strbuffip,<br />
		CString strbuffdate, CString strbuffstat)<br />
{<br />
	int nItem;<br />
<br />
	nItem = m_ListFile.InsertItem(0,strbufffn);<br />
	m_ListFile.SetItemText(nItem, 1,strbuffip);<br />
	m_ListFile.SetItemText(nItem, 2,strbuffdate);<br />
	m_ListFile.SetItemText(nItem, 3,strbuffstat);<br />
}<br />


error C2440: '=' : from 'void (__thiscall CLPAServerDlg::*)(class CString,class CString,class CString,class CString)' to 'void (__cdecl *)(class CString,class CString
,class CString,class CString)' cannot change. (see the new of operation ; help)

sorry bout the error message.. its all in japanese and i just translated it. Thanks again for all your time and help!
GeneralRe: How to call a function inside a thread Pin
Stephen Hewitt8-Nov-06 14:01
Stephen Hewitt8-Nov-06 14:01 
GeneralRe: How to call a function inside a thread Pin
Llasus8-Nov-06 14:09
Llasus8-Nov-06 14:09 
GeneralRe: How to call a function inside a thread Pin
Stephen Hewitt8-Nov-06 14:12
Stephen Hewitt8-Nov-06 14:12 
GeneralRe: How to call a function inside a thread Pin
Llasus8-Nov-06 14:25
Llasus8-Nov-06 14:25 
GeneralRe: How to call a function inside a thread Pin
Stephen Hewitt8-Nov-06 14:28
Stephen Hewitt8-Nov-06 14:28 
GeneralRe: How to call a function inside a thread Pin
Llasus8-Nov-06 14:32
Llasus8-Nov-06 14:32 
GeneralRe: How to call a function inside a thread Pin
Stephen Hewitt8-Nov-06 14:48
Stephen Hewitt8-Nov-06 14:48 
AnswerRe: How to call a function inside a thread Pin
Mark Salsbery8-Nov-06 13:26
Mark Salsbery8-Nov-06 13:26 
GeneralRe: How to call a function inside a thread Pin
Llasus8-Nov-06 13:37
Llasus8-Nov-06 13:37 
GeneralRe: How to call a function inside a thread Pin
Jörgen Sigvardsson8-Nov-06 13:38
Jörgen Sigvardsson8-Nov-06 13:38 
GeneralRe: How to call a function inside a thread Pin
Llasus8-Nov-06 13:46
Llasus8-Nov-06 13:46 
GeneralRe: How to call a function inside a thread Pin
Llasus8-Nov-06 19:35
Llasus8-Nov-06 19:35 
QuestionCListCtrl spacing Pin
skullfire8-Nov-06 11:54
skullfire8-Nov-06 11:54 
QuestionRe: CListCtrl spacing Pin
David Crow9-Nov-06 3:59
David Crow9-Nov-06 3:59 
AnswerRe: CListCtrl spacing Pin
skullfire9-Nov-06 4:30
skullfire9-Nov-06 4:30 
QuestionRe: CListCtrl spacing Pin
David Crow9-Nov-06 4:34
David Crow9-Nov-06 4:34 
Questionuint64 in VC++ 6.0 Compiler?? [modified] Pin
pavanbabut8-Nov-06 11:42
pavanbabut8-Nov-06 11:42 

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.