I have a modeless dialog that I spawn a seperate thread using m_hGThread1=AfxBeginThread(Animate_Graph,0,THREAD_PRIORITY_NORMAL,0,0,NULL) to handle the graphics seperately from the dialog. I'm using a critical section for locking. Under stress testing it deadlocks the application. Using VC7/MFC. What am I doing wrong?
C++
Last Comment
SpideyMod
8/22/2022 - Mon
rde011176
Can you provide a code snippet?
_kp
ASKER
I think it may be a design problem. I need to figure out how to attach to the CStatic picture control that holds the bitmap I'm modifying. Seems to hang in the message pump.
bkrahmer
Think about giving test-first design a try. I would bet that you wouldn't have gotten stuck there if you had. It forces you to take your programming step-by-step, but correctly the whole way. It can also be fun. Check it out.
brian
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Computer101
A request for deletion has been made. If no response or you feel this is in error, comment. If no objection, I will delete in three days.
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.