troubleshooting Question

DoEvents in C++

Avatar of scecilia
scecilia asked on
C++
3 Comments1 Solution1578 ViewsLast Modified:
Hello,

In VisualC++ I have a program that calls DoEvents() and works just fine.  

I moved the exact same code outside VisualC++, since I need it as a stand alone program.  However, my DoEvents() now do cause linkage problems.  These look like:

void DoEvents(void)
{
    MSG msg;
    while(PeekMessage(&msg,NULL,0,0,PM_REMOVE))
    {
       TranslateMessage(&msg);
       DispatchMessage(&msg);
    }
}

DoEvents processes Windows Messages in the message queue. C++ does not have a one command counterpart. What can I do?  I need a DoEvents in plain C++!  Anyone knows?
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 3 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros