Top 100+ Microsoft Foundation Class Library (mfc) Interview Questions And Answers
Question 1. Whats Is Ddx & Ddv In Mfc?
Dialog facts exchange (DDX) is an clean manner to initialize the controls in your conversation field and to collect records input by way of the user. Dialog data validation (DDV) is an clean way to validate facts entry in a conversation field.
Question 2. What Is Synchronization Objects Types And Where We Are Using In The Code?
CRITICAL_SECTION :- CRITICAL_SECTION (CS) gadgets are initialized and deleted however do not have handles and are not shared with the aid of different techniques. A variable have to be declared to be of kind CRITICAL_SECTION. Threads enter and leave a CS, and simplest one thread at a time may be in a specific CS. EnterCriticalSection blocks a thread if another thread is in the phase. The waiting thread unblocks while some other thread executes LeaveCriticalSection. If a thread already owns the CS, it is able to input again with out blocking off; this is, CRITICAL_SECTIONs are recursive. CRITICAL_SECTIONs have the gain of not being kernel objects and are maintained in consumer space. This usually, but now not usually, presents overall performance enhancements.
Mutex: - mutexes can be named and feature handles, they can also be used for interprocess synchronization among threads in separate approaches. Mutex objects are just like CSs, however, similarly to being technique-sharable, mutexes allow time-out values and become signaled when abandoned with the aid of a terminating procedure.A thread gains mutex ownership (or locks the mutex) by using ready on the mutex deal with (WaitForSingleObject or WaitForMultipleObjects), and it releases ownership with ReleaseMutex.
Semaphore :- Semaphores hold a be counted, and the semaphore item is signaled while the count number is more than 0. The semaphore item is unsignaled whilst the matter is zero.
Event :- Events are used to signal different threads that a few occasion, which include a message being available, has happened.
Python Interview Questions
Question three. What Is The Flow Of Sdi Application?
CwinApp -> CDocument -> CFrameWnd -> CView
Question four. What Is The Base Class For Mfc Framework?
Question 5. What Is Model And Modeless Dialog Box? Give Some Examples?
Modal dialog is one in an effort to not permit u to access any thing until this dialog is energetic.
And reverse of this ur modeless dialog.
When we get entry to Menu objects which include Save as, Open, attach report, in any application, we can't able to access any a part of the application execpt the lively conversation.
When we open upload take away application for uninstalling any utility, u will get a Uninstallation dialog to be able to be modeles. Bcz nevertheless u had been capable of get entry to add remove applications. (this is probably in Vista. And in XP its modal conversation which they have got used)
C++ Interview Questions
Question 6. What Is The Use Of Cwinapp Class?
CWinApp is an software object presents member functions for initializing your software (and each example of it) and for running the utility.
Each utility that makes use of the Microsoft Foundation lessons can handiest incorporate one item derived from CWinApp. This item is constructed when other C++ international objects are constructed and is already available while Windows calls the WinMain characteristic, that is supplied with the aid of the Microsoft Foundation Class Library. Declare your derived CWinApp object at the global stage.
When you derive an software elegance from CWinApp, override the InitInstance member function to create your utility's foremost window item.
In addition to the CWinApp member features, the Microsoft Foundation Class Library provides the subsequent worldwide features to access your CWinApp item and other global facts:
AfxGetApp Obtains a pointer to the CWinApp object.
AfxGetInstanceHandle Obtains a deal with to the current application example.
AfxGetResourceHandle Obtains a cope with to the utility's resources.
AfxGetAppName Obtains a pointer to a string containing the utility's call. Alternately, when you have a pointer to the CWinApp item, use m_pszExeName to get the software's call.
Question 7. What Is Stack Size In Win32 Program?
C++ Tutorial C Interview Questions
Question eight. How Can Update Edit Control Data Of An Executing Application From Other Application?
First, want to discover the take care of of the Control by means of the usage of a few API like EnumWindows and enumerrating all windows and checking for the text of the window via GetWindowTExt.
Once, cope with of the target manage has been recognized, SendMessage may be used to ship suitable message to the manipulate. Like WM_SETTEXT may be sent to exchange textual content of window, etc...
Question nine. If Application Hangs While Sendmessage Is Waiting For The Result, How You Handle It?
Instead of SendMessage API i'm able to use the SendMessageTimeout
API to solve the gadget hang or You can use PostMessage API as an alternative.
Microsoft Dynamics CRM Interview Questions
Question 10. How You Find Memory Leaks?
There many approaches to find reminiscence leaks, One of the methods is via using MFC class. And every other way is using Purify gear...
CMemorState is a MFC elegance by way of which we can discover the reminiscence leaks. Below is a pattern code to find the same.
CMemoryState oldState, newState, diffState;
int* a = new int;
Question 11. What Is The Base Class For Mfc?
CObject is the bottom magnificence for all the MFC training.
Microsoft Certified Solutions Associate (MCSA) Interview Questions
Question 12. What Is Primitive And Non-primitive Application?
primitive & non-primitive kind are difference factor,primitive is the nicely defined statistics,we cannot modified this kind of records,but in non-primtive kind as a user defined of data which keep reference or object statistics,bcz they're created instead then according to-defind.
Python Interview Questions
Question thirteen. General Purpose Classes In Mfc?
CString, CSize, CPOint..
Microsoft Dynamics CRM Tutorial
Question 14. What Is The Use Of Ccmdtarget?
CCmdTarget elegance used to technique window message, any elegance at once or indirectly inherited from CCmdTarget will eligible for message coping with..
Question 15. List Out The Basic Features Of Mfc?
Application Framework: The MFC library framework includes its own utility structure-one that has been proved in lots of software environments.App wizard generates skeleton code on your complete utility, and sophistication wizard generates prototypes and feature our bodies for message handlers.
Runtime class facts
MVC Framework Interview Questions
Question sixteen. List Out The Parameters Of Winmain Function?
int CALLBACK WinMain(
__in HINSTANCE hInstance,
__in HINSTANCE hPrevInstance,
__in LPSTR lpCmdLine,
__in int nCmdShow
MVC Framework Tutorial
Question 17. How We Call A Dialog In Another Dialog?
Using DoModal() feature.
Create a class of every other dialog container.
And write a code in fist conversation container characteristic.
and outline the brand new header file in fisrt dialog bob code.
#consist of "classname.H"
Microsoft Entity Framework Interview Questions
Question 18. How To Find The Mouse Entering An Image And While Entering Need To Display Next Image?
through using the device tip belongings we are able to understand the in which the mouse point is located now.
C++ Interview Questions
Question 19. What Is Ctargetobject?
In popular, TargetObject is the object in which you'll get the taken care of result.
If you want to unique solution please replace the context and info of question like Grid or Array.
Microsoft Entity Framework Tutorial
Question 20. How To Update Windows Title Bar Dynamically?
the usage of SetWindowText()characteristic we will alternate textual content of specific window dynamically.
Microsoft Azure Interview Questions