Click here to Skip to main content
15,900,378 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: OOP Classes / Windows Pin
Mark Salsbery31-Jan-08 8:29
Mark Salsbery31-Jan-08 8:29 
AnswerRe: OOP Classes / Windows Pin
CPallini31-Jan-08 8:59
mveCPallini31-Jan-08 8:59 
GeneralRe: OOP Classes / Windows Pin
Maximilien31-Jan-08 9:02
Maximilien31-Jan-08 9:02 
GeneralRe: OOP Classes / Windows Pin
CPallini31-Jan-08 9:05
mveCPallini31-Jan-08 9:05 
GeneralRe: OOP Classes / Windows Pin
Maximilien31-Jan-08 9:09
Maximilien31-Jan-08 9:09 
GeneralRunning a new ActiveX Control help. Pin
TheBerk31-Jan-08 5:48
TheBerk31-Jan-08 5:48 
GeneralRe: Running a new ActiveX Control help. Pin
Mr. Surprise31-Jan-08 7:23
Mr. Surprise31-Jan-08 7:23 
GeneralThread problem Pin
Orell31-Jan-08 5:03
Orell31-Jan-08 5:03 
1......

UINT lesson(LPVOID prog)
{
CMainDlg *dlg=(CMainDlg*)AfxGetApp()->GetMainWnd();
Sdlg->UpdateData();

CString l_mesg=mesg;
int l_index=l_mesg.Find('@');
CString l_name=l_mesg.Left(l_index);
CString l_id=l_mesg.Right(l_mesg.GetLength()-l_index-1);

int L_ITEMS = dlg->m_lessonlistcontrol.GetItemCount();
int l_pos=dlg->m_lessonlistcontrol.InsertItem(L_ITEMS,l_name,0);
dlg->m_lessonlistcontrol.SetItemText(l_pos,1,l_id);

dlg->UpdateData(0);
AfxEndThread(0,true);
return 0;
}

void CMainDlg::Receive()
{

stusock.Receive(mesg,rsize);
AfxBeginThread(lesson,NULL,THREAD_PRIORITY_NORMAL,0,0,NULL);
}
///////////////////////////////////////////////////////////
2..............

UINT lesson(LPVOID prog)
{
CMStudentDlg *Sdlg=(CMStudentDlg*)AfxGetApp()->GetMainWnd();
Sdlg->UpdateData();

CString l_mesg=mesg;
int l_index=l_mesg.Find('@');
CString l_name=l_mesg.Left(l_index);
CString l_id=l_mesg.Right(l_mesg.GetLength()-l_index-1);

int L_ITEMS = Sdlg->m_lessonlistcontrol.GetItemCount();
int l_pos=Sdlg->m_lessonlistcontrol.InsertItem(L_ITEMS,l_name,0);
Sdlg->m_lessonlistcontrol.SetItemText(l_pos,1,l_id);

Sdlg->UpdateData(0);
AfxEndThread(0,true);
return 0;
}

void CMStudentDlg::Receive()
{

stusock.Receive(mesg,rsize);
AfxBeginThread(lesson,NULL,THREAD_PRIORITY_NORMAL,0,0,NULL);
}


/////////////////////////
pls tell where am wrong the main diffrence is the 1st one is in the main dialog of the application of the project which i am doing in VC6 its working with out any problem

but the sencond one its is not written in the main dialog but in a newly inserted dialog its'nt showing any error when i run the project but its not showing the reqired result ie no values is displayed or some time its show run time error
GeneralRe: Thread problem Pin
led mike31-Jan-08 5:07
led mike31-Jan-08 5:07 
GeneralRe: Thread problem Pin
Orell31-Jan-08 5:16
Orell31-Jan-08 5:16 
GeneralRe: Thread problem [modified] Pin
led mike31-Jan-08 5:38
led mike31-Jan-08 5:38 
GeneralRe: Thread problem Pin
CPallini31-Jan-08 8:56
mveCPallini31-Jan-08 8:56 
GeneralRe: Thread problem Pin
led mike31-Jan-08 9:21
led mike31-Jan-08 9:21 
GeneralCrack pusher STILL needed! Pin
CPallini31-Jan-08 9:27
mveCPallini31-Jan-08 9:27 
QuestionRe: Thread problem Pin
CPallini31-Jan-08 5:22
mveCPallini31-Jan-08 5:22 
GeneralRe: Thread problem Pin
Orell31-Jan-08 5:27
Orell31-Jan-08 5:27 
GeneralRe: Thread problem Pin
CPallini31-Jan-08 5:36
mveCPallini31-Jan-08 5:36 
GeneralRe: Thread problem Pin
David Crow31-Jan-08 5:45
David Crow31-Jan-08 5:45 
GeneralRe: Thread problem Pin
Orell31-Jan-08 6:00
Orell31-Jan-08 6:00 
GeneralRe: Thread problem Pin
David Crow31-Jan-08 6:15
David Crow31-Jan-08 6:15 
QuestionCreate win32 modal child window Pin
snir_ya31-Jan-08 4:35
snir_ya31-Jan-08 4:35 
GeneralRe: Create win32 modal child window Pin
led mike31-Jan-08 4:38
led mike31-Jan-08 4:38 
GeneralRe: Create win32 modal child window Pin
snir_ya31-Jan-08 4:43
snir_ya31-Jan-08 4:43 
GeneralRe: Create win32 modal child window Pin
led mike31-Jan-08 5:03
led mike31-Jan-08 5:03 
GeneralRe: Create win32 modal child window Pin
snir_ya31-Jan-08 5:12
snir_ya31-Jan-08 5:12 

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.