Available resources in vs-Basic

Source: Internet
Author: User
The resources available in Visual C ++ 6.0 integrated development environment include menus, acceleration keys, string tables, bitmaps, icons, and dialogs. In the "insert resource" dialog box shown in Figure 5-1, the available resources in program development are provided.

Figure 5-1 integrate resources in the development environment

Resource Import and Export

In some cases, we also use resources other than those provided by the development environment. Visual c ++ 6.0 integrated development environment allows us to import or export other resources.

In the "insert resource" dialog box shown in Figure 5-1, we can select the resources required in the program design and click "new" to insert them into the current program. If you have edited resources, click the "import" button to select the resources from the "Import resource" dialog box and import them to the program currently designed.

The resources that can be imported in Visual C ++ 6.0 integrated development environment include bitmap, icon, cursor, HTML, and WAV ), you can even import the designed program framework form (FRM) to the dialog box resource in Visual C ++. You can also click custom to insert other custom resources.

In addition to inserting resources into the program, you can also right-click the resource project in the "resource view" Panel of the Project workspace and select the "Export" command from the shortcut menu, export bitmap, cursor, icon, and other resources in the program to an independent file.

Resource template

Some commonly used resources in program development can be saved as resource templates for multiple use without having to re-edit each time.

The method for creating a resource template is basically the same as that for creating a resource file. You must select the "Save as" command under the "file" menu to save the template as a resource template file (RDBMS) save to "…" "Microsoft Visual Studio" common "msdev98" template "folder.

After the resource is saved, you can insert and use the resource in the "Import resource" dialog box.

Resource symbols

The program calls resources with the resource symbol ID. A resource symbol ID is composed of strings used to reference resources or objects in the program code or resource editor. The resource ID maps to the unique integer value in the program. When a new symbol is created, the system automatically assigns a value to it.

A symbolic ID usually uses a descriptive prefix to indicate the resource or object type. See Table 5-1.

Table 5-1 common symbol prefixes

Type

Prefix

For example

Bitmap

Idb _

Idb_moon

Cursor

IDC _

Idc_cross

Icon

Idi _

Idi_save

Menu/acceleration key

Idr _

Idr_mainframe

String table

IDS _

Ids_aboutbox

Dialog Box

IDD _

Idd_mydlg

Message Box

IDP _

Idp_warn

Widget

IDC _

Idc_butstart

Command

Id _

Id_file_new

By default, symbols and corresponding values are stored in the resource. h file generated by the system. You can right-click the root folder in the "resource view" Panel of the Project workspace and choose "resource symbols" from the context menu, in the displayed "resource symbols" dialog box, browse the defined symbols and corresponding values in the program.

You can modify the resource symbol in the "resource symbols" dialog box, or right-click the resource item in the "resource view" Panel of the Project workspace, in the shortcut menu that appears, select the "properties" command to modify the resource ID.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.