MFC allows you to override CWinApp::OnIdle function to perform idle-time processing.
This function is called whenever thereâ€™re no messages are waiting for processing in the message queue.
In this function, you can perform some secondary processing like updating the status bar, toolbar, etc.
This article discusses how you can display the page in print preview as grayscale if the printer is black-and-white. It discusses first how you can convert colors to grayscale. After that is discusses how to detect whether you are in print preview or not and whether the current printer is color or black-and-white printer. Letâ€™s goâ€¦