際際滷

際際滷Share a Scribd company logo
Visual C++ Programming
Resources A resource represents data which is included in the executable file of an application. Graphic objects such as Icons, Cursors, Message Box, Dialog Boxes, Fonts, Bitmaps, Pens, Brushes etc are all resources. They add a high level of user interactivity to an application. VC++ compiler consists of several Resource editors. A Windows resource can be added to the resource file(.rc) using the resource editors. These resources are compiled using the resource compiler(rc.exe).
Bitmaps Bitmaps are a type of picture that an application can use. Typically they are used for pictures that will not be scaled or contain text. They are blocks of pixel data that can be output directly to a device such as video display. Painting bitmaps onto a screen is much faster than using GDI functions like Rectangle and LineTo. 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. When they are scaled , they lose quality and text is distorted.
ICONS 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. Unlike other resources(menus ,dialogs), an icon is not stores as a text script within the resource file. 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.
Menus Menus allow the users to point and select options that are predefined. Each item  is uniquely identified by a ID and various properties can be set using the property window. 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.
Dialog Box A dialog box is a window that contains controls to handle user input. It is the user-interface equivalent to a printed form. It is normally displayed in response to the selection of  menu item and appear as a pop-up window to the user. A menu item that is followed by a dialog box has its name ending with an ellipsis().
Dialog Box(contd..) There are three types of dialog boxes. Modal Require the user to respond before continuing with that application. System Modal Similar to modal dialog boxes except that they supersede the entire desktop area. Modeless Stay on the screen and are available for use at any time but permit other user activities.
ToolBox Controls Pointer Button CheckBox EditBox ComboBox ListBox GroupBox RadioButton Static Text Picture Horizontal Scroll Bar Vertical Scroll Bar 際際滷r  Spin Progress Hot Key List Control Tree Tab Animation Rich Edit 2.0

More Related Content

Vc++ 2

  • 2. Resources A resource represents data which is included in the executable file of an application. Graphic objects such as Icons, Cursors, Message Box, Dialog Boxes, Fonts, Bitmaps, Pens, Brushes etc are all resources. They add a high level of user interactivity to an application. VC++ compiler consists of several Resource editors. A Windows resource can be added to the resource file(.rc) using the resource editors. These resources are compiled using the resource compiler(rc.exe).
  • 3. Bitmaps Bitmaps are a type of picture that an application can use. Typically they are used for pictures that will not be scaled or contain text. They are blocks of pixel data that can be output directly to a device such as video display. Painting bitmaps onto a screen is much faster than using GDI functions like Rectangle and LineTo. 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. When they are scaled , they lose quality and text is distorted.
  • 4. ICONS 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. Unlike other resources(menus ,dialogs), an icon is not stores as a text script within the resource file. 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.
  • 5. Menus Menus allow the users to point and select options that are predefined. Each item is uniquely identified by a ID and various properties can be set using the property window. 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.
  • 6. Dialog Box A dialog box is a window that contains controls to handle user input. It is the user-interface equivalent to a printed form. It is normally displayed in response to the selection of menu item and appear as a pop-up window to the user. A menu item that is followed by a dialog box has its name ending with an ellipsis().
  • 7. Dialog Box(contd..) There are three types of dialog boxes. Modal Require the user to respond before continuing with that application. System Modal Similar to modal dialog boxes except that they supersede the entire desktop area. Modeless Stay on the screen and are available for use at any time but permit other user activities.
  • 8. ToolBox Controls Pointer Button CheckBox EditBox ComboBox ListBox GroupBox RadioButton Static Text Picture Horizontal Scroll Bar Vertical Scroll Bar 際際滷r Spin Progress Hot Key List Control Tree Tab Animation Rich Edit 2.0