I need to force the framework to call the necessary OnUpdatexxx( CCmdUI * ) functions before an area of intense processing in my program. In the processing loop, I am sure to call
while ( PeekMessage( &msg, NULL, 0, 0, WM_NOREMOVE ) )
This allows for screen repaints and access to other parts of the program, but the framework does not take the opportunity to update the status of the toolbar buttons.
Note that the status will not change once the intense processing loop is entered; they do change right before the loop is entered, however.