Vc++ 2

652 views
572 views

Published on

Published in: Education
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
652
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
30
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Vc++ 2

  1. 1. Visual C++ Programming
  2. 2. Resources <ul><ul><li>A resource represents data which is included in the executable file of an application. </li></ul></ul><ul><ul><li>Graphic objects such as Icons, Cursors, Message Box, Dialog Boxes, Fonts, Bitmaps, Pens, Brushes etc are all resources. </li></ul></ul><ul><ul><li>They add a high level of user interactivity to an application. </li></ul></ul><ul><ul><li>VC++ compiler consists of several Resource editors. </li></ul></ul><ul><ul><li>A Windows resource can be added to the resource file(.rc) using the resource editors. </li></ul></ul><ul><ul><li>These resources are compiled using the resource compiler(rc.exe). </li></ul></ul>
  3. 3. Bitmaps <ul><li>Bitmaps are a type of picture that an application can use. </li></ul><ul><li>Typically they are used for pictures that will not be scaled or contain text. </li></ul><ul><li>They are blocks of pixel data that can be output directly to a device such as video display. </li></ul><ul><li>Painting bitmaps onto a screen is much faster than using GDI functions like Rectangle and LineTo. </li></ul><ul><li>The drawback of bitmaps are that they take up a lot of memory and disk space and they do not scale well, especially if they contain text. </li></ul><ul><li>When they are scaled , they lose quality and text is distorted. </li></ul>
  4. 4. ICONS <ul><li>An icon is also a resource. It is a picture that consists of a bitmap image combined with a mask to create transparent areas in the picture. </li></ul><ul><li>Unlike other resources(menus ,dialogs), an icon is not stores as a text script within the resource file. </li></ul><ul><li>Since an icon consists of graphics information, an icon is placed in a separate binary file with an extension .ico which is referenced in the .rc file. </li></ul>
  5. 5. Menus <ul><li>Menus allow the users to point and select options that are predefined. </li></ul><ul><li>Each item is uniquely identified by a ID and various properties can be set using the property window. </li></ul><ul><li>Since the resource ID of the menu is an integer, the MAKEINTRESOURCE macro has to be used to convert the integer value to a resource type compatible with the Win32 resource-management function. </li></ul>
  6. 6. Dialog Box <ul><li>A dialog box is a window that contains controls to handle user input. </li></ul><ul><li>It is the user-interface equivalent to a printed form. </li></ul><ul><li>It is normally displayed in response to the selection of menu item and appear as a pop-up window to the user. </li></ul><ul><li>A menu item that is followed by a dialog box has its name ending with an ellipsis(…). </li></ul>
  7. 7. Dialog Box(contd..) <ul><li>There are three types of dialog boxes. </li></ul><ul><ul><li>Modal </li></ul></ul><ul><ul><ul><li>Require the user to respond before continuing with that application. </li></ul></ul></ul><ul><ul><li>System Modal </li></ul></ul><ul><ul><ul><li>Similar to modal dialog boxes except that they supersede the entire desktop area. </li></ul></ul></ul><ul><ul><li>Modeless </li></ul></ul><ul><ul><ul><li>Stay on the screen and are available for use at any time but permit other user activities. </li></ul></ul></ul>
  8. 8. ToolBox Controls <ul><li>Pointer </li></ul><ul><li>Button </li></ul><ul><li>CheckBox </li></ul><ul><li>EditBox </li></ul><ul><li>ComboBox </li></ul><ul><li>ListBox </li></ul><ul><li>GroupBox </li></ul><ul><li>RadioButton </li></ul><ul><li>Static Text </li></ul><ul><li>Picture </li></ul><ul><li>Horizontal Scroll Bar </li></ul><ul><li>Vertical Scroll Bar </li></ul><ul><li>Slider </li></ul><ul><li>Spin </li></ul><ul><li>Progress </li></ul><ul><li>Hot Key </li></ul><ul><li>List Control </li></ul><ul><li>Tree </li></ul><ul><li>Tab </li></ul><ul><li>Animation </li></ul><ul><li>Rich Edit 2.0 </li></ul>

×