Tag: programming languages

Questions Related to programming languages

which class is the root base class in MFC library

  1. CCmdTarget

  2. CObject

  3. CDocument

  4. CView


Correct Option: B

AI Explanation

To answer this question, we need to understand the MFC (Microsoft Foundation Class) library and its class hierarchy.

The MFC library is a framework developed by Microsoft for building Windows-based applications. It provides a set of classes and functions that simplify the development of graphical user interfaces (GUIs) and other common tasks in Windows programming.

The root base class in the MFC library is CObject, which is option B. CObject serves as the base class for most of the classes in the MFC library. It provides basic functionality such as runtime type information and object serialization.

Let's go through each option to understand why it is correct or incorrect:

Option A) CCmdTarget - This option is incorrect because CCmdTarget is a derived class from CObject and not the root base class.

Option B) CObject - This option is correct because CObject is the root base class in the MFC library. It provides basic functionality that is inherited by other classes.

Option C) CDocument - This option is incorrect because CDocument is a derived class from CCmdTarget and not the root base class.

Option D) CView - This option is incorrect because CView is a derived class from CCmdTarget and not the root base class.

Therefore, the correct answer is option B, CObject, as it is the root base class in the MFC library.

Functionality of CObject

  1. RTTI

  2. Serialization

  3. multiple document interface

  4. diagnostic and debugging


Correct Option: A,B,D

Which of the Following message type is invalid in Message Driven Architecture?

  1. Window messages (WM_)

  2. Control window messages (BM_)

  3. Dialog Box Messages( DB_)

  4. List box messages (LB_)


Correct Option: C

The WM_DESTROY message is sent to a window just before it is destroyed.

  1. True

  2. False


Correct Option: A

To give "physical" presence to the frame of an application, you should declare which method?

  1. BeginPaint()

  2. OnFrame()

  3. OnCreate()

  4. CreateFrame()


Correct Option: C

Which of the following Data type is used to Return value by window procedure?

  1. LPVOID

  2. LPCSTR

  3. BOOL

  4. LRESULT


Correct Option: D

which is used to create a view that resembles a dialog box but provides the document/view features?

  1. CScrollView

  2. CEditView

  3. CTreeView

  4. CFormView


Correct Option: D

A dialog box does not have any other system button but Close.

  1. True

  2. False


Correct Option: A

Which resource is a rectangular window whose main role is to host or hold other Windows controls.

  1. ToolBar

  2. Menu

  3. Dialog

  4. Accelerator


Correct Option: C

How many datasets can you sort using Proc Sort, in one proc sort statement?

  1. 2

  2. 1

  3. 255

  4. 256


Correct Option: B