Hi, all gurus,

 

I  need to simulate DoEvents in VB by python/wxPython,

My application needs to capture live image in a loop until one specific button pressed

Multi-thread is also not very good solution, for there are big number of data to exchange between the two threads.

 

Win32gui doesn’t have PeekMessage.

 

Or translate the folllowinf codes to python?

 

DoEvents()

{

  MSG msg;

         while ( ::PeekMessage( &msg, NULL, 0, 0, PM_NOREMOVE ) )

        {

        if ( !PumpMessage( ) )

        {

        ::PostQuitMessage( 1 );

        return FALSE;

        }

        }

        // let MFC do its idle processing

        LONG lIdle = 0;

        while ( OnIdle(lIdle++ ) )

        ;

        return TRUE;

        }

}

 

 

Thanks in advance,

James

_______________________________________________
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to