Hey, I got a problem with my multi-threaded application. I have one thread that waits for an event to be signaled, when it happens it calls PostMessage and passes a handle of the main window created by the GUI thread with a custom message I handle in my window message loop. The problem is my main thread calls GetOpenFileName at the same time, which causes the message not to be processed. If I remove the call it works just fine. I've read the PostThreadMessage can sometimes lose messages, can this be the same case?
skalber
0
Newbie Poster
Recommended Answers
Jump to PostIts possible that GetOpenFileName() is sucking up your message. Call RegisterWindowMessage() to obtain a unique message for inter-application/thread communication. I don't know if that will resolve your problem, but worth a try.
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.