Ciao a tutti, sto sviluppando un'applicazione sotto windows con MFC e vorre itulizzare un thread.
Ho letto su vari siti di utilizzare che con MFC si deve utilizzare AFXBEGINTHREAD e non CREATETHREAD.
Secondo voi e' corretto dichiarare all'interno della classe la funzione thread e la struttura DA PASSARE al THREAD come vedo nell'esempio qui riportato ?
Grazie
codice:
class CThreadDemoDlg : public CDialog
{
// Construction
public:
CThreadDemoDlg(CWnd* pParent = NULL); // standard constructor
/* DEMO CODE - Enis Arif*/
static UINT StartThread (LPVOID param); //controlling function header
typedef struct THREADSTRUCT //structure for passing to the controlling function
{
CThreadDemoDlg* _this;
} THREADSTRUCT;