Category Archives: MFC

Thread Synchronization : Using Critical Section

Download source code for this project from here Using Critical Section Software development is a team effort. Unless team members cooperate with one another, synchronize their work with the rest of the team, the team can’t go far. Similarly if … Continue reading

Posted in MFC, Tutorial | Tagged , , | Leave a comment

Write code for ‘Close All Documents’ menu command?

The ‘Close All Documents’ is a menu command that closes all the open documents and their views. This feature can be implemented by using two functions CWinApp::CloseAllDocuments( ) and SaveAllModified( ). The CloseAllDocuments( ) function destroys the currently active document … Continue reading

Posted in MFC | Tagged | Leave a comment

Creating User Interface Thread Part II

Download source code hereĀ  User Interface Thread Part II We know that unlike a worker thread, a user-interface (UI) thread is used to create windows and process messages sent to those windows. In this article we will write a small … Continue reading

Posted in MFC | Tagged | Leave a comment

Example for creating MFC User Interface Thread

Download source code User Interface Thread Some time back we saw how to build an application that uses a worker thread. A worker thread is used to perform background tasks that receive no direct input from the user. Unlike this … Continue reading

Posted in MFC, Source code | Tagged | Leave a comment

Tab order of controls placed in a dialog box.

Sometimes, especially when we are using spin button controls or radio buttons, the order in which we are creating controls is very important. Spin button controls considers the control created just before it as its buddy whereas radio buttons to … Continue reading

Posted in MFC | Tagged , | Leave a comment