Windows Programming

301. When the user select an item from the menu which message is generated:

  1. WM_COMMAND
  2. ON_COMMAND
  3. WM_PAINT
  4. None of the

Correct answer: (A)
WM_COMMAND

302. Which macro of MFC creates a message map entry:

  1. ON_PAINT
  2. ON_LBUTTONCLK
  3. ON_COMMAND
  4. ON_RBUTTONCLK

Correct answer: (C)
ON_COMMAND

303. Which function appends the new items at the end of existing items:

  1. AppendMenu()
  2. LoadMenu()
  3. CreateMenu()
  4. InsertMenu()

Correct answer: (A)
AppendMenu()

304. Which variable has been used to make sure that the same menu item do not keep getting appended or removed more than once:

  1. count
  2. flag
  3. this
  4. None of these

Correct answer: (B)
flag

305. Which menu is added with a menu for the purpose of setting the appearance of the displayed image within the window:

  1. Submenu
  2. System menu
  3. Pop-up menu
  4. None of these

Correct answer: (A)
Submenu

306. Which tools are provided by Windows for text editing:

  1. Edit control
  2. Windows rich edit common control
  3. Both a and b
  4. None of these

Correct answer: (C)
Both a and b

307. In MFC which classes are used for text editing:

  1. CEditView
  2. CRichEditView
  3. Both a and b
  4. None of these

Correct answer: (C)
Both a and b

308. In CEditView class, the limitation of text size:

  1. 64 KB
  2. 32 KB
  3. 128 KB
  4. 16 KB

Correct answer: (A)
64 KB

309. Which function is used to set the size and position of the edit window:

  1. SetTextPos()
  2. SetWindowPos()
  3. SetWindowText()
  4. None of these

Correct answer: (B)
SetWindowPos()

310. Which function is used to retrieves plain text from the control:

  1. GetWindowText()
  2. SetWindowText()
  3. GetText()
  4. GetModify()

Correct answer: (A)
GetWindowText()

Page 31 of 50