[python-win32] simulate DoEvents by python/wxpython
James Hu
jhu at metrigenix.com
Wed Oct 26 20:10:07 CEST 2005
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-win32/attachments/20051026/9dd9483c/attachment.html
More information about the Python-win32
mailing list