Re: Help, Problem Modifying edit box sting using a thread.
Out of topic - ask on MFC groups, e.g.:
microsoft.public.vc.mfc
--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@mvps.org
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================
"Kooni" <Panos100m@gmail.com> wrote in message
news:1165839235.111240.243130@79g2000cws.googlegroups.com...
Hello
I am programming in MFC ...i have a thread void thread 1() and i want
this thread to change the contents of the edit box however even though
tha the cstring value is set .. i can modify it everywhere else the
value of edit box in my program
Except inside the thread :-( it says : 'm_edit' : undeclared
identifier.
Now a friend recommended me to use the PostThreadMessage (to the thread
ID of the main thread) or PostMessage (to the main window)
I cant figure out how to use it
void thread1( CWnd* pWnd )
{
printf ("Thread is rolling");
pWnd->PostMessage(m_edit, 0, "test");
return;
}
It still says undeclered identifier..
I think i still need to use GetMessage and translate message maybe ..
Can someone please explain, write a snip set of code of how this can be
done ?
Regards
Panos