home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_02_10 / 2n10080a < prev    next >
Text File  |  1991-07-17  |  416b  |  19 lines

  1. /*
  2.  *  MyYield():  process any pending 
  3.  *  messages to the application, 
  4.  *  and return when none in the queue
  5.  */
  6.  
  7. void MyYield()
  8. {
  9. MSG msg;
  10.     while ( PeekMessage( &msg, NULL,
  11.             NULL, NULL, PM_REMOVE ) ) {
  12.         if ( TranslateAccelerator( 
  13.             hMainWnd, hAccTable, &msg) )
  14.             continue;
  15.         TranslateMessage( &msg );
  16.         DispatchMessage( &msg );
  17.         }
  18. }
  19.