Posted on 2004-10-12
Im using AfxBeginThread in My InitInstance method for a CDialog application. Instead of calling DoModal(I dont want the dialog and am not setting m_pMainWnd = &dlg) Im merely calling
AfxBeginThread() and then WaitForSingleObject(hThread, INFINITE). When I go to TaskManager, I see that its taking 99% of my resources.
Do I need to call GlobalMemoryStatus to get the available virtual and merely use a percentage of it (as the 4th parm to AfxBeginThread) or what do I need to do so as to eliminate this resource hogging?