⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wre.gml

📁 开放源码的编译器open watcom 1.6.0版的源代码
💻 GML
📖 第 1 页 / 共 2 页
字号:
.chap *refid=resedit The &company Resource Editor
.*
.if &e'&dohelp eq 0 .do begin
.section Introduction
.do end
.*
.np
.ix 'Resource Editor'
The &company Resource Editor is a full-featured editor that enables
you to easily create and edit resources and the files that contain
them. A file containing one or more resources will generally be
referred to as a resource file. A resource file may be an executable
(.EXE), resource file (.RES), dynamic link library (.DLL), bitmap file
(.BMP), cursor file (.CUR), or icon file (.ICO). The editor also
supports a variety of resource scripts. They include dialog (.DLG),
accelerator (.ACC), menu (.MNU), and string (.STR) scripts. This
support is accomplished by maintaining a synchronized resource file
(.RES) in the same directory as the resource script.
.ix 'Resource File' 'in Resource Editor'
.ix 'Resource Editor' 'resource file'
Opening a resource file reveals a Resource window in the Resource
Editor window. This window is a visual representation of the resource
file.
.np
.ix 'resource' 'defined'
A resource is a piece of data with a specific format that Windows uses
to create the visual and interactive elements of your application.
Most of the visual aspects of Windows applications are the result of
the application having resources, all of which can be created using
the &company Resource Editor. Use the Resource Editor to create and
edit the following resource types:
.begbull $compact
.bull
Accelerators
.bull
Bitmaps
.bull
Cursors
.bull
Dialogs
.bull
Icons
.bull
Menus
.bull
Strings
.endbull
.np
When designing your application's user interface, the resources are
separate from the application's source code. This makes changing the
user interface a simple task. Instead of accessing the application's
source code, you can make the changes directly to the resources. You
can manipulate some aspects of the resources, such as the memory flags
and resource names, without invoking the resource's associated editor.
Invoking the desired editor from the Resource Editor enables you to
change all aspects of the selected resource.
.np
Different applications often use the same or similar resources, such
as bitmaps, icons, dialogs, and menus. The Resource Editor enables you
to create resource files for a new application by reusing existing
resources. Copying a resource from existing applications into the new
resource file makes the task of creating your user interface quick and
simple.
.*
.section Using the &company Resource Editor
.*
.np
This section discusses the following topics:
.begbull $compact
.bull
Starting the Resource Editor
.bull
Quitting the Resource Editor
.bull
The Resource Editor Menu Bar
.bull
The Resource Editor Toolbar
.endbull
.*
.beglevel
.*
.section Starting the Resource Editor
.*
.np
.ix 'Resource Editor' 'start'
.ix 'start' 'Resource Editor'
To start the Resource Editor, double click on the Resource Editor icon
in your Windows Program Manager. The &company Resource Editor window
opens.
.keep 16
.figure *depth='3.20' *scale=56 *file='RES1' The &company Resource Editor window acts as a workspace where you work with resources.
.*
.section Quitting the Resource Editor
.*
.np
.ix 'Resource Editor' 'leave'
.ix 'leave' 'Resource Editor'
.ix 'quit' 'Resource Editor'
To exit the Resource Editor, choose Exit from the File menu of the
&company Resource Editor window. If you made changes to the current
file, a message box appears prompting you to save the changes. Select
Yes to save the file and exit the Resource Editor, No to exit the
Resource editor without saving the file, or Cancel to return to the
Resource editor.
.keep 15
.figure *depth='1.49' *scale=67 *file='RES2' As a safety feature, a message box appears when you select Exit from the File menu without saving a modified resource file.
.*
.section The Resource Editor Menu Bar
.*
.np
.ix 'Resource Editor' 'menu bar'
.ix 'menu bar' 'for Resource Editor'
The menu bar consists of the following five menus:
.begpoint
.point File
Open a new or existing resource file, save the current resource file,
and exit the Resource Editor
.point Edit
Access the clipboard functions, delete the selected resource, and set
the Resource Editor options
.point Resource
Open a new resource and work with existing resources
.point Window
Customize the Resource Editor workspace
.point Help
Access on-line help information
.endpoint
.np
To see the function of a menu item, hold the mouse button and drag the
cursor over the desired menu item. A description of the item appears
in the status line at the bottom of the screen. If you do not want to
select the menu item, drag the cursor off of the menu item before
releasing the mouse button.
.*
.section The Resource Editor Toolbar
.*
.ix 'Resource Editor' 'toolbar'
.ix 'Toolbar' 'in Resource Editor'
.np
In the &company Resource Editor window, the toolbar appears below the
menu bar. When the toolbar is shown, choose Hide Toolbar from the
Window menu to hide it. When the toolbar is hidden, you can display it
by choosing Show Toolbar from the Window menu.
.keep 16
.figure *depth='0.43' *scale=100 *file='RES3' You can access six Resource Editor functions from the toolbar.
.np
The following explains the function each toolbar button performs, as
well as the equivalent menu item.
.begnote
.note CREATE
Create a new resource file. This is equivalent to the New item in the
File menu.
.note OPEN
Open an existing resource file. This is equivalent to the Open item in
the File menu.
.note SAVE
Save the resource file. This is equivalent to the Save item in the
File menu.
.note CUT
Cut the selected resource to the clipboard. This is equivalent to the
Cut item in the Edit menu.
.note COPY
Copy the selected resource to the clipboard. This is equivalent to the
Copy item in the Edit menu.
.note PASTE
Paste the resource on the clipboard to the specified resource file.
This is equivalent to the Paste item in the Edit menu.
.endnote
.np
To see the function of an item in the toolbar, position your cursor
over the desired button. A description of the button's function
appears in the status line at the bottom of the window.
.*
.endlevel
.*
.section Working with Resource Files
.*
.np
In the &company Resource Editor, the items in the File menu apply to
resource file. These items enable you to perform the following
functions:
.begbull $compact
.bull
Creating a New Resource File
.bull
Opening an Existing Resource File
.bull
Saving a Resource File
.endbull
.*
.beglevel
.*
.section Creating a New Resource File with the Resource Editor
.*
.ix 'Resource Editor' 'create new resource file'
.ix 'resource file' 'create new'
.ix 'New option'
.np
Create a new resource file each time you need a file to hold a
collection of resources. You can create the resources and add them to
the new file or you can copy existing resources from another file and
place them in the new file.
.keep 19
.figure *depth='3.20' *scale=56 *file='RES4' Choosing New opens an untitled and empty Resource window into which you can store resources.
.np
To create a new resource file, choose New from the File menu in the
&company Resource Editor window. An untitled and empty Resource dialog
appears on the screen. From here, you can begin adding resources to
the resource file. You can also open an existing resource file and
copy selected resources to the new file. The file remains untitled
until you save it and assign it a file name.
.*
.section Opening an Existing Resource File with the Resource Editor
.*
.ix 'Resource Editor' 'open existing resource file'
.ix 'resource file' 'open existing'
.ix 'Open option'
.np
Open an existing resource file to view the resources for that file or
perform functions on the file's resources.
.figure *depth='3.20' *scale=56 *file='RES5' Choosing Open permits you to access resources in an existing file.
.begstep To open an existing resource file:
.step Choose Open from the File menu
in the &company Resource Editor window.
.result
An Open File dialog appears where you select the file you want to
open.
.step Double click on the desired file
.orstep Click on the desired file
to select it, then
.bd click on OK.
.result
The Open File dialog closes and a Resource dialog for the selected
resource file appears in the Resource Editor window. This dialog
displays a button representing each type of resource that exists in
the resource file. Clicking on the resource buttons displays a list of
the resources of that type in the resource file.
.np
From here, you can perform any of the functions in the section
entitled :HDREF refid='workres'..
.endstep
.*
.section Saving a Resource File with the Resource Editor
.*
.np
There are two menu items that you can use to save resource files with
the Resource Editor:
.begbull $compact
.bull
Save
.bull
Save As
.endbull
.begnote
.note Important:
You can have several resource files open in the Resource Editor window
at one time. The caption bar of the currently selected resource file
appears highlighted. Only this window is affected when you choose Save
or Save As from the File menu.
.endnote
.*
.beglevel
.*
.section Resource Editor: Save
.*
.ix 'Save option'
.ix 'Resource Editor' 'Save'
.ix 'resource file' 'save'
.np
.bd Choose Save
from the File menu in the &company Resource Editor window to save any
changes made to the resource file.
.np
If the file is new and previously unsaved, refer to the section
entitled :HDREF refid='saveas'..
.np
After modifying individual resources, you perform an update at the
resource level. The resource file and its resources are not saved
until you select Save from File menu of the Resource Editor. The
Resource Editor prompts you if you attempt to exit the editor without
saving changes. Choose Yes to save the file and exit the Resource
Editor, No to exit the Resource Editor without saving the file, or
Cancel to return to the Resource Editor.
.*
.section *refid=saveas Resource Editor: Save As
.*
.ix 'Save As'
.ix 'Resource File' 'save as'
.ix 'Resource Editor' 'Save As'
.np
.begstep To save a resource file to another file:
.step Choose Save As
from the File menu in the &company Resource Editor window to save any
changes made to the resource file.
.result
A Save File dialog appears where you specify the file to which you
want to save the current resource file.
.step Specify the file
to which you are saving by selecting an existing file or entering the
name of a new file.
.step Click on OK
when completed.
.keep 17
.figure *depth='1.65' *scale=67 *file='RES6' A Save File message box appears when you attempt to save the current resource file to an existing file.
.result
The dialog closes and the Resource Editor saves the resource file,
returning you to the Resource Editor window.
.begnote
.note Note:
If you attempt to save the current resource file to an existing file,
a Save File window appears informing you that the selected file
already exists. Choosing Yes on this dialog overwrites the selected
existing file with the contents of the current resource file.
.endnote
.result
The dialog closes and the Resource Editor saves the resource file,
returning you to the Resource Editor window.
.result
The dialog closes and the Resource Editor saves the resource file,
returning you to the Resource Editor window.
.endstep
.*
.endlevel
.*
.endlevel
.*
.section *refid=workres Working with Resources
.*
.np
The items in the Edit and Resource menus in the &company Resource
Editor window enables you to perform functions on resources within a
resource file. To use these functions, a resource file must be open in
the workspace. This resource file can be empty or can contain existing
resources. The functions you can perform are:
.begbull $compact
.bull
Creating a New Resource
.bull
Editing an Existing Resource
.bull
Saving a Resource
.bull
Using Shortcuts to Create a Resource
.bull
Deleting a Resource
.bull
Renaming a Resource
.bull
Changing Memory and Load Options
.endbull
.*
.beglevel
.*
.section Creating a New Resource

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -