Worker-Thread In Win32 Application
-
Hi: I have recently created a "Win32 Application" project or, more accurately "A Simple Win32 Application". but i need to use a Worker-Thread in this app so i used AfxBeginThread() function,but when i want to compile project,i receive the following error: error C2065: 'AfxBeginThread' : undeclared identifier Am i doing somethimg wrong? or Is it possible to use this function in Win32 Application ? Please Help me. Best Regards.
-
Hi: I have recently created a "Win32 Application" project or, more accurately "A Simple Win32 Application". but i need to use a Worker-Thread in this app so i used AfxBeginThread() function,but when i want to compile project,i receive the following error: error C2065: 'AfxBeginThread' : undeclared identifier Am i doing somethimg wrong? or Is it possible to use this function in Win32 Application ? Please Help me. Best Regards.
AfxBeginThread()
is a method ofCWnd
, which is only available if you create an MFC application. UseCreateThread()
(and related Win32 functions) if you're not using MFC. /ravi Let's put "civil" back in "civilization" http://www.ravib.com ravib@ravib.com -
AfxBeginThread()
is a method ofCWnd
, which is only available if you create an MFC application. UseCreateThread()
(and related Win32 functions) if you're not using MFC. /ravi Let's put "civil" back in "civilization" http://www.ravib.com ravib@ravib.comRavi Bhavnani wrote: AfxBeginThread() is a method of CWnd No, but of MFC. Ravi Bhavnani wrote: Use CreateThread() (and related Win32 functions) if you're not using MFC. But preferably _beginthreadex() from the C runtime. -- Human beings, who are almost unique in having the ability
to learn from the experience of others, are also remarkable
for their apparent disinclination to do so. (Douglas Adams) -
Ravi Bhavnani wrote: AfxBeginThread() is a method of CWnd No, but of MFC. Ravi Bhavnani wrote: Use CreateThread() (and related Win32 functions) if you're not using MFC. But preferably _beginthreadex() from the C runtime. -- Human beings, who are almost unique in having the ability
to learn from the experience of others, are also remarkable
for their apparent disinclination to do so. (Douglas Adams)Johann Gerell wrote: No, but of MFC. Ooops, you're so right! :-O /ravi Let's put "civil" back in "civilization" http://www.ravib.com ravib@ravib.com