C/C++ under Windows and MFC |
110 Exam and interview questions on WIN32, MFC and C/C++ under Windows for developers/learners. Click on the link to get the detailed explanations. One you visit any answer you can navigate through next and previous link to jump from one answer to another. You can also select index to come back to this index page. Please provide us the rating and feedbacks of our questions and answers.
How windows differs from DOS and what is the advantage of GUI based program?
What is Windows SDK? What is Windows Win32 API functions?
What are Basic DLL components of Windows? Functionalities of DLLs?
What is WinMain function in windows C? Main vs WinMain, WinMain prototype and arguments.
What is a Window CallBack procedure and what is its utility?
Steps to write a basic window program with C and Win32 APIs.
What is the utility of calling DefWindowProc() function in CALLBACK window procedure?
What are the members of MGS structure and utility of each members?
How windows program handles message pump and how to exit from the loop?
What is window class and what are common available window classes available in windows?
How to define a custom window class? Register and Create?
What is WM_PAINT event ? When does Win32 subsystem call WM_PAINT event?
When we use BeginPaint and EndPaint and when to use GetDC() and ReleaseDC()?
What is Device Context (DC) in Windows?
What is the difference between a GetDC() and GetWindowDC() call?
What is windows client and non-client area?
What are different mouse events?
How we can get the co-ordinate of mouse during mouse events?
What is non-client mouse event? And how can I determine on which object mouse has been clicked?
What is unicode and international character/multi language support in windows?
How can I convert a Unicode string to null terminated byte string and vise versa?
What are the basic steps of a typical MFC based application?
What is the base class of any MFC class?
Explain the MFC class hierarchy starting from CObject?
What is the utility of CWinApp class?
Can I create multiple objects of my main application class CWinApp?
What is the utility of CCmdTarget class in the MFC class hierarchy?
m_pMainWnd is the member of which class in MFC class hierarchy?
What is the class hierarchy tree of CWinApp class?
How can we give all world wide language support to our application?
Mention two major functions to convert ASCII string to UNICODE string and vise versa?
What is the job of resource DLL in a project?
What are some basic styles of a PEN object?
What is the utility of NULL PEN?
What are different types of Brushes?
What is the utility of NULL BRUSH?
What is the difference between Screen DC and Printer DC?
How SaveDC and RestoreDC works?
What is Bitmap? And how can I draw a Bitmap?
What are the types of fonts are there?
What is MetaFile? How can I store and Retrieve drawing of a window?
How we use keyboard shortcuts in dialog and menu items?
How can load menu dynamically?
How can I use one event function for a range of menu id?
How can I use popup menu or a context menu?
What is system menu and How can I append extra menu in system menu?
What is 'Modal' and 'Modeless' Dialog? Give example and state their uses.
How can I create modeless dialog?
How can I create a dialog in the middle of Desktop?
What are the different member of CDataExchange class?
How data and the text in the dialog screen are exchanged in DoDataExchange() routine?
What are the result of UpdateData(TRUE) and UpdateData(FALSE) call?
How data are validated in data exchange routine?
How can I change the text of the message box that comes for the data validation?
What is property sheet and property page?
How property sheet and page classes works internally?
How can I color background of Edit and Static and other controls?
How to set a periodic timer event using SetTimer?
How can I read or modify windows clipboard?
Why Tree and List control are called view control?
What are the types of views supported in ListView?
What are the different types of common dialogs?
How can I customize a File Open Dialog?
Is FindReplace dialog is modal or modeless? Why?
What are different types of open mode in CFile?
What is the advantage of using CStudioFile class over CFile?
How can I open a file on drag-n-drop operation?
How can I write a class that supports serializtion?
What is the utility of serialization?
Does serialization is only used for storing or retrieving information to and from disk filesystem?
What is CArchive class in serialization routine? Why a CFile is not used here?
What is worker thread and UI thread?
How can I create a worker thread using AfxBeginThread() function?
How can I create an UI thread using MFC?
What are the different synchonization classes provided by MFC?
How can I modify attribute of Frame window before creation?
What is the Doc/View architecture in MFC? Explain.
What is CRuntime class? Where it is used?
What is a MFC class that supports dynamic creation?
How a MFC class can support RTTI?
What is the utility of IMPLEMENT_DYNAMIC?
Why in Doc/view classes are created dynamically?
How can I construct a Single Document Templete class?
Describe workflow of a typical MFC Application that supports Doc/View?
How messages are routed in an Doc/View application?
What is the utility of OnDraw() function in CView class in Doc/View?
How command line arguments are processed in Doc/View?
What is the difference between SDI and MDI Application?
What are the sequence of a OnFilePrint() event?
Topic Discussed: GUI based program, SDK and API, DLL components, WinMain(), CallBack, calling conventions,PASCAL, CALLBACK, WINAPI, DefWindowProc(), LPARAM and WPARAM, MGS, message pump, window class, Register, WM_PAINT, BeginPaint, EndPaint, GetDC(), ReleaseDC(), Device Context, GetDC() and GetWindowDC(), client and non-client area, mouse events, unicode and international character/multi language support, string table, MFC application, CWinApp, CCmdTarget, m_pMainWnd, DECLARE_MESSAGE_MAP(), BEGIN_MESSAGE_MAP() and END_MESSAGE_MAP() , resource DLL, GDI, PEN, BRUSH, SaveDC, RECT, Bitmap, pallet, font, MetaFile, GetDeviceCaps(), GetSystemMetrics(), GetFontMetrics(), carat, menu, context menu, "Modal" and "Modeless" Dialog, CDataExchange, DoDataExchange(), UpdateData(), property sheet and property page, timer, clipboard, view control, Image List, common dialogs, File Open Dialog FindReplace, CStudioFile, drag-n-drop, serializtion, CArchive, worker thread and UI thread, AfxBeginThread(), synchonization, Frame, Doc/View, CRuntime class, RTTI, IMPLEMENT_DYNAMIC? CFrameWnd, OnFilePrint().