Category Archives: VC++

What are the most Frequently asked questions on VC++ Interviews ?

Posted in VC++ | Tagged , , , , , | 2 Comments

Opening the document from the top of the recent file list automatically.

How to make sure that the application automatically opens the document that is at the top of the recent file list? Ans: #include the ‘afxadv.h’ file in the application class’s source file. This file is required for CRecentFileList class’s definition.  … Continue reading

Posted in VC++ | Tagged | Leave a comment

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

How to display Control Panel applets?

We can execute a Control Panel applet by double clicking it. If we want to execute it through a program then the simplest way to do so is to use the ShellExecute( ) API function. The following call to ShellExecute( … Continue reading

Posted in VC++ | 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

Printing Through .NET

Any sophisticated application would definitely have support for printing. .NET facilitates printing with the help of a PrintDocument component. Along with this we can make use of the various dialog boxes that are commonly used for printing. The PrintDocument Component … Continue reading

Posted in C Programming, C++, VC++ | Leave a comment

General Tips To Overcome An Interview

Campus So what if you are not a mountaineer. Or a keen hiker. You still cannot treat your interview like a careless morning trot along a jogger’s path. Your jaw-jaw at the interview table is nothing less than a cautious … Continue reading

Posted in C Programming, C++, VC++ | Leave a comment