Genesis Insoft The name you can TRUST
twitterlogo facebooklogo
Home  |  Contact Us |  Careers
Visual C++ Question Bank / FAQs

This is a mock Exam for the VC++ programmers. It is created by Genesis InSoft Limited (admin@genesisinsoft.com) and may be freely distributed so long as it is unmodified. Please email us if you have any corrections or comments.

Question 1

Document view architecture is not supported in

  1. Dialog based Application
  2. Single Document Interface Application
  3. Multi Document Interface Application
  4. None of the above

Answer to Question 1

Question 2

Which function of CView class is used to render an image of the document for screen display, printing, or print preview

  1. OnPaint
  2. OnDraw
  3. OnUpdate
  4. OnInitialUpdate

Answer to Question 2

Question 3

Which member function is called by the framework before the OnDraw member function is called for screen display

  1. OnPrepareDC
  2. OnGetDC
  3. OnUpdateDC
  4. None of the above

Answer to Question 3

Question 4

Which message is sent when a pop-up menu is about to become active?

  1. WM_COMMAND
  2. WM_MESSAGE
  3. WM_INITMENUPOPUP
  4. WM_MENUACTIVE

Answer to Question 4

Question 5

The return value of NULL from GetMenu indicates

  1. The window is a child window
  2. The menu does not have any popup options
  3. The menu is a floating popup menu
  4. The specified window has no menu

Answer to Question 5

Question 6

In the following code, what is the significance of the second parameter
    HMENU GetSubMenu(HMENU hMenu, int nPos);

  1. Specifies the zero-based relative position in the given menu of an item that activates a drop-down menu or submenu.
  2. Specifies the one-based relative position in the given menu of an item that activates a drop-down menu or submenu.
  3. Specifies the x coordinate of the menu display.
  4. None of the above.

Answer to Question 6

Question 7

Function TrackPopupMenu displays the menu at particular x and y postion. Is the position value?

  1. based on screen coordinates
  2. based on client area coordinates
  3. relative to mouse x and y positions
  4. None of the above

Answer to Question 7

Question 8

Which macro converts an integer value to a resource type compatible with Windows resource-management functions?

  1. CONVERTTOSTRING
  2. TOSTRING
  3. MAKERESOURCE
  4. MAKEINTRESOURCE

Answer to Question 8

Question 9

Which function checks a thread message queue for a message?

  1. CheckMessage
  2. CheckMessageQueue
  3. PeekMessage
  4. LookMessage

Answer to Question 9

Question 10

Which function translates a WM_KEYDOWN message to a WM_COMMAND?

  1. TranslateKey
  2. TranslateMessage
  3. TranslateKeyMessage
  4. TranslateAccelerator

Answer to Question 10

Question 11

What style do we specify in CreateWindow function to create a window with a horizontal scroll bar and vertical scroll bar?

  1. WS_HSCROLL | WS_VSCROLL
  2. CW_HSCROLL | CW_VSCROLL
  3. WS_BOTH_SCROLLS
  4. WS_SCROLLS

Answer to Question 11

Question 12

The signature of OnSize handler is as follows?

  1. afx_msg void OnSize ();
  2. afx_msg void OnSize (UINT nType);
  3. afx_msg void OnSize (int cx, int cy);
  4. afx_msg void OnSize (UINT nType, int cx, int cy);

Answer to Question 12

Question 13

Which message is sent to the dialog box procedure immediately before a dialog box is displayed?

  1. WM_INITDIALOG
  2. WM_INITIALIZEDIALOG
  3. WM_DIALOG
  4. WM_INITDLG

Answer to Question 13

Question 14

Which message is sent when a menu is about to become active?

  1. WM_INITMENU
  2. WM_INITMENUPOPUP
  3. WM_INITPOPUP
  4. WM_MENUINIT

Answer to Question 14

Question 15

Which class provides the scroll handling feature automatically in response to scroll-bar messages?

  1. CView
  2. CScrollView
  3. CViewScroll
  4. CListView

Answer to Question 15

Question 16

Which of the following statements is wrong?

  1. The application object is constructed when C++ global objects are constructed.
  2. There is only one application object with each application.
  3. Application object constructs the main window.
  4. WinMain function supplied by MFC library does not make use of application object.

Answer to Question 16

Question 17

Which functions allow you to write the data to the .ini file?

  1. WriteProfileString
  2. SetProfileString
  3. WriteProfileInt
  4. Both A and C

Answer to Question 17

Question 18

The parameter value of -1 in DoWaitCursor means what?

  1. the wait cursor appears
  2. the wait cursor is restored without incrementing the reference count
  3. the wait cursor ends
  4. None of the above

Answer to Question 18

Question 19

Which class allows you to implement standard string Find/Replace dialog boxes in your application?

  1. CFindRepDialog
  2. CFindReplaceDlg
  3. CFindReplace
  4. CFindReplaceDialog

Answer to Question 19

Question 20

Which member function do we call to create and display the FindReplace dialog box?

  1. DoModal
  2. CreateWindow
  3. Create
  4. CreateDisplay

Answer to Question 20

Answers

Answer 1 - A

Back to question 1

Answer 2 - B

Back to question 2

Answer 3 - A

Back to question 3

Answer 4 - C

Back to question 4

Answer 5 - D

Back to question 5

Answer 6 - A

Back to question 6

Answer 7 - A

Back to question 7

Answer 8 - D

Back to question 8

Answer 9 - C

Back to question 9

Answer 10 - D

Back to question 10

Answer 11 - A

Back to question 11

Answer 12 - D

Back to question 12

Answer 13 - A

Back to question 13

Answer 14 - A

Back to question 14

Answer 15 - B

Back to question 15

Answer 16 - D

Back to question 16

Answer 17 - D

Back to question 17

Answer 18 - C

Back to question 18

Answer 19 - D

Back to question 19

Answer 20 - C

Back to question 20

Copyright © 2000 to 2024 Genesis InSoft Limited. All Rights Reserved.