Sie sind auf Seite 1von 7

UNIT II

1. What is an Application framework?


Application framework is “ an integrated collection of object-
oriented software components that offers all that’ s needed for a
generic application.

2. What are the features of Application framework?


i.Application framework applications use a standard structure.
ii.Application framework applications are small and fast.
iii.The VC++ tools reduce coding drudgery.
iv.The MFC library application framework is feature rich.

3. What are the VC++ components?


The VC++ components are
1.Project 2. Resource Editor 3.C/C++ Compiler
4.Source Code editor 5.Resource compiler 6. Linker
7. Debugger 8. Application Wizard 9. Class Wizard
10. Source browser 11. Gallery 12. Windows Diagnostic tools
13. Online help 14. Source code control 15. MFC library
16. Active Template Library (ATL).

4. What is an Application Wizard?


Application Wizard is a code generator that creates a working
skeleton of a Windows application with features , class names and
source code file names that are specified by the user. AppWizard
gets started when a new application either Single
Document Interface or Multiple Document Interface or Dialog
based application is created.

5. What is a Class Wizard?


Class Wizard is a tool using which member variables; messages
and ActiveX events are incorporated into a project. Class Wizard
is a program implemented as a DLL, that’ s accessible from VC++
view menu. Class Wizard write the prototypes, function bodies
and if necessary the code to link windows message to the
function.
6. What are the important classes of an VC++ program?
i.Application class CMyApp:public CWinApp
This class creates all components required for an application,
receives all user inputs and events and pass the message to View
and Frame classes.
ii.Frame class CMainFrame:public CFrameWnd
This class is the Window frame. It holds menu bar, status bar, and
other resource attached to the frame.
iii.View class CMyView:public CView
This class provides the visual representation.
iv.Document class CMyDoc:public CDocument
This class stores all the information about the changes done in
output window.

7. Define Message map.


Message map is used to add member functions for the events. It
contains the project lists, all the classes contained in the project
which includes both built-in and user defined classes.

8. Define Mapping modes.


Mapping mode is a device context attribute that defines how
Windows maps logical coordinates that are specified in GDI
functions to device coordinates of the particular device.

10. What are the Mapping Mode identifiers?


MM_TEXT , MM_LOMETRIC , MM_HIMETRIC , MM_LOENGLISH ,
MM_HIENGLISH , MM_TWIPS , MM_ISOTROPIC , MM_ANISOTROPIC.

11. What is a Fixed-scale mapping mode?


All Fixed scale-mapping modes have a actual scale factor. In
these mapping modes, x value increases while moving the cursor
right and y value decrease as the cursor is moved down. The
Fixed scale mapping modes are MM_LOENGLISH,
MM_HIENGLISH, MM_LOMETRIC, MM_HIMETRIC, and MM_TWIPS.

12. What is a Variable-scale mapping mode?


With these mapping modes, drawing can change the size as the
user changes the size of the window. The two Variable-scale
mapping modes are MM_ISOTROPIC, MM_ANISOTROPIC.

13. What are GDI objects?


A window GDI object type is represented by an MFC library class.
CGdiObject is the abstract base for the GDI object classes. A c++
object of a class derived from CGdiObject represents a windows
GDI object.

14.Mention some of the GDI derived classes?


CBitmap, CBrush, CFont, CPalette, CPen, CRgn

15. What is system font?


The system font is the font that windows use by default for text
string like strings in title bars, menus and dialog boxes. The
system font is a razor font, which means that the characters are
defined as block of pixels. The size of the character in the system
font is based on the size of title video display.

16.What is the use of get system metrics function?


The function retrieves information about the size of various
graphical item in windows such as icon, occurs, title bars and
scroll bars. This function is an important function for achieving
device independent graphical outline in the program. This needs a
single argument called an index. This function returns an integer
usually the size of the item specified in the argument.

17. Explain the display context classes CClientDC and


CWindowDC?
Window’ s client area excludes the border, the caption bar, and
the menu bar. If we construct an object of class CClientDc, the
point (0,0) is at the upper-left corner of the
client area. If we construct an object of class CWindowDC the
point (0,0) is the upperleft corner of the non-client area.
18. What is the state of the device context?
The current state of the device context includes the following:
· Attached GDI drawing objects such as pens, brushes, and fonts.
· The mapping mode that determines the scale of items when
they are drawn.
· Various details such as text alignment parameters and polygon
filling mode.

19. Define font.


A font is complete collection of characters of a particular typeface
and a particular face. Fonts are generally stored on disk as
resources (GDI fonts), and some are device
specific (Device fonts).

20. What are the types of GDI fonts?


There are three different types of GDI fonts:
i. Raster fonts ii. Stroke fonts iii. True type fonts.

21. What is a dialog box?


A dialog or dialog box is a window that receives messages, that
can be moved and closed , and that can even accept drawing
instructions in its client area. Dialog boxes belong to a
predefined , exclusive window class. Applications do not have
direct access to the predefined window class, but they can use
the dialog box procedure to modify the style and behavior of a
dialog box.

22. What is a modal dialog box?


A modal dialog box does not allow the user to switch away from it
after it is invoked. It should be dismissed first before switching to
any other window. E.g.)Open dialog box of a file menu in MS-
WORD.
23. What is a modeless dialog box?
A modeless dialog box allows the user to switch to other windows
without dismissing it first. Because of this, the variable used to
implement the modeless dialog box should not go out of scope in
the dialog box’ s lifetime. E.g.) Find and Replace dialog of MS-
WORD.
24. List Windows common Dialog classes?
• CColorDialog
• CFileDialog
• CFindReplaceDialog
• CPageSetupDialog
• CFontDialog
• CPirntDialog

25.List out the Windows common controls.


The Windows common controls are:
1.Track bar control or Slider control
2. Progress indicator
3. Spin button control
4. Image List control
5. Edit controls
6. Animation control
7. Combo BoxEx control
8.Month calendar control
9.Date and Time control
10. Tree control

26.What are dialog controls?


A dialog contains a number of elements called controls.
Dialog controls include: Edit controls, Buttons. List boxes, Combo
boxes, Static text, Tree views, progress indicators, Sliders.
UNIT III
1. What do you meant by Document view Architecture?
The MFC library contains applications and frame classes plus two
other classes that represent the “document” and “view”. This
document-view architecture is the core of the application
framework and is loosely based on the Model/view/ Controller
classes. Document-view architecture separates data from the
user’s view of the data.

2. What is a Menu?
A menu is a familiar application element that consists of a top-
level horizontal list of items with associated pop-up menus that
appear when the user selects a top-level menu.

3.What is an Accelerator?
Accelerators are short cut keys that help to choose multiple level
options of menu with a single key. A keyboard accelerator entry
does not have to be associated with menu item.

4. What are the functions used to load a menu?


MFC provides a class for menus, CMenu. This supports creating
menu items. The functions used are:
i.Load Menu ii. Set Menu
CMenu m;
m.LoadMenu();
m.SetMenu();

5. What is a floating pop-up menu?


A Floating Pop-up menu is the menu that is displayed while right
clicking the mouse any where in the window.

6.Classify menu?
A menu is a GUI, which contains a list of menu items.
The various types of menu are,
i. System Menus
ii. Popup Menu
iii. Dropdown Menu
7. What is MFC Text Edition?
MFC supports text edition using two options.
i. Edit Control ii.Rich Edit Control.
These are supported by the classes CEditView, CRichEditView.

8.What is a Rich Edit Control?


Rich Edit Control is a MFC text editing feature. It supports mixed
font and large quantities of text than ordinary edit control.

9. Define Command processing.


The application frame work provides a sophisticated routing
system for command messages. These messages originate from
menu selections, keyboard accelerators, and toolbars and dialog
button clicks. Command messages can also be sent by calls to
functions SendMessage and PostMessage which belong to CWnd
class.

10.What is a toolbar?
Toolbars are menu item equivalents. They are represented as
icons. Each toolbar is associated with a menu item. A toolbar
consists of horizontally (or vertically) arranged graphical buttons
that must be clustered in groups. Toolbar is an object of CToolBar.

11.Define Tooltip.
When the user positions the mouse on a toolbar button for a
certain interval , text is displayed in a little box next to button
which is called as a Tooltip.

12. Define Status bar.


The status bar window neither accepts user inputs nor generates
command messages. Its job is simply to display text in panes
under program control. The status bar supports two types of text
panes - message line panes and status indicator panes.

Das könnte Ihnen auch gefallen