When you get selected for an interview, you need to take certain preparations before attending the interview with confidence. Take the interview seriously as it can make or break your dream of getting a good job. A job seeker aiming to attend an MFC job interview must meet the necessary qualifications and technical skills to become eligible for the position. If you are well versed with the job responsibilities and you can answer the MFC interview questions well, you will be stress free to face the panel.
MFC is the acronym for Microsoft Foundation Class Library. It is a type of development library developed by Microsoft Corporation. This library includes Windows API in programming language C++ classes. The entire process helps to function an application framework in a Microsoft Windows environment.
We have provided some technical questions that are usually asked in interviews. Refer to them and prepare yourself to face these questions.
What is the base class for MFC framework?
"CObject is the main base class for a MFC framework. The unique features of CObject helps to incorporate them in program objects and improves compatibility with collection classes. It improves service including serialization support, runtime class information and object diagnostics."
What are the general purpose classes for MFC framework?
"The general purpose classes for MFC framework is CPoint, Cstring and CSize"
Is there a way to transfer data through different classes?
"Yes certainly. We can transfer data through different classes by using WMCopyData window message. We can also use Uniform Data Transfer (UDT) mode, though its level is not that high."
What are the features of MFC?
"The basic features of MFC are:
What is the connection between document, frame and view?
"These are the names of different classes in an MFC framework. All the three classes are built by a CDocTemplate object. If a new window is opened or splitted, the framework pops up a new view and attaches it to the document. A view can only be attached to one document, whereas a document may share multiple views at one time."
What is a dialogue box?
"A dialogue box is a kind of container in MFC which helps to host windows control between a user and the computer."
What do you know about win32 API? Name a few APIs.
"Win32 API wraps the MFC framework. It helps to process windows application function. There are a number of APIs including CreateWindow, CreateEventm GetWindowText, SendMessage, GetExitCode, PostMessage, etc."
Differentiate between ANSI code and UNICODE?
"Both of these codes are used for programming language. The main difference between ANSI and Unicode is in terms of the number of characters it can accept. ANSI can include only 8 bytes data while Unicode accepts around 16 bytes. Unicode is more useful than ANSI in supporting the language exceeding few hundreds and thousands of characters."
What are threads in MFC? Explain
"Threads are the units of code that aid the process of application. Such an application may be single threaded or multi threaded. The Windows allow to process a number of processes and threads to support the multitasking ability. In MFC, we can create two types of threads namely Worker Threads and User Interface Threads."
What is a socket?
Socket is an object which is used to communicate all data from one application to the other across a network."
Do you know that synchronous sockets and asynchronous sockets are the same thing?
This question is asked with a twist to confuse your knowledge and check if you know the actual function. Answer the question smartly.
"I will like to correct the statement if you don't mind. There is a marked difference between these two sockets. The main point of difference is that the synchronous sockets create a block in the process of application unless request for data is raised; while asynchronous sockets create no hindrances to any part of the application across the network."
What are regular dlls and extended dlls?
Dlls is the short form of Dynamic Link Libraries. Regular dlls can be used anywhere by a MFC or a non-MFC framework working on any programming language, while extendeddlls require MFC libraries to support object oriented concepts and use in classes."
What is your understanding of a message map? What are the benefits derived from it?
"Message map is a logical table which helps to locate the window's commands and messages into a MFC class function. The MFC class should be derived from CcmdTarget and can be used to monitor or map more than one member function in MFC class."
How can two processes share memory easily?
"Two processes can share memory very easily through sockets or message passing. They can also use mapped files to exchange and share memory between the two processes."
Please note that the above questions mentioned cover the technical part of the interview. We have discussed them in detail because in an MFC interview, technical round is the main criteria for selection. However, few general and introductory questions are given below for your reference as well:
As you can well understand, the above MFC interview questions require an in-depth knowledge and technical acumen to answer them correctly. Thus, if you are an experienced job seeker, you must brush up your knowledge before attending the interview. While if you are a fresher in the field, you must have a clear concept on this subject. Study well, do your research work and expand your knowledge base to perform successfully in the interview.