Solved

AfxBeginThread

Posted on 2004-10-12
3
362 Views
Last Modified: 2013-12-03
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?

Help

LostInMemorySpace
0
Comment
Question by:hduncanjr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 500 total points
ID: 12290777
No, there's no need to specify a stack size. What is your thread actually doing?
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
This article shows how to make a Windows 7 gadget that extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question