AfxBeginThread(MyThread, this); UINT MyThread(LPVOID pv) { CCTest* pTest = static_cast(pv); pTest->m_Variable; pTest->Function(); }