Copyright: Resource Workshop Users Guide, ver 5.0
Citation: Copyright © 1996 Borland International.


Getting started with Resource Workshop

See also

You use Resource Workshop to:

Create and edit resource script (.RC) files.

Edit resources in binary files, including those linked to existing applications and dynamic-link libraries.

Create and edit graphic files.

For more information, choose one of the following Help topics:

What is a resource?

Why you should link resources to your applications

What is a resource script (.RC) file?

What is a binary resource (.RES) file?

What file types does Resource Workshop generate?


What is a resource?

See also

A resource is binary data that is linked to an application executable (.EXE), dynamic-link library (.DLL), or other binary file. Usually a resource defines one or more of the following user interface components:

A dialog box, which is a pop-up window that uses labels, text boxes, buttons, check boxes, scroll bars and other controls to give information to and receive information from a user.

A menu, which is a list of commands from which a user can choose. Types of menus include menus that appear on a application's menu bar, pop-up menus, which can appear anywhere on the workspace, and cascading menus, which can appear when you choose a menu command.

An accelerator table, which is one or more key combinations that a user can press to perform an action.

A string table, which is one or more text strings that can contain descriptions, prompts, and error messages.

A bitmap, which is a graphic image, such as a picture, logo, or other drawing.

A cursor, which is a graphic image that shows the position of the mouse on the screen and indicates the types of actions a user can perform.

An icon, which is a graphic image that represents a minimized window.

A resource can also define:

Version information, which is a block of data that can be used in several Windows API functions. The version information resource specifies the version number, file type, and operating system of a application.

A custom data type, which is any data that you want to link to an application.

You create or edit resources using Resource Workshop, then you compile the resource, creating a binary (.RES) file that is linked into your application.


Why you should link resources to your applications

See also

By linking resources to an application, you can keep data separate from code. This separation lets you easily:

Find and change parts of the application.

Change an application without changing source files.

Share data among your applications.

Create and edit resources in a graphical environment.

Using Resource Workshop, you can extract, modify, and save resources directly into a binary file.

You can include the same resources in any application. You do not need to recreate a resource each time you want to use it.

As you create or edit a resource, you can see just how the resource will appear in your application. You do not have to compile and run your application to see user interface changes.


What is a resource script (.RC) file?

See also

A resource script (.RC) file contains one or more sets of ASCII data, called resource scripts, from which binary resources can be generated.

When you create and edit resources with Resource Workshop editors, you are creating and editing a resource script automatically. Each resource type has a different resource script format, but you do not need to know these formats unless you plan to edit a resource script in a text editor.

The resource script file for a resource project appears in the Resource Project window. Valid resource projects are .RC, RES, .ICO, .CUR, and .BMP files.

When a resource script file is compiled, it becomes a binary resource (.RES) file.


What is a binary resource (.RES) file?

See also

A binary resource file is a compiled resource script file. You can compile a resource script file into one or more binary resource files, then link the resources to an application.

Usually when creating a Windows program, you compile all resources for an application into a single .RES file, and then you bind the .RES file to the executable file as part of the linking process.

Once the resources are linked, the application’s source code can refer to the resources using the identifiers used in resource script file.

If you want to change the resources in a compiled binary file, Resource Workshop decompiles the file and let you make the changes, then save the resources back to the original file.


Setting preferences

See also

When you first use Resource Workshop, you may want to set preferences for how it works.

Choose Options|Environment|Resource Editors to bring up the Options dialog box where you set configuration options.

You can:

Choose the target for your resources

Create backup files each time you save a project

Choose how identifiers are generated and the identifier prefix

Set the number of changes you want to trace when you undo or redo actions

Add or remove control libraries

Choose options for the Dialog, Menu, and Graphics editors


Undoing mistakes

See also

Resource Workshop lets you undo or redo any action with the Edit|Undo or the Edit|Redo commands. Edit|Undo "undoes" your most recent action. Edit|Redo reverses the effect of the most recent Undo command.

Edit|Undo

The Edit|Undo command inserts any characters you deleted, deletes any characters you inserted, replaces any characters you overwrote, and moves your cursor back to its prior position. It also undoes operations in the Dialog, Menu, and the Graphics editors.

If you undo a block operation on a resource, the resource will appear as it was before you executed the block operation. The Undo command will not change an option setting that affects more than one window.

If you continue to press Undo, it continues to undo changes until it reaches the number specified in the Undo Levels box (one of the Options|Environment|Resource Editors SpeedSettings.) Depending on the amount of memory in your computer, you can undo or redo up to 99 actions. The default number is 10.

Edit|Redo

The Edit|Redo command is effective only immediately after you use Edit|Undo or Edit|Redo. A series of Redo commands reverses the effects of a series of Undo commands.


Starting Resource WorkShop

See also

To start Resource Workshop, do one of the following

Double-click an existing .RC node in the IDE Project Window

Choose File|Open and open an existing .RC file

Choose File|New|Resource Project

Right-click an .EXE or .DLL node and select Edit Resources

Note:	Clicking on a .RES, .BMP, .ICO, or .CUR node also invokes the editor on that project.


Working with icons (overview)
Working with icons

See also	Examples

Icons are small bitmapped images, normally 16 x 16, 32 x 32, 48 x 48, or 64 x 64 pixels in size. Windows programs typically use customized icons to represent minimized windows.

To design icons, use the Resource Workshop Graphics editor.

Working with icons involves four basic steps:

1.	Start the Graphics editor.

2.	Create or edit an icon.

3.	Test the icon.

4.	Save the icon.


Creating a new icon

See also

You can add a new icon to a resource project file, or create the icon in a standalone file. To add a new icon to a new or existing .RC file,

1.	Open the resource project you want to add the icon to, or create a new one by choosing File|New|Resource Project. The New Resource Project dialog box is displayed. Base your project on the .RC file type.

2.	Choose Resource|New to create a new resource for that project. Resource Workshop displays the New Resource dialog box.

3.	In the Resource Type list, select ICON.

4.	Click Options to specify attributes for the icon resource.

5.	Click OK to create the new icon.

Resource Workshop opens the Graphics editor where you customize the new icon resource.


Creating a new icon as a standalone file
Creating a new icon in a standalone file

See also

To create a standalone icon file with the extension .CUR,

1.	Open a resource project or create a new one.

2.	Choose Resource|New. Resource Workshop displays the New Resource dialog box.

3.	In the Resource Type list box, select ICON.

4.	Click Options to display the New Icon Image dialog box.

5.	In the Storage Format section, uncheck the Source Form checkbox.

6.	In the Icon Filename (.CUR) field, enter the path and name of the icon file. Click OK.

7.	Click OK again to create the new icon.

Resource Workshop opens the Graphics editor where you customize the new icon resource. The standalone icon file is linked to the current to a resource project file.

If you choose File|New|Resource Project. and select ICON in the New Resource Project dialog box, you automatically create a standalone icon file. Resource Workshop immediately starts the Graphics editor. You can then link the .CUR file to any resource project with the Add to Project command.


Editing an existing icon

See also

To edit an existing icon,

1.	Open an existing resource project.

2.	Double-click the icon resource you want to edit, or select it and choose Resource|Edit.

After the icon is opened in the Graphics Editor, you can customize it. Before you begin working on your icon, you may want to zoom it. You can change the icon's transparent and inverted areas and its attributes. You can also delete icon resources and images.

In addition to creating and modifying icons directly with the Graphics editor, you can also change the icon's resource script. It is unlikely that you'll want to do this because the script is almost entirely a series of hexadecimal values.

Design issues

Before you start, you should have an idea of what the icon represents to the user. The icon should be simple enough to fit into a 64 x 64, 48 x 48, 32 x 32, or 16 x 16 pixel area.

Think about where the user is most likely to display your icon. Background colors and patterns can affect the icon's transparent and inverted areas.

Drop shading

Drop shading is a technique you can use to make your icon look three dimensional. For example, to make a black box look three dimensional, draw a gray border on the right side and bottom of the box.


Adding an image to an icon resource

See also

You may want to put different color formats of the same icon in one icon resource project. These color variations on the same icon are called images.

The reason the icon resource supports different color formats is that Windows picks a color format based on the ability of the display hardware to support the format. Windows picks a 16-color format for the standard Windows VGA driver.

Windows 3.x does not fully support the 256-color version of an icon, even if your display hardware supports it. Your program must supply its own support for 256 colors. However, Windows 95 does and typically uses 256 colors for 48 x 48 or large icons.

To add a new image with different color formats to an existing icon resource,

1.	Open a resource project.

2.	Double-click the ICON entry you want to edit or select it and choose Resource|Edit.

3.	Choose Icon|New Image.

4.	Resource Workshop displays the New Icon Resource dialog box, where you choose the size and color format of the new image.

5.	Choose the same size as the existing image and a new color format and click OK.

6.	Double-click the new icon, or select it and choose Images|Edit Image. You see the Graphics editor where you customize the icon as needed.

Typically, what you do next is open one of the existing icon images and copy it into the new (still blank) image. You might also have to customize the image if the colors are translated in a way that changes the form of the icon.


Changing the attributes of an icon

See also

You can change an icon's attributes - color or size - with the Icon|Size and Attributes command.

This command displays the Icon Image Attributes dialog box, where you change an icon's size and color format.


Copying an icon image to a new color format

See also

You might want to have different color formats of the same image for different displays. To create another version, without starting over, you can copy and paste the image.

To copy and paste the image,

1.	Create a new image for your icon.

2.	Open the image you want to copy in the Graphics editor.

3.	Choose Edit|Select All to select the entire image.

4.	Choose Edit|Copy to copy the icon image to the Clipboard.

5.	Use File|Close to close the window.

6.	Choose Icon|New Image to create a new Icon image. In the New Icon Image dialog box, choose the size and color format of the new image.

7.	Double-click the new ICON entry in the Icon Project window.

8.	Choose Edit|Paste to paste the icon into the new image. It is displayed in the new color format.


Deleting an icon resource or image

See also

You can delete an icon resource or an icon image. Deleting an icon resource deletes all the images in that resource. Deleting an icon image removes that single image in the icon resource.

Deleting an icon resource

To delete an icon resource, select it in the Resource Project window then,

Press the Del key or right-click and choose Remove from Project to completely delete it.

Choose Edit|Cut to cut the resource into the Windows Clipboard so you can paste it elsewhere.

Deleting an icon image

To remove an image from an icon resource,

1.	Open the icon resource in the Resource Project window by double-clicking it or selecting it and choosing Resource|Edit.

2.	In the Icon Project window select the image entry you want to delete, then:

Press the Del key or right-click and choose Remove from Project to completely delete it.

Choose Edit|Cut to cut the resource into the Windows Clipboard so you can paste it elsewhere.


Testing an icon

See also

The easiest way to test an icon is to use the Icon|Test Icon command. The methods for testing an icon described below act as a general check of the icon. When testing the icon it displays as a 32 x32 pixel image and uses your computer's system colors. To see what the icon will really look like, you can bind the icon resource to an executable file and then run the file.

Two primary reasons for testing an icon are:

To see how a color icon looks in black and white when you move it around.

To see how transparent and inverted areas look against various backgrounds.

The first test is easy to perform: just move the icon around.

The second test takes a little more work. Here's how:

1.	Make sure the icon is visible and is in a spot where the application workspace is its background.

2.	Change tasks using Windows NT or Windows 95.

3.	Use the Control Panel to change the color of the active window's workspace.

4.	Leave the control panel settings window open so you can change the colors again.

5.	Change tasks back to Resource Workshop and check the icon against the new background color.

At this point, you should be able to see both Resource Workshop and the Color dialog box (NT) or Display Properties (Windows 95) at the same time. You can select another color for the workspace background and check the icon again.

When you change the color of the application workspace, the operating system changes the color in the application window, where you can check the icon against the new color.


Programming an icon with OWL

See also

To program an icon with OWL, use the TFrameWindow::SetIcon function.

For example, the following code assigns an icon to the main window:

GetMainWindow()->SetIcon(this, IDC_ICON1);

IDC_ICON1 is the identifier for the icon.


Programming an icon with the Windows API

See also

To program an icon with the Windows API, use the LoadIcon function.

For example, this code loads an icon resource into a variable:

HICON hIcon;

hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDD_ICON1));

IDD_ICON1 is the identifer for the icon.


Working with bitmaps (overview)
Working with bitmaps

See also	Examples

Bitmap resources display graphic images in your Windows program. Windows programs use bitmaps to represent scroll bar arrows, the Minimize and Maximize buttons, and so on.

To create bitmaps, you use the Resource Workshop Graphics editor.

Working with bitmaps involves four basic tasks:

1.	Start the Bitmap editor.

2.	Create or edit a bitmap.

3.	Test the bitmap.

4.	Save the bitmap.


Creating a new bitmap

See also

You can add a new bitmap to a new or existing resource project file, or create the bitmap in a standalone file. To add a new bitmap to a new or existing .RC file,

1.	Open the resource project you want to add the bitmap to, or create a new one by choosing File|New|Resource Project. The New Resource Project dialog box is displayed. Base your project on the .RC file type.

2.	Choose Resource|New to create a new resource for that project. Resource Workshop displays the New Resource dialog box.

3.	In the Resource Type list, select BITMAP.

4.	Click Options to specify attributes for the bitmap resource.

Resource Workshop opens the Graphics editor where you customize the new bitmap resource.


Creating a new bitmap in a standalone file

See also

To create a standalone bitmap file with the extension .BMP,

1.	Choose File|New|Resource Project. The New Resource Project dialog box is displayed.

2.	Click Bitmap in the New Project dialog box.

3.	Click Options to display the New Bitmap Project Options dialog box. Choose the colors and size of the bitmap image.

4.	Click OK.

Resource Workshop opens the Graphics editor where you customize the new bitmap resource. To link the standalone bitmap file to a resource project file, you need to save the .BMP file first. Then,

1.	Open a resource project file, or click in a .RC project window.

2.	Choose Add to Project.

3.	Select the .BMP file you created.


Editing a bitmap
Editing an existing bitmap

See also

To edit an existing bitmap,

1.	Choose File|Open and open an existing project (.RC or .BMP).

2.	If you opened a .RC file, double-click the BITMAP resource you want to edit, or select it and choose Resource|Edit.

After you open the bitmap in the Graphics editor, you can customize it. You may find the bitmap easier to work with if you zoom it first.

In addition to creating and modifying bitmaps directly with the Graphics editor, you can also change the bitmap's resource script. It is unlikely that you'll want to do this because the script is almost entirely a series of hexadecimal values.

You can choose the bitmap's foreground and background colors, and change its attributes. You can also delete bitmap resources.

You cannot, however, add transparent and inverted areas to your bitmap.


Changing the attributes of a bitmap

See also

You can change a bitmap's attributes with the Bitmap|Size and Attributes command.

This command displays the Set Bitmap Attributes dialog box, where you choose:

The bitmap image size

Whether the image will shrink or stretch if you change the overall image size

The number of colors used in the image

How the bitmap is stored


Deleting a bitmap resource

See also

To delete a bitmap resource, select it in the Resource Project window, then

Press the Del key or right-click and choose Remove from Project to completely delete it.

Choose Edit|Cut to cut the resource into the Windows Clipboard so you can paste it elsewhere.


Testing a bitmap

See also

To test your bitmap, you need to compile the bitmap resource and bind it to an executable file. Then you can run the executable file to see what the bitmap looks like.


Programming a bitmap with OWL

See also

To program a bitmap with OWL, use the TBitmap, TDip, TDibDC, and TClientDC classes.

For example, this code displays a bitmap in the center of the main window:

TBitmap bitmap1(*GetModule(), IDB_BITMAP1);

TMemoryDC memDC:

MemDC.Selectcbicct(bitmap 1);

TClientDC mainWindowDC(*GetMainWindow());

int centerX = GetMainWindow()->GetClientRect().Width() / 2;

int centerY = GetMainWindow()->GetClientRect().Height() /2;

int bitmapX = bitmap1.Width();

int bitmapY = bitmap1.Height();

mainWindowDC.BitBlt(centerX-bitmapX/2, centerY-bitmapY/2, bitmapX,

  bitmapY, memDC, 0, 0, SRCCOPY);

In the code, IDB_BITMAP1 is the identifier for the bitmap.


Programming a bitmap with the Windows API

See also

To program a bitmap the Windows API, use the LoadBitmap, GetObject, GetDC, CreateCompatibleDC, BitBlt, DeleteDC, and ReleaseDC functions.

For example, the following code displays a bitmap in the window represented by the HWnd variable:

HINSTANCE hInst;

HWND hWnd;

HDC hDC hDCMemory;

HBITMAP hBitmap, oldBitmap;

BITMAP bitmap;

// Get the bitmap resource and its handle.

hBitmap = LoadBitmap(hInst, MAKEINTRESOURCE(IDB_BITMAP1);

// Get the bitmap data.

GetObject(hBitmap, sizeof(BITMAP), &bitmap);

// Get the device context of the target window.

hDC = GetDC(hWnd);

// Create a compatible memory device context.

hDCMemory = CreateCompatibleDC(hDC);

// Select the bitmap into the memory DC

hOldBitmap = SelectObject(hDCMemory,hBitmap);

// Copy the bitmap onto the Window's device context.

BitBlt(hDC, 0, 0, bitmap.bmWidth, bitmap.bmHeight, mDCMemory, 0, 0, SRCCOPY);

// Clean up and exit.

SelectObject(hDCMemory, oldBitmap);

DeleteDC(hDCMemory);

ReleaseDC(hWnd, hDC);

In the code, IDB_BITMAP1 is the identifier for the bitmap.


Working with cursors (overview)
Working with cursors

See also	Examples

Cursors are bitmapped images 32 x 32 pixels in size that represent the mouse pointer's current location on the screen. A Windows application often has a number of different cursors that represent different program functions.

Windows provides a set of standard cursors you can use in your programs. In addition, you can create your own customized cursors to represent different functions of the program.

To design cursors, you use the Graphics editor.

Working with cursors involves four basic steps:

1.	Start the Graphics editor.

2.	Create or edit a cursor.

3.	Test the cursor.

4.	Save the cursor


Creating a new cursor

See also

You can add a new cursor to a resource project file, or create the cursor in a standalone file. To add a new cursor to a new or existing .RC file,

1.	Open the resource project you want to add the cursor to, or create a new one by choosing File|New|Resource Project. The New Resource Project dialog box is displayed. Base your project on the .RC file type.

2.	Choose Resource|New to create a new resource for that project. Resource Workshop displays the New Resource dialog box.

3.	In the Resource Type list, select CURSOR.

4.	Click Options to specify attributes for the cursor resource.

5.	Click OK to create the new cursor.

Resource Workshop opens the Graphics editor where you customize the new cursor resource.


Creating a new cursor in a standalone file

See also

To create a standalone cursor file with the extension .CUR,

1.	Open a resource project or create a new one.

2.	Choose Resource|New. Resource Workshop displays the New Resource dialog box.

3.	In the Resource Type list box, select CURSOR.

4.	Click Options to display the New Cursor Resource Options dialog box.

5.	In the Storage Format section, uncheck the Source Form checkbox.

6.	In the Cursor Filename (.CUR) field, enter the path and name of the cursor file. Click OK.

7.	Click OK again to create the new cursor.

Resource Workshop opens the Graphics editor where you customize the new cursor resource. The standalone cursor file is linked to the current to a resource project file.

If you choose File|New|Resource Project. and select CURSOR in the New Resource Project dialog box, you automatically create a standalone cursor file. Resource Workshop immediately starts the Graphics editor. You can then link the .CUR file to any resource project with the Add to Project command.


Editing an existing cursor

See also

To edit an existing cursor,

1.	Open an existing resource project.

2.	Double-click the CURSOR resource you want to edit or select it and choose Resource|Edit.

After you have the cursor open in the Graphics editor, you can customize it. Before you begin working on your cursor, you may want to zoom it. You can change the cursor's transparent and inverted areas and the number of colors it uses. You can also delete cursors.

In addition to creating and modifying cursors directly with the Graphics editor, you can also change the cursor's resource script. It's unlikely that you'll want to do this because the script is almost entirely a series of hexadecimal values.

Design issues

Before you start, you should have an idea of what your cursor is intended to represent. A typical use of a custom cursor is to represent the task the user is performing.

The hot spot is the cursor's active area where the user clicks to activate the task represented by the cursor. You need to make the hot spot obvious.

Do not make the cursor complicated. It should be simple enough to fit into a 32 x 32 pixel area. Think about where the user is most likely to display your cursor. Background colors and patterns can affect the cursor's transparent and inverted areas.


Setting the hot spot for a cursor

See also

An important consideration when you customize a cursor is where to put the hot spot (the cursor's active area). The hot spot is the single pixel in the cursor that fixes the location when the user places the cursor and clicks to make a selection.

To set a hot spot,

1.	Right-click and choose Zoom In to zoom the cursor image until it is big enough to let you precisely choose the pixel coordinates for the hot spot.

2.	Display a grid on the zoomed image.

3.	Select the Line tool.

4.	Point to the location on the zoomed image where you want the hot spot and look at the coordinates displayed on the status line.  Make a note of these coordinates.

5.	Choose Cursor|Set Hot Spot.

6.	Enter the hot spot's pixel coordinates in the Set Hot Spot dialog box. Press OK to accept the values.


Deleting a cursor

See also

You can delete a cursor resource or a cursor image. Deleting a cursor resource deletes all the images in that resource. Deleting a cursor image removes that single image in the cursor resource.

Deleting a cursor resource

To delete a cursor resource, select it in the Resource Project window then,

Press the Del key or right-click and choose Remove from Project to completely delete it.

Choose Edit|Cut to cut the resource into the Windows Clipboard so you can paste it elsewhere.

Deleting a cursor image

To remove an image from a cursor resource,

1.	Open the cursor resource in the Resource Project window by double-clicking it or selecting it and choosing Resource|Edit.

2.	In the Cursor Project window, select the image entry you want to delete, then:

Press the Del key or right-click and choose Remove from Project to completely delete it.

Choose Edit|Cut to cut the resource into the Windows Clipboard so you can paste it elsewhere.


Testing a cursor

See also

Anytime you want, you can test your cursor by choosing Cursor|Test Cursor.

Resource Workshop turns the current cursor into a test version of your cursor. You can move it around to see how it looks on different color backgrounds. When you finish testing, just click the mouse to continue customizing your cursor.


Adding an image to a cursor resource

See also

You may want to put different color formats of the same cursor in one cursor resource project. These color variations on the same cursor are called images.

The reason the cursor resource supports different color formats is that Windows picks a color format based on the ability of the display hardware to support the format. Windows picks a 16-color format for the standard Windows VGA driver.

Windows 3.x does not fully support the 256-color version of a cursor, even if your display hardware supports it. Your program must supply its own support for 256 colors.

To add a new image with different color formats to an existing cursor resource,

1.	Open a resource project.

2.	Double-click the CURSOR entry you want to edit or select it and choose Resource|Edit.

3.	Choose Cursor|New Image.

4.	Resource Workshop displays the New Cursor Image dialog box, where you choose the color format of the new image.

5.	Choose a new color format and click OK.

6.	Double-click the new cursor, or select it and choose Images|Edit Image. You see the Graphics editor where you customize the cursor as needed.

Typically, what you do next is open one of the existing cursor images and copy it into the new (still blank) image. You might also have to customize the image if the colors are translated in a way that changes the form of the cursor.


Changing the attributes of a cursor

See also

You can change a cursor's attributes - color or size - with the Cursor|Size and Attributes command.

This command displays the Cursor Image Attributes dialog box, where you change a cursor's size and color format.


Copying a cursor image to a new color format

See also

You might want to have different color formats of the same image for different displays. To create another version, without starting over, you can copy and paste the image.

To copy and paste the image,

1.	Create a new image for your cursor.

2.	Open the image you want to copy in the Graphics editor.

3.	Choose Edit|Select All to select the entire image.

4.	Choose Edit|Copy to copy the cursor image to the Clipboard.

5.	Use File|Close to close the window.

6.	Choose Cursor|New Image to create a new Cursor image. In the New Cursor Image dialog box, choose the color format of the new image.

7.	Double-click the new CURSOR entry in the Cursor Project window.

8.	Choose Edit|Paste to paste the cursor into the new image. It is displayed in the new color format.


Programming a cursor with OWL

See also

To program a cursor with OWL, use the TWindow::SetCursor function.

For example, the following application code assigns a cursor to the main window:

GetMainWindow()->SetCursor(this, IDC_CURSOR1);

IDC_CURSOR1 is the identifier for the cursor.


Programming a cursor with the Windows API

See also

To program a cursor with the Windows API, use the LoadCursor and SetCursor functions.

For example, the following code changes the active cursor:

HCURSOR hCursor;

hCursor = LoadCursor(hInst, MAKEINTRESOURCE(IDD_CURSOR1));

SetCursor(hCursor)

IDD_CURSOR1 is the identifier for the cursor.


Working with menus (overview)
Working with menus

See also	Examples

Menus are lists of commands the user chooses from. Most Windows applications have a menu bar across the top of the screen that contains the names of the application's menus. Each menu contains a set of commands.

Terminology

These terms describe the elements of a menu resource: pop-up command, pop-up menu, menu item, and menu separator.

Pop-up commands cause menus to be displayed. Pop-up commands can appear in the menu bar and can also appear inside pop-up menus, where they cause another menu (called a "cascading menu") to be displayed.

Pop-up menus are the rectangular boxes containing lists of commands from which a user can choose. They come in two forms:

Drop-down menus are displayed from the menu bar or from within a menu. They are tied to a pop-up command and are always displayed from that command's name.

SpeedMenus (also referred to as floating menus or contextual pop-up menus) can appear anywhere in the application window.

Menu items are the commands that appear in the menus, such as Open, Save, or Print.

Menu separators are the lines that divide the menu items into logical groups. Separators do not do anything other than make the menu easier to read and use.

Working with menus

The Menu editor makes it easy to create and edit menus. Working with menus involves four basic steps:

1.	Create a new menu or edit an existing menu. The Menu Editor opens automatically.

2.	Make changes to the menu.

3.	Test the menu.

4.	Save the menu.


Creating a new menu

See also

To create a new menu,

1.	Open the resource project you want to add the menu to, or create a new one by choosing File|New|Resource Project. The New Resource Project dialog box is displayed. Base your project on the .RC file type.

2.	Choose Resource|New to create a new resource for that project. Resource Workshop displays the New Resource dialog box.

3.	In the Resource Type list, select MENU (or MENUEX for 32-bit projects).

4.	Click Options to specify a type of menu other than the default.

5.	Click OK to place the new menu in the current resource project file.

Resource Workshop displays the Menu editor with a simple application menu you can begin customizing.


Editing a menu
Editing an existing menu

See also

To edit an existing menu, open the resource project in which the menu is stored and do one of the following:

Double-click the menu resource name in the Resource Project window.

Highlight the menu resource name and choose Resource|Edit.

Resource Workshop displays the Menu editor with the menu you have chosen already loaded.

Once a menu is loaded into the Menu editor, you are ready to add new menu commands, pop-up menus, or separators. You can also move, copy, or delete any part of the menu.

You can customize your menus by adding accelerators and help messages for menu items using the Menu editor Property Inspector.


Moving and copying menu statements

See also

You can drag and drop single menu items or entire menus. You can also use Cut, Copy, and Paste on the Menu SpeedMenu to move and copy the items in the menu's Edit window.

To move a item, click and drag it into the desired location. (You can also use Shift+ drag.) If you move a pop-up menu, the entire menu is moved. A blue line with inverted arrows indicates where the top of the box will be placed. If you highlight some or all of the text, cut, copy, and paste actions effect only the highlighted text.

To copy a item, use Control+ left mouse to click and drag it. You can also highlight it, right-click, and choose Copy. A copy is placed in the Windows Clipboard.

To insert the cut or copied item into your menu, select the item immediately after the point at which you want the item to appear, right-click, and Paste.

Undoing errors

The Menu editor lets you undo and redo changes. Choose Edit|Undo or Edit|Redo.


Adding menu items and separators

See also

You customize a menu by adding new menu items to it. You can customize your menu by adding new menu items, pop-up menus, and menu separators.

Items are always added before the selected item. To add items to the end, select the empty area at the end and insert the new item.

To add a new menu item, pop-up, or separator to a menu,

1.	Decide where you want the new menu item, pop-up, or separator to appear. Click the item in the menu's Edit window above where you want the statement added.

2.	Select the new item you want to insert before the selected item.

To insert a new menu item, right-click and choose New Menuitem or choose Menu|New Menuitem.

To insert a pop-up menu, right-click and choose New Popup or choose Menu|New Popup

To insert a new menu separator, right-click and choose New Separator or choose Menu|New Separator.

You can now edit the text string, menu ID, help message, and accelerators, if any.

Editing a menu item

A newly added menu item has the generic designation "Item." To make it useful, you need to edit it. You can edit the text that displays in the menu directly, or with the Property Inspector. With the Property Inspector, you can also change the menu's numeric ID and put a check mark next to the menu if it is a toggle.


Deleting a menu item

See also

To delete a menu item, click the item you want to delete, then:

Right-click and choose Cut to delete the statement and copy it to the Windows Clipboard.

Choose Edit|Clear to remove it completely.

Note that if you delete a POPUP statement, you delete the pop-up command it defines and all the items contained in the pop-up menu.


Creating a pop-up menu

See also

A pop-up menu is one that can be displayed anywhere in the application's workspace. It is not tied to the menu bar. Pop-up menus display when the right mouse button is clicked. The menu items displayed correspond to the selected object in the application.

Each pop-up menu must be saved as a separate menu resource within the resource project file.

To create a pop-up menu,

1.	Choose Resource|New. Resource Workshop displays the New Resource dialog box.

2.	In the Resource Type list, select MENU (or MENUEX for 32-bit projects).

When you view the menu in the Test Menu pane, it will still appear tied to the menu bar, but as long as your code uses the TrackPopupMenu function correctly, the menu will float at run time.

3.	Click the Options button to display the New Resource Options dialog box. Choose a popup menu style.

4.	Click OK to create the new pop-up menu. The menu displays as it will appear on the screen at runtime.

5.	Add any additional menu items you want.

6.	Edit the menu items using the Property Inspector if needed.

7.	Save your project.


Adding accelerator text to menus

See also

To let users know what accelerators they can use, you can add accelerator text to your menu items.

For example, if your application includes a Ctrl+X accelerator that duplicates the Cut command on the Edit menu, you can add the text "Ctrl+X" next to that command.

Use the tab character (\t) to separate the menu title from the accelerator text. For example, Cut\tCtrl+X means that the accelerator Ctrl+X is assigned to the menu command Cut.

Use the right-align character (\a) to right-align accelerator text.

Note:	Pop-up commands do not have accelerator keys.

When you add accelerator text to menu items, you use the Text and the ID input boxes on the General page of the Menu editor Property Inspector. The items on the General page specify the text that is displayed as part of a menu item.

Use the Accelerator page of the menu editor Property Inspector to create the actual accelerator.


Adding accelerator resources to menus

See also

The items on the Accelerator page of the Menu editor Property Inspector create an association between a MENU resource and an ACCELERATOR resource.

An ACCELERATOR resource is considered "associated" with a MENU resource if they have the same resource name (either string or numeric value). An individual accelerator is associated with a menu item if both have the same ID.


Testing a menu

See also

The Menu editor gives you immediate testing capability. The test menu is updated as you make changes to your menu, so you can test changes whenever you want.

To view the menu in Test Mode, select Menu|Test Menu.

You can navigate the menu structure as you would while running your application.

Testing for duplicate menu items

The Menu editor also has a built-in debugging tool that you can use to test for duplicate menu item IDs. Choose Menu|Check Duplicates to search for duplicate values. If the Menu editor finds duplicates, it displays a dialog box with the message "Duplicate command value found."

When you close this message box, the Menu editor selects the item with the duplicate value. Determine whether the menu ID is an identifier or a numeric value by looking at the ID input box on the General page of the Menu editor Property Inspector.

If the menu ID is a number, enter a new number that does not conflict with the other menu IDs.

If the menu ID is a conflicting identifier, change the identifier text so that it does not conflict, or choose Resource|Identifiers to display the Identifiers dialog box where you can change the identifier.


Programming menus with OWL
Programming menus and accelerators with OWL

See also

To program menus and accelerators with OWL, use the TMenu class and the LoadAccelerators function.

For example, this code shows how to associate a menu and accelerators with the main window:

GetMainWindow()->AssignMenu(IDM_MENU1);

GetMainWindow()->Attr.AccelTable = IDA_ACCELERATORS);

IDM_MENU1 AND IDD_ACCELERATORS1 are the identifiers for the menu and accelerator table respectively.


Programming menus with the Windows API
Programming menus and accelerators with the Windows API

See also

To program and menus and accelerators with the Windows API, use the LoadMenu and LoadAccelerators functions.

For example, this code shows how to associate a menu and accelerators with the main window:

HMENU hMenu;

hMenu = LoadMenu(hInst, MAKEINTRESOURCE(IDD_MENU1));

LoadAccelerators(hInst, MAKEINTRESOURCE(IDD(ACCELERATORS1)));

IDM_MENU1 AND IDD_ACCELERATORS1 are the identifiers for the menu and accelerator table respectively.


Working with dialog boxes (overview)
Working with dialog boxes

See also	Examples

Dialog boxes give the user a way to interact with your application. A dialog box is usually a pop-up window that lets the user specify information (files to open, colors to display, text to search for, and so on).

When a dialog box is displayed in an application, it is shown as a window. The dialog box usually contains a number of controls, such as buttons, text boxes, and scroll bars. Controls usually let the user specify information, but can also be used to display static text and graphics in a dialog box.

From the perspective of the programmer, the dialog box is the parent window and each control is a child window acting as an input or output device. To create a dialog box, you fill an empty dialog box with the controls you want.

Resource Workshop's Dialog editor makes it easy to create and edit dialog boxes. Working with dialog boxes involves four steps:

1.	Open an existing resource project or create a new one.

2.	Create a new dialog box or edit an existing one.

3.	Test the dialog box.

4.	Save the dialog box.


Using DLGINIT resources

See also

A DLGINIT resource is created automatically when a dialog box contains VBX controls. It holds information needed to initialize the controls. Creating or editing a DLGINIT resource explicitly by hand is rarely necessary.

There is no available editor to create an explicit DLGINIT resource.


Creating a new dialog box

See also

To create a new dialog box,

1.	Choose File|New|Resource Project to start a new resource project or File|Open to load an existing resource project.

2.	Choose Resource|New. Resource Workshop displays the New Resource dialog box.

3.	In the Resource Type list box, select DIALOG or DIALOGEX. Choose DIALOGEX to be able specify ExStyle information for dialogs whose target is Windows 95 or NT.

4.	Choose the Options button to specify the dialog box name and type, and to set other options for the new dialog, including the dialog template.

5.	Select OK in the Options dialog to accept the options values. Select OK again in the New Resource dialog to create the new dialog.

You are now in the Dialog editor where you can customize your dialog box.


Creating a new dialog box in a resource script file

See also

To create a new dialog box as an independent resource script file,

1.	In the Resource Project window, right-click to display the SpeedMenu. Choose Add to Project. The Add File to Project dialog box appears.

2.	In the List Files of Type box, choose Resource Script (*.dlg).

3.	Enter a new name in the File Name box.

4.	Choose OK.

5.	Choose Yes when Resource Workshop asks you if you want to create the file.

You have created an empty dialog file.

To create a new dialog box and add it to the empty .DLG file,

1.	Choose Resource|New to display the New Resource dialog box.

2.	For the resource type, choose DIALOG or DIALOGEX. Choose DIALOGEX to be able specify ExStyle information for dialogs whose target is Windows 95 or NT.

3.	Click the Options button.

4.	In the New Resource to be Placed In box, choose the name of the dialog script file you just created. Select other options as required.

5.	Click OK twice to create the new dialog.


Editing an existing dialog box

See also

To edit a dialog box that already exists in a project file,

1.	Use File|Open to open the project that contains the dialog box you want to edit.

2.	Double-click the dialog resource name you want to edit, or select it and choose Resource|Edit.

You are now in the Dialog editor.


Adding a caption to a dialog box

See also

To add a caption to a new dialog box,

1.	Right-click in an empty area of the dialog box and choose Properties to display the Property Inspector.

2.	If not already selected, select the General page.

3.	In the Caption box, type the caption you want to appear at the top of your dialog box.

4.	Choose OK.


Including a menu in a dialog box

See also

Because it is really a window, a dialog box could include a menu. For example, some applications use a dialog box for the main window, in which case the dialog box would need a menu.

To include a menu in your dialog box,

1.	Define the menu as a separate resource and add it to the project. Remember the menu resource name.

2.	Open the dialog box you want to add the menu to.

3.	Right-click in an empty area of the dialog box and choose Properties to open the Property Inspector.

4.	Click the Window page. Enter the menu resource name in the Menu field.

The Dialog editor will not display the menu until you put the Dialog editor into test mode.


Choosing a window type, frame style, and dialog box style

See also

You choose a window type, frame style, and dialog box style in the Property Inspector.

To open the Property Inspector, right-click in an empty area of the dialog and choose Properties.

Choose a window type for your dialog box by selecting the Window page. Choose one of the Window Type options.

Choose a frame type for your dialog box by selecting the Frame page. Choose one of the Frame Type options. The frame type determines the appearance of the dialog box frame and whether the dialog box displays a title bar at the top.

Choose frame styles for your dialog box by selecting the Frame page. Choose one of the Frame Attributes options. The attributes determine what the dialog box looks like and how the user works with it.

For 32-bit applications using DIALOGEX, use the Extended page to determine how the dialog box is positioned, its alignment, reading order, and its behavior.


Specifying dialog box fonts

See also

To choose how text is displayed in your dialog box,

1.	Right-click in an empty area of the dialog box and choose Properties to display the Property Inspector.

2.	Choose the Fonts page.

3.	Select a typeface, size, and style for text in your dialog box. The characters displayed at the bottom of the Font page show the current typeface, size, and styles you've selected.

4	Choose OK.

Note:	Changing the font for a dialog box will cause the size and position of the dialog box and any contained controls to change. This is because the coordinate system for dialog boxes (dialog units) is based on the average character width of the font. As the average character width changes, the coordinate system changes.


Assigning a custom class to a dialog box

See also

If you're an experienced Windows programmer, you might want to assign a custom class to your dialog box. Then you can process dialog box messages with your own windows procedures instead of using the standard Windows windowing procedure.

Another reason for assigning a custom class is to make the dialog box a Borland-style dialog box.

To assign a custom class to a dialog box,

1.	Right-click in an empty area of the dialog box and choose Properties to display the Property Inspector.

2.	Click the Window page. Enter the class name in the Class box. If you are creating a Borland-style dialog box, enter bordlg or BorDlg_Gray.

3.	Choose OK to save the changes and close the Property Inspector.


Setting the position of a dialog box

See also

To set the size of the dialog box,

1.	Right-click in an empty area of the dialog box and choose Properties to display the Property Inspector.

2.	Modify the Width and Height values on the General page.

3.	Click OK to save the changes.

To set the initial location of a dialog,

1.	Right-click in an empty area of the dialog box and choose Properties to display the Property Inspector.

2.	Modify the Top and Left values on the General page.

3.	Click OK to save the changes.

Note:	When the dialog box has a title bar (the default), you can drag it with the mouse to position the dialog box. When the dialog box has a resizable border (the default), you can size it with the mouse.


Testing a dialog box

See also

Choose Dialog|Test Dialog to test your dialog box. To verify that your controls are in the order you want them, press Tab and the arrow . Enter text to see how text is scrolled in an edit text control.

To leave test mode and return to edit mode, do any of the following:

Click the dialog box's OK or Cancel button.

Choose Dialog|Test Dialog again.

Press Enter.

Press the system close button on the text dialog.

Note:	Some controls, such as the Tab, ListView, and TreeView common controls, will not display in test mode as they do in design more or as they will appear in your program. This is because they are dependent on your program to display the correct information.


Programming a dialog box with OWL

See also

To program a dialog box with OWL, use the TDialog class.

For example, this shows how to create and display a modal dialog box:

TDialog dialog1(GetApplication()->GetMainWindow(), IDD_DIALOG1);

dialog1.Execute();

dialog1 is the name of the dialog box class, and IDD_IDENTIFIER1 is the identifier for the dialog box resource.


Programming a dialog box with the Windows API

See also

To program a dialog box with the Windows API, use the DialogBox function.

For example, the following code shows how to create and display a dialog box:

HINSTANCE hInst;

HWND hwndParent;

DLGPROC dlgProc;

dlgProc = (DLGPROC) MakeProcInstance(ResModeDlgProc, hInst);

DialogBox(hInst, MAKEINTRESOURCE(IDD_RESDEMODIALOG), hwndParent, dlgProc);

FreeProcInstance((FARPROC) dlgProc);

where:

ResModeDlgProc	The dialog procedure function that handles messages from controls

hInst	The HINSTANCE handler of the Windows module (.EXE or .DLL) which controls the dialog resource

IDD_RESDEMODIALOG	Replaced with the resource ID of the dialog

hwndParent 	The parent window of the dialog


Working with controls (overview)
Working with controls

See also

Once you have defined a dialog box, you can create and manipulate its controls. In the Dialog editor, the Dialog menu, Dialog local menu, the Control palette, and the Tool palette make it easy to work with controls.

Choose one of the following topics for more information.

Creating and placing controls

Adding controls to a dialog box

Working with custom controls

Duplicating a control

Moving and resizing a single control

Manipulating and customizing controls

Selecting multiple controls

Aligning multiple controls

Resizing multiple controls

Reordering controls

Grouping controls

Specifying which controls are tab stops

Editing control properties

Using the Property Inspector


Adding controls to a dialog box

See also

To add a new control to a dialog box,

1.	Click the page and control you want in the Control palette.

Your cursor changes to a cross hair when you move the cursor over the dialog box you are designing.

2.	To place the control with the default size, click in the dialog box where you want to place the top left corner of the control.

To place the control and size it at the same time, click in the dialog where you want to place the top left corner of the control. Drag the mouse to the lower right until the control is the desired size.

If you select a control from one of the palette pages and change your mind about placing it, choose the Selector tool on any page of the Control palette. Your cursor returns to the arrow shape and you can choose another control or work with existing ones.

You can also use the Dialog menu to add controls to your dialog box:

1.	Choose Dialog|Insert New.

2.	Choose the control you want, then click OK.

3.	Click the spot in the dialog box where you want to add the control.

To add multiple copies of the same control, hold the Shift key down while clicking in the dialog. When you are finished with the control type, click the Selector tool.


Working with custom controls

See also

In addition to standard controls, common controls, and Borland controls, you can add custom controls to a dialog box. A custom control is any other window class that you want to add to your dialog box, including Visual Basic controls.

Custom controls are stored in .DLL or Visual Basic custom control (.VBX) files. Before you can use custom controls, you must install them.

To install custom controls,

1.	Choose Options|Environment|Control Libraries

2.	Click Add.

3.	In the File Open dialog box, select the name of the .DLL file you want to open.

If you are installing VBX controls, choose the Windows system directory and the name of the .VBX file you want to open. (.VBX files are automatically installed in this directory.)

4.	The file name and list of the controls in that file are displayed in the Installed Controls list.

5.	Click Add to add another library. Click OK when you are done.

6.	When you return to the Dialog editor, the custom or VBX controls are displayed on the Custom page of the Control palette.

For information on adding the control to the dialog box, see Adding controls to a dialog box.

To remove custom controls,

1.	Choose Options|Environment|Control Libraries

2.	Choose the name of the control library you want to remove.

3.	Click Remove, then OK.

The library and its controls are no longer accessible from Resource Workshop.

Note:	When you use VBX controls in a dialog box, a DLGINIT resource is produced. In addition, the Property Inspector displayed for a VBX control is always modeless, so the changes take effect immediately. It is always in list format.


Duplicating a control

See also

To place multiple, identical copies of a control in rows and columns,

1.	Select the control you want to duplicate.

2.	Right-click the control and choose Duplicate. The Duplicate Control dialog box is displayed.

3.	Enter the number of rows and columns into which you want to arrange the duplicated controls. For example, if you are placing push buttons, and want one row of three buttons across, enter 1 in Row and 3 in Column.

4.	Enter the spacing you want between rows and columns in the Spacing fields. It is recommended that you enter 6 for row spacing and 8 for column spacing. Units are in dialog units.

5.	Click OK.

Your control is now duplicated. The caption is the same as the original, but the ID is automatically incremented.


Moving and resizing a single control

See also

To move a control with the mouse,

1.	Select the control.

2.	Hold the left mouse button down and drag the control to a new location.

Note:	If you change your mind in the the middle of the move, press Escape while holding the mouse to canel the move.

To resize a control with the mouse,

1.	Select the control.

2.	Move the mouse cursor to one of the black nibs at the control’s edge or corner. When it turns into a double arrow, hold the left mouse button down and drag to the desired size.

To move a control with the keyboard,

1.	Press Tab until the control you want is selected.

2.	Press the Up arrow key to move the control up; press the Down arrow key to move it down. Press the Right arrow key to move the control to the right; press the Left arrow key to move it to the left.

3.	Press Enter when the control is in a satisfactory location.

To size a control with the keyboard,

1.	Press Tab until the control you want is selected.

2.	Choose Dialog|Size or right-click and choose Size. The Size dialog box is displayed.

3.	Choose the Width option and enter the control’s width.

4.	Choose the Height option and enter the control’s height.

5.	Press OK to change the control’s size. Its top left corner stays in the same place.

You can also use arrow keys to size a control:

Key	Description

Ctrl + left arrow	Decreases width one dialog unit

Ctrl + right arrow	Increases width one dialog unit

Ctrl + up arrow	Decreases height one dialog unit

Crtl + down arrow	Increases height one unit

You can also move and resize a control with the General page of the Property Inspector. Select the control, double-click, and change the appropriate Top, Left, Width, and Height values.

If you change your mind about moving or resizing a control, select Edit|Undo.


Selecting multiple controls

See also

To select multiple controls,

1.	Choose the Selector tool.

2.	Place the cursor where you want the selection frame to start. It must be outside of any controls.

3.	Click the left mouse button and hold it down.

4.	Drag your mouse so that the selection frame surrounds or intersects all the controls you want to select.

5.	Release the mouse button.

Note:	You can also select multiple controls by pressing the Shift key while clicking on controls. The selection becomes cumulative. Clicking a second time while holding the Shift key will unselect the control, while keeping other selections.

Depending on the setting of the Selection Rectangle Must Surround Controls option in Options|Environment|Resource Editors|Dialog, the selection rectangle must either entirely surround the controls, or just intersect them.

You can select all controls in a dialog box by right-clicking and choosing Select All.


Aligning multiple controls

See also

To display and adjust the alignment grid,

1.	Choose Dialog|Show|Grid to display the alignment grid.

2.	To adjust the grid's granularity, choose Dialog|Grid Spacing. In the Grid Spacing dialog box enter the desired width and height of each grid cell.

Note:	You may have already set grid spacing defaults with Options|Environment|Resource Editors|Dialog.

3.	If you want the controls to “snap to” the grid, select the Snap to Grid option in the Grid Attributes section of Options|Environment|Resource Editors|Dialog. You can also toggle Dialog|Snap to Grid.

To align multiple controls,

1.	Select the controls you want to align.

2.	Choose Dialog|Align|Controls or right-click one of the selected controls and choose Align. In the Alignment dialog box, choose how you want to align the controls horizontally and vertically. Controls can be aligned to the left, center, or right. They can also be spaced equally or centered in the window.

When controls are selected, you can use the arrow keys to fine-tune their position on the grid. The arrow keys move the selected controls one dialog unit.

To align multiple controls into an array,

1.	Select the controls you want to align.

2.	Choose Dialog|Align|Array or right-click one of the selected controls and choose Array. In the Array dialog box, choose the format of the array by specifying the number of rows and columns. Order the controls from left to right or top to bottom.

To evenly space multiple controls,

1.	Select the controls you want to arrange.

2.	To space the selected controls horizontally equidistant from each other in the dialog box, choose Dialog|Space|Horizontally Equal.

3.	To space the selected controls vertically equidistant from each other in the dialog box, choose Dialog|Space|Vertically Equal.

You can also use the Tool palette to align and space controls.

To undo alignment options, choose Edit|Undo or press Alt+Backspace. You may have to choose Undo more than once.


Resizing multiple controls

See also

To resize multiple controls,

1.	Select the controls you want to resize.

2.	Choose Dialog|Size. The Size Controls dialog box is displayed. You use this dialog box to resize controls.

3.	Choose the Width option and enter the width for all controls.

4.	Choose the Height option and enter the height for all controls.

The size of all selected controls change. Their top left corners stay in the same place.

Note:	You can undo any sizing options by choosing Edit|Undo or by pressing Alt+Backspace. You may have to choose Undo more than once.

You can also move and resize controls with the General page of the Property Inspector. Select the controls, double-click one of them, and change the appropriate Top, Left, Width, and Height values.


Reordering controls

See also

You can specify the order in which users access the controls in your dialog box. The order is especially important when you have defined groups of related controls.

To specify the order of controls,

1.	Choose Dialog|Set Creation Order or Set Creation Order from the SpeedMenu. A special mode is invoked.

Each control is numbered to show its current place in the overall order. Initially, this is the order in which you created the controls.

2.	Click the items you want to assign new order numbers to, beginning with 1. The Dialog editor displays a blue box around all the controls you have already picked. Once you have clicked a control to assign it an order number, you cannot pick any previously selected controls again.

If you make a mistake and want to go back to the original order, just click on all the controls in the order in which you assigned them. You can also press Escape to cancel.

When you finish assigning new order numbers, press Enter to return to design mode. You can also right-click and choose End Mode to exit and save changes, or Cancel Mode to exit without saving changes.


Grouping controls

See also

You can group controls to let the user move among them using the arrow keys. For example, if you add three radio buttons, you may want them to function as a group.

To group controls,

1.	If necessary, move the controls so that they are together.

2.	Choose Dialog|Set Group Flags or Set Group Flags from the SpeedMenu.

3.	For each group you want to define, click the first member so it is surrounded by a blue box.

You do not have to identify the last member of a group. By clicking the first member of each group, you also identify the last member of the previous group.

To ungroup controls,

1.	Choose Dialog|Set Group Flags or Set Group Flags from the SpeedMenu.

2.	Click the control that is surrounded by a blue outline. This turns off the group flag.

You mark only the first control in each group with the Group attribute. Controls are included in the group according to the order in which they are added to the dialog box.

For example, if you add seven controls to your dialog box and then turn on the Group property of the first and fifth controls, the first four controls are included in the first group, and the remaining controls are included in the second group.

When you finish grouping controls, press Enter to return to design mode. You can also right-click and choose End Mode to exit and save changes, or Cancel Mode to exit without saving changes.


Specifying which controls are tab stops

See also

When you add a control that can accept user input to a dialog box, it is automatically defined as a tab stop. You can change this so that only some controls are tab stops, and users can use Tab to move only to the controls you want:

To set a tab stop,

1.	Choose Dialog|Set Tabstops or Set Tabstops from the SpeedMenu. A special mode is invoked. Any controls currently set as tab stops are outlined with a blue box.

2.	To set a tab stop, click any control that is not already outlined in blue.

To remove a tab stop, click any control that is already a tab stop (outlined in blue.)

3.	When you finish changing tab stops, press the Enter key.

You can also turn on the Tab Stop property using the General page in the Property Inspector.

When you finish assigning tab stops, press Enter to return to design mode. You can also right-click and choose End Mode to exit and save changes, or Cancel Mode to exit without saving changes.


Editing controls
Editing control properties

See also

Once you have added a control to your dialog box, you can easily modify it by right-clicking it and choosing Properties. The Property Inspector is displayed, with options that can modify the appearance and behavior of your control. The property settings vary according to the type of control you are working with.

Note:	You can also double-click a control to display the Property Inspector.


Working with resources (overview)
Working with resources

See also

Resources are data that define the visible portions of your Windows program. Resources provide a consistent user interface that makes it easy for users to switch from one Windows program to another.

In general, a Windows application's resources are separate from the program code, letting you make significant changes to the interface without even opening the file that contains your program code. This also lets different applications share the same set of resources, so that you do not have to reinvent all your favorite resources. Instead, you can use them over and over.

When you display resources in the Resource Project window, you see them listed by type, with the names of the resource listed under their type.

To create a new resource, you can do one of the following:

Double-click the resource type in the Resource Project window. The Options dialog box for that type displays. Click OK to create the new resource. Resource Workshop automatically starts the appropriate editor, if one is available. If an editor is not available (for example, for a user-defined resource), Resource Workshop starts the Text editor.

Select Resource|New and choose the type of resource you want to create. Resource Workshop automatically starts the appropriate editor, if one is available. If an editor is not available, Resource Workshop starts the Text editor.

To load a resource, you can do one of the following:

Double-click the resource name in the Resource Project window. Resource Workshop automatically starts the appropriate editor, if one is available. If an editor is not available (for example, for a user-defined resource), Resource Workshop starts the Text editor.

Select the resource name in the Resource Project window and choose either Resource|Edit or Resource|Edit as Text. Resource|Edit loads a resource editor, if one is available for the selected resource type. Resource|Edit as Text always starts the Text editor.


Resource file types

See also

A file you create and edit with Resource Workshop can be in either binary or text format. Resource Workshop generates standard Windows file formats, which means you can use Resource Workshop files with programs that generate binary code from resource script files.

Here are the types of resource files you can create with Resource Workshop:

16-bit device driver (.DRV)

Bitmap (.BMP)

Control Panel applets (.CPL)

Cursor (.CUR)

Dialog (.DLG)

Executable (.EXE)

Dynamic link library (.DLL)

Icon (.ICO)

Resource script (.RC)

Resource (.RES)

VBX control libraries (.VBX)


Executable and dynamic-link library files

See also

An executable (.EXE) or dynamic-link library (.DLL) file is the ultimate destination for all resources you define with Resource Workshop. It is the file that users execute to run your program. In general, you compile the resource script file (.RC file) into the resource file (.RES file), then use your compiler to bind the .RES file to the executable or DLL file.

If you want to change the resources in a compiled binary file (an executable file, a .DLL file, or a .RES file), Resource Workshop decompiles the file and lets you make the changes, then saves the resources back to the original file.


Working with binary files

See also

Resource Workshop lets you open executable (.EXE), dynamic-link library (.DLL), and resource (.RES) files as resource projects so you can customize their resources.

When you load one of these files, Resource Workshop decompiles the resources in the file and shows them to you as though they were part of a regular .RC file. When you finish, Resource Workshop compiles the resources again into binary code and stores them in the original file.

Because the resources you work with in this type of resource project are never stored as resource scripts, you cannot assign any identifiers to the resource IDs. However, you can save the resource project as an .RC file. Then the resources can be saved as resource scripts, and you can assign identifiers to them.

Note:	Once you save the resource project as an .RC file, Resource Workshop will not save the resources back to the original file.

Opening and saving .EXE, .DLL, and .RES files

To open an .EXE, .DLL, or .RES file and save it as a resource script file,

1.	Choose File|Open and choose Resource Project in the Viewer field.

2.	Select the .EXE, .RES, or DLL file from the Open a File dialog box. Click OK.

3.	Choose File|Save File As. In the Save File As dialog box, select Resource Script (.RC) from the List Files of Type box. In the Filename box, enter the name of the new .RC file.

4.	Press OK to save the file.


Using a resource editor

See also

You can edit any resource in a resource project by double-clicking the resource in the Resource Project window, or by selecting it and choosing Resource|Edit.

Here are the available editors:

For a dialog resource, Resource Workshop loads the Dialog editor.

For a menu resource, Resource Workshop loads the Menu editor.

For an icon, bitmap, or cursor resource, Resource Workshop loads the Graphics editor.

For all other resources, Resource Workshop loads the Text editor.


Renaming a resource

See also

To rename a resource in your resource project,

1.	Select the resource in the Resource Project window.

2.	Choose Resource|Resource Attributes.

Resource Workshop displays the Resource Attributes dialog box, where you rename your resource.

3.	Enter the new resource name in the Name box.

If you want to create a new identifier, or change the one you already have, enter the new value in the Identifier Value box.

4.	Choose OK.


Deleting a resource

See also

To delete a resource from a resource project, select it in the Resource Project window, then do one of the following,

To delete the resource, press the Del key or right-click and choose Remove from Project.

To reuse the resource, right-click and choose Cut to remove the resource and place it in the Windows Clipboard so you can paste it elsewhere.


Specifying resource memory options

See also

Resource Workshop makes it easy to specify how each resource in your resource project should be managed in memory. It is better to leave the memory settings at their defaults unless you are an experienced Windows programmer - you might not be able to foresee the implications of changing the way a resource is handled in memory.

To specify memory options,

1.	Select the name of the resource in the Resource Project window.

2.	Choose Resource|Resource Attributes. to open the Resource Attributes dialog box.

3.	Check one or more of the Memory Options check boxes.


Moving a resource

See also

You can move resources from one file in a resource project to another file in the resource project by using the Resource|Resource Attributes command. Both files must be part of the current resource project.

1.	Select a resource in the resource project file by either editing it or highlighting it in the Resource Project window.

2.	Choose Resource|Resource Attributes to open the Resource Attributes dialog box.

The resource name and the file it currently resides in are displayed in the Resource Attributes dialog box.

3.	Click the File drop down list to choose the file you want to move the resource to. Click OK.


16-bit vs. 32-bit resources

See also

By default, new resource projects created with File|New|Resource Project are created as 32-bit resources. This makes two resource types available that are not available for 16-bit resources:

MENUEX

DIALOGEX

When resource script files are compiled, they are compiled based on the current IDE project settings. Resource script files originally targeted for 32-bit platforms can easily be recompiled for a 16-bit program without changing the script file as long as they do not contain a MENUEX or DIALOGEX resource type.

Compiled resources (.RES) files are only compatible with the platform they originally targeted. For example, you cannot link a 16-bit compiled resource to a 32-bit compiled executable. If you want to change the target, you have to reload the .RC file with the IDE project and retarget the platform.


Saving a resource

See also

It is a good idea to save your work often. Resource Workshop provides you with a variety of save commands so you can choose exactly what you want to save and how to save it. You can:

Rename the current resource file using File|Save As.

Save the entire resource project, and all of the resources it contains.

Save the resource in a separate file by:

Saving the resource in a resource script file.

Saving a bitmapped resource as a separate file.

Resource Workshop saves the resource project file and any files it references.


Saving a resource in a resource script file

See also

To save an individual resource as a resource script file,

1.	If the resource is not already open, select the resource name in the Resource Project window.

2.	Choose Resource|Save Resource As. This command displays the Save Resource As dialog box.

3.	Select Resource Script (.RC) as the resource type.

4.	Enter the file name of the new resource script.

5.	Click OK.

Usually, you save a resource with a resource project. You would probably only save it in its own file if you create a separate resource project that contains just related types of resources (such as menus and accelerators). You can then link this resource file to a resource project that uses the same resources.


Saving a bitmapped resource as a file

See also

You can save a bitmapped resource as a file. You will probably do this step only if you want to put the bitmapped resource in binary format in a separate file for the first time.

To save a bitmapped resource as a file,

1.	If the resource is not already open, select the bitmapped resource in the Resource Project window.

2.	Choose Resource|Save Resource As. This command displays the Save Resource As dialog box.

3.	Select the appropriate resource type.

4.	Enter the file name of the resource.

5.	Click OK.


Editing a resource as text

See also

In addition to creating and modifying a resource directly with a resource editor, you can work directly with its resource script.

To work with the resource script for a resource, select the resource from the Resource Project window. Then choose Resource|Edit As Text. Resource Workshop brings up the source script for the resource in the Text editor. Here is an example of the resource script for a menu:

Edit_Menu MENU

{

  POPUP "&Edit"

  {

    MENUITEM "&Undo\tCtrl+Z", CM_EDITUNDO

    MENUITEM "&Cut\tCtrl+X", CM_EDITCUT

    MENUITEM "&Copy\tCtrl+C", CM_EDITCOPY

    MENUITEM "&Paste\tCtrl+V", CM_EDITPASTE

  }

}

The only readily comprehensible parts of a script for a bitmapped resource are the first and second lines (the resource name and BEGIN) and the last line (END).

ABitmap BITMAP

BEGIN

'42 4D 66 00 00 00 00 00 00 00 3E 00 00 00 28 00'

'00 00 14 00 00 00 0A 00 00 00 01 00 01 00 00 00'

'00 00 28 00 00 00 00 00 00 00 00 00 00 00 00 00'

'00 00 02 00 00 00 00 00 00 00 FF FF FF 00 E0 00'

'00 00 EF FF E0 00 EC 08 20 00 EF FF E0 00 EC 41'

'20 00 EF FF E0 00 E1 01 20 00 F5 FF E0 00 F9 FF'

'E0 00 FC 00 00 00'

END

Everything between the second line and the last line is hexadecimal code. If you like, you can edit this code to see the effect on the bitmap, but do so at your own risk.

Note:	Do not spend any time inserting comments in your resource script or formatting the text, because the Resource Workshop incremental compiler does its own formatting and discards all comments.


Working with resource script files (overview)
Working with resource script files

See also

A resource script file contains one or more sets of ASCII data, called resource scripts, from which binary resources are generated. Each resource type has a different resource script format, but you do not need to know these formats unless you plan to edit a resource script file in a text editor.

You can use the special resource editors of Resource Workshop to edit resource script files. As you use these editors, you are automatically editing the resource script file.

For example, if you have a resource script file open and create a new dialog box with the Dialog editor, you are embedding a dialog resource script in the resource script file.

Besides resource scripts, a resource script file can contain one or more identifiers. You can have the identifiers created automatically, or you can create them manually. You can also choose to put your identifiers in a resource identifiers file.

You can compile the resource script file into one or more resources, link the binary resources to an application, and then refer to the resources in the application’s code by using the corresponding identifiers.


Creating a resource script file

See also

To create a resource script file,

1.	Choose File|New|Resource Project. The New Resource Project dialog box is displayed.

2.	The project file type of Resource Script (.RC) is selected by default.

3.	If you want to store identifiers in a separate file, click the Options button and enter the name of a resource header file in the File Name box.

Just like standard C header files, the resource header file can contain identifiers.

4.	Choose OK to chose the Options dialog and OK again to create the resource script.

5.	Choose File|Save As.

6.	In the File Name box, enter a name for the new resource script file.

7.	Choose OK.

Now you have an empty resource script file you can add resource scripts and identifiers to.


Adding resource scripts

See also

You can add a resource script to a resource script file indirectly or directly.

Add the resource indirectly to save the resource in a separate file and refer to it via an RCINCLUDE statement (or a BITMAP, CURSOR, or ICON statement for those types of files). This allows you to share resources among several resource script files.

Add the resource directly to embed the resource script directly in the current file. This keeps all the resources together in a single resource file.

Choose one of these topics for more information:

Adding a new resource script indirectly

Adding an existing resource script indirectly

Adding a new resource script directly

Adding an existing resource script directly


Adding a new resource script indirectly

See also

To add a new resource script indirectly,

1.	Create or open the resource script file.

2.	Right-click in the Resource Project window and choose Add To Project.

3.	In the File Type box, choose Resource Script (*.RC).

4.	Type a name for the new resource script file. The file name must be unique from other files in the current directory.

5.	Choose OK.

A dialog box asks whether you want to create a new resource script file.

6.	Choose Yes.


Adding a new resource script directly

See also

To add a new resource script directly,

1.	Create or open a resource script file.

2.	Choose Resource|New. The New Resource dialog box is displayed.

3.	In the Resource Type box, select a resource type.

4.	Press the Options button.

5.	In the New Resource Options dialog box, enter the name of the resource script file you want to add the new resource script to.

You can choose the current resource script file or any file containing resource scripts that have been added indirectly to the current project.

6.	If you are embedding a definition for a graphic (icon, cursor or bitmap), specify the size and color options. You can also add the graphic to the current resource script file by uncheckig the Source option in the Format section and providing a filename.

If you are creating a dialog or menu resource, you can select a default style.

7.	Choose OK to close the New Resource Options dialog.

8.	Choose OK to create the new resource.


Adding an existing resource script directly

See also

To add an exsting resource script directly, copy or move the resource script from one file to another.

To copy or move a resource script,

1.	Open the file that contains the resource script.

2.	In the Resource Project window, select the resource script.

3.	Right-click and choose Copy (to copy the resource script) or Cut (to move the resource script).

4.	Open the file you want to copy or move the resource script to.

5.	Right-click and choose Paste.


Adding an existing resource script indirectly

See also

To add one or more existing resource scripts indirectly,

1.	Open the resource script file.

2.	In the Resource Project window, right-click and choose Add To Project.

3.	In the File Name box, type the name of the file that contains the resource script(s). You can also select the file using the Files and Directories boxes. You can specify a resource script, binary, or graphic file.

4.	Choose OK.

All resource scripts in the file are added indirectly to the current resource script file.


Editing a resource script file

See also

To edit an existing resource script file,

1.	Choose File|Open.

2.	In the List Files Of Type box, choose Resource (*.RC).

3.	In the File Name box, type the resource script file name you want to edit. You can also select the file name using the Files and Directories boxes.

4.	Choose OK.

5.	Add, edit, or remove resource scripts and identifiers from the resource script file.

6.	Choose File|Save.


Removing a resource script

See also

To delete a resource script from a resource script file,

1.	In the Resource Project window, select the resource script.

2.	Right-click and choose Remove From Project.


Generating binary resources from a resource script file

See also

To generate binary resources from a resource script file, include the resource script file as a node in an IDE application.

The next time you compile the application, the resource scripts in the resource script file are automatically compiled and linked to the application.

You can also generate resources on the command line with the resource compiler (BRCC32.EXE) and the resource linker (RLINK.EXE or TLINK32.EXE, which calls RLINK32.DLL).


Managing resource projects (overview)
Working with resource projects

See also

A resource project is a collection of one or more resources. A resource project is stored in a file that contains one or more resources, or refers to files containing resources, or both. This file is usually a resource script (.RC) file.

When you first use Resource Workshop, you need to create a new resource project or open an existing one. Once the resource project is open, it is displayed in the Resource Project window.

You need to save the resource project when you exit. If you try to exit or close the Resource Project window without saving, Resource Workshop will ask you if you want to save it.


Creating a new resource project

See also

To create a new resource project,

1.	Choose File|New|Resource Project. The New Resource Project dialog box is displayed.

2.	Select the type of resource on which you want to base your project.

Usually this will be a resource script file (.RC).

3.	If the Options button is available, choose it to select resource options.

4.	When you are done, click OK; then OK again to close the New Resource Project dialog box.

Resource Workshop displays your new project in the Resource Project window. You name your project when you save it.


Opening an existing resource project

See also

An existing resource project is usually one that you created with Resource Workshop. It can also be an .RC file you created with other resource development software.

You can also work with the resources in any application developed for Windows 3.1 or higher, even if you do not have access to the source code. If you have access only to an executable file, Resource Workshop can decompile the file to let you make changes to the resources.

To open an existing project,

1.	Choose File|Open (or double-click the .RC node in an open project in the IDE).

2.	In the Open a File dialog box, select the file containing the resource project you want to open.

Note:	If you want to open a binary file (.EXE or .DLL), select Edit Resources in the Viewer field.

3.	What Resource Workshop does next depends on whether the resource project is a binary file or a file containing resource data.

If the resource project is a binary file (an executable file, a .RES file, or a dynamic-link library file), Resource Workshop decompiles the resources and shows you its progress on the status line.

If the resource project consists of a main .RC file and other files containing resource data, Resource Workshop reads the resource project file and then compiles each resource, showing you its progress.

If Resource Workshop cannot compile the resource project file, an error is displayed that shows you the error and where it occurred. Double-click the error message in a message window to view the script as text.

Note:	If a compiler error occurs in an .RC file, you can open the .RC file in text edit mode by viewing the message window and double-clicking the error message.

4.	Once the resource project is compiled or decompiled, Resource Workshop displays the Resource Project window with the resources listed in it.

When the resource project is open, you can add resources to it. You can also modify or remove resources. Save the resource project when you finish.


Saving a resource project

See also

It is a good idea to save your work often. Resource Workshop provides you with a variety of save commands so you can choose exactly what you want to save and how to save it.

Choose the File menu and select one of these options:

File|Save saves everything in your current resource project. This is the option you usually choose. When you save a new resource project that has not been named yet, Resource Workshop displays the Save File As dialog box, where you can specify a name and directory.

Resource Workshop always saves the resource project file and any files it refers to. Resource Workshop can also save to a .RES file or bind the resources to an executable or dynamic-link library file.

File|Save File As lets you rename the current resource project when you save it. Resource Workshop displays the Save File As dialog box, where you can enter the new file name.


Embedding a resource in a resource project

See also

To embed a resource in your project (to create a new resource in script form), open the resource project you want to work with and follow these steps:

1.	Choose Resource|New to display the New Resource dialog box.

2.	Choose the type of resource you want to create.

3.	Click the Options button to set options for the resource type and to select the header files you want the resource and its identifier to appear in.

You can only select from header files currently attached to your project. (Use Add To Project on the local menu to add a new header file to your project.)

The next steps depend on the type of resource you are creating:

If you are creating an accelerator, menu, dialog box, string table, RCDATA, or VERSIONINFO resource, Resource Workshop puts an entry for the resource in the Resource Project window and opens the appropriate resource editor.

If you are creating an image resource (an icon, cursor, or bitmap), Resource Workshop click Options to display the New Resource Options dialog box. To embed the image, check the Source Form box. (If Source Form is clear, enter a file name.)


Linking a resource to a resource project

See also

You can link a resource stored in an external file to the current resource project by using the Add to Project command on the SpeedMenu. You use this command to add an existing resource file or to create a new file for a new resource.

To link a resource in a separate file to your project,

1.	Open the resource project.

The Resource Project window is displayed.

2.	Right-click and choose Add to Project. Resource Workshop displays the Add to Project dialog box.

3.	Specify the name of the file containing the resource.

If the resource you specify is not an existing resource, Resource Workshop asks you if you want to create a new resource file. If you choose OK, Resource Workshop creates a file of the appropriate type based on the file extension, and inserts a reference to the file in the resource project window.

4.	In the RCINCLUDE Will Be Placed In box you see the current project file listed, which is most likely where you will put the reference to the new file. If your project contains more than one .RC file and you want to put the reference elsewhere, scroll down the list to find the name of the file in which you want to place the reference.

5.	Choose OK to add the file to the resource project.

Resource Workshop puts an entry that points to this file in the Resource Project window.

If you choose Show|List By File on the SpeedMenu you see the file name and the resource name. Any changes you make in the resource project to this resource are reflected in the original resource file.


Using the Resource Project window

See also

The Resource Project window lists the resources in your project. It acts as an effective file management tool, making it easy to look at an overall view of a resource project. Even if your project contains a large number of resources, you can quickly scan the resource project by scrolling through the Resource Project window.

Once you open a new or existing resource project, Resource Workshop displays the Resource Project window. For a new project, the window is empty. You have to put resources into it by creating them or adding them as files.

For an existing project, you can see these items:

A complete list of files in the resource project

The types of resources contained in each file

The identifiers associated with resources

Embedded and linked resources

The resources in your project file can be embedded in the file or linked to it.

An embedded resource is stored in resource script form in the resource project file. It exists only as part of the resource project in which it is stored, and it cannot be used in other projects.

A linked resource is a separate file that is refered to in the resource project file. Linked resources can be used in other projects.

Use the Resource menu and SpeedMenu to determine how the resource project window displays information. You can group resources by file or type; display the identifiers in the resource project; list the names of resources; display items in resources; and display all possible types of resources.

Status line

The status line at the bottom of the Resource Workshop displays information about commands and tools.

The status line displays information about the currently highlighted menu command. For example, if you choose the Resource|New command, the status line displays "Create new resource."

When you are in a resource editor such as the Dialog editor or the Graphics editor, the status line displays details about the editor and tool you are working with.


Working with identifiers (overview)
Working with identifiers

See also

Windows requires that every resource and user-defined resource type be associated with a unique name or a unique integer (called a resource ID). By default, Resource Workshop assigns a name to each new resource.

The default name is not very descriptive, and referring to a resource by name alone decreases the efficiency of the application at run-time. To overcome these shortcomings, you can rename the resource and assign it an identifier (a C #define).

Identifiers

An identifier consists of two parts: a text literal (the identifier name) and a value (typically an integer). Identifiers must be unique within a resource type. Only the first 31 characters are significant; Resource Workshop ignores any characters past the 31st character.

Assigning an integer value to an identifier speeds up calls to the resource at run time, but you will not be able to use the short integer value directly as a parameter. You must either typecast the integer into a long pointer to char or use a macro to do the typecasting for you.

If you write your program in C or C++, use the MAKEINTRESOURCE macro.

If you are using OWL, see the class TResId.

If you are working with a .RES file, an executable file, or a DLL file, Resource Workshop decompiles all resource IDs in the files into integer values. You cannot add identifiers to this type of file, but you can save the file as an .RC file and assign identifiers to its resources.

Identifier files

When you create a new project, the first thing you should do is specify a file in which to store your identifiers. Store identifiers in one or more resource header (.RH) files that use #defines to assign values to identifier names. See Creating an Identifier File for more information.


Creating an identifier file

See also

To add an identifer after you create a new project,

1.	Right-click and choose Add to Project. You see the Add to Project dialog box.

2.	Click the down-arrow in List Files of Type. Choose:

C/C++ header (*.h, *.rh)

3.	Enter a name for the identifier file in the File Name box.

4.	Click OK. Resource Workshop creates the identifier file.


Adding identifiers

See also

You can add an identifier to your identifier file before you create the resource it will be associated with. To add an identifier,

1.	Choose Resource|Identifiers to display the Identifiers dialog box.

2.	Right-click and choose Insert. The New/Change Identifiers dialog box is displayed.

3.	In the Name box, enter the identifier name.

4.	In the Value box, enter the identifier's value.

5.	In the File box, enter the name of the file in which the identifier is to be stored.

6.	Click the OK button.

Note:	The new name now appears in the Name list in the Identifers dialog box. The Usage column says (unused).


Editing identifiers

See also

To change an identifier name or value,

1.	Choose Resource|Identifiers to display the Identifiers dialog box.

2.	Double-click the name or value you want to change. The New/Change Identifiers dialog box is displayed.

3.	Change the name in the Name box.

4.	Change the value in the Value box.

5.	Click OK.

The new identifier value will be written to the header file the next time you choose File|Save.


Moving identifiers from one file to another

See also

To change the file an identifier is placed in,

1.	Choose Resource|Identifiers to display the Identifiers dialog box.

2.	Double-click the name or value of the identifier you want to change. The New/Change Identifiers dialog box is displayed.

3.	Enter a new file name in the File box.

4.	Click OK.


Deleting identifiers

See also

If an identifier is not used in your project, you should delete it from the header file. There are three reasons you might have an unused identifier:

You assign an identifier to a resource and then delete the resource.

You add an identifier to the project and then never use it.

You rename a resource that already has an integer identifier value.

To delete an identifier:

1.	Choose Resource|Identifiers to display the Identifiers dialog box.

2.	Select the identifier you want to delete. You can delete an identifier that is still in use.

If the selected identifier is not associated with a resource (either because the resource was deleted or the identifier was never used), the Used By box says (unused).

If, however, the identifier is still associated with a resource, the Used By box automatically highlights the type and name of the associated resource.

3.	Press the Del key.

If the identifier is unused, it is deleted immediately. No warning dialog box is displayed.

If the identifier is still in use, Resource Workshop displays a warning dialog box that says "define is used. Delete anyway?" To delete the identifier, click the Yes button. If you do not want to delete the identifier, click the No button.

The next time you choose File|Save, Resource Workshop updates the identifier file, removing the deleted identifier.


Listing identifiers

See also

To list the identifiers in your project,

1.	Choose Resource|Identifiers to display the Identifiers dialog box.

2.	Choose the name of the file for which you want to view identifiers.

The name, value, and usage of all identifiers in that file are displayed.


Managing identifiers

See also

Resource Workshop can automatically create and delete identifiers for you. To turn on automatic identifier management, choose Options|Environment|Resource Editors. Check the Generate Identifiers Automatically option (one of the Resource Editor SpeedSettings).

Note:	If you are using AppExpert from the Borland C++ IDE, Generate Identifiers Automatically will be checked and unselectable; you will not be able to turn this option off because AppExpert relies on the automatic identifiers syntax.

With automatic identifiers on, every time you create a resource item that uses an identifier (menu items, for example), Resource Workshop creates a unique identifier for that item and places it in the header file for that resource (.RH or .H). Also, if you delete any items, the identifier is deleted.

Resource Workshop uses an identifier prefix, which you can change. The list of default prefixes can be viewed by choosing Options|Environment|Resource Editors|Identifiers. This options page also allows you to change the default prefix.


Working with user-defined resources (overview)
Working with user-defined resources

See also

In addition to defining standard resource types, you can also define your own resource types. After you create a new resource type, you can add any number of user-defined resources of this type to your project.

User-defined resources contain data that do not fit into one of the standard resource types. For example, if you want to create a character string resource that is longer than the STRINGTABLE limit of 255 characters, you can define your own resource type and store your character strings there.

You can also include metafiles in your project as user-defined resources. A metafile is a type of bitmap (in source form, it is a collection of Graphics Device Interface (GDI) calls) that's not only easier to scale and more device-independent than the standard bitmap resource, but also often takes up less storage space than a bitmap resource.

When you define a new resource, you can store data as part of the resource definition in a project file or as a separate file. You can also use the RCDATA resource type to add data to your application.

Working with user-defined resources involves five basic tasks:

1.	Create a resource type.

2.	Add a user-defined resource to your project.

3.	Edit it, if necessary.

4.	Test it.

5.	Save it.


Creating a resource type

See also

Before you can add user-defined resource data to your project, you must first create a type for it. Here's how:

1.	Open an existing project or create a new one.

2.	Choose Resource|New. You see the New Resource dialog box.

3.	Click the New Type button. The New Resource Type dialog box is displayed.

4.	In the Resource Type name box, enter a unique name for the resource type you are creating. For example, if you are creating a resource to contain a large block of text, you could name your new resource type TEXT.

5.	If your project is an .RC file, you may want to create an identifier for the new resource type.

Enter a value for the identifier. This value is the ID that Windows and your program will associate with this identifier type. If you use a resource ID, it must be greater than 255, because Windows reserves the values 1 through 255 for standard resources.

6.	Choose the filename in which to place the Identifer in the Place Identifier In drop-down list.

7.	Click OK to create the new resource type.

From now on, whenever you create a new resource, you see that resource type listed in the New Resource dialog box with all the standard resource types. To give the resource a name, click the Options button. You can also click OK to use the default name.


Adding a user-defined resource

See also

After you have created a resource type, you can add a resource of that type to your project. To add a use-defined resource,

1.	Open a resource project or create a new one.

2.	Choose Resource|New. You see the New Resource dialog box.

3.	In the Resource Type list, select your user-defined resource.

4.	Click OK to place the resource in the current project file or click the Options button to add it to another resource project file.

5.	Resource Workshop opens the Text editor with a blank definition for your user-defined resource.


Using the RCDATA resource type

See also

You can use the predefined RCDATA resource type to add a data resource to your application. It works the same way as a user-defined resource type.

The primary difference between the two is addressability: you might prefer to have many different types of user-defined resources rather than just one type, RCDATA.

To add an RCDATA resource to your project,

1.	Choose Resource|New. You see the New Resource dialog box.

2.	Select RCDATA and click the Options button. You can also change the name in the source script.

3.	Press OK. You see a blank RCDATA definition in the Text editor.

4.	Add resource data.


Editing a user-defined resource

See also

When you edit a user-defined resource, you work with its resource script.

To edit a user-defined resource,

1.	Open a resource project. You can either create a resource type or open an existing one.

2.	Select the user-defined resource type to which you want to add a resource.

3.	Open the Text editor by:

Double-clicking the name of the resource you want to edit.

Selecting the resource name and choosing Resource|Edit or Resource|Edit as Text.

Once you have brought the resource script up in the script editor, you can add or change data. To add data to your resource, do one of the following:

Use the Text editor to enter data between the BEGIN and END statements.

Store the data in a separate file and add the file name to the end of the user-defined resource statement. Delete the BEGIN and END statements.

After you make any changes, you must recompile the resource to save your changes. If you exit without recompiling, you lose all your changes.


Embedding resource data in a project file

See also

You can add data to your resource by storing data in a separate file. The disadvantage to this approach is that if something happens to the file, the data is lost. Another option is to embed the external data into the project file script. Here's how:

1.	Right-click and choose Add To Project.

2.	Choose User Resource Data in the File Type list.

3.	Enter the file name in the File Name input box. (The file must use a non-standard file extension.)

4.	The Custom Resource dialog box is displayed.

5.	Double-click the resource type. The resource appears in the Resource Project window.

If you select the new resource and choose Resource|Edit, you see that the resource data is in hexadecimal format. For that reason, you should keep the external data file available in case you want to edit the resource script later.


Entering data in the resource script

See also

Use the Text editor to change data that is between the BEGIN and END statements. Do not use this editor to do much formatting, since Resource Workshop rearranges the text when it compiles or decompiles the resource.

Here are some guidelines:

The data can include any mix of numeric values and strings.

You can use hexadecimal, octal, or decimal notation to represent numeric values. Use either 0x (a zero followed by the letter x) or $ (a dollar sign) as the leading characters for hexadecimal notation. This notation supports only 16-bit values. If you want to use an odd number of hexadecimal values, use a hexstring.

A hexstring is a string of hexadecimal values enclosed in single quotation marks. The compiler ignores any spaces you insert to make the hex codes more readable.

If you include text strings in your resource, enclose the strings in quotation marks, like this: "string". Strings are not automatically null-terminated. To terminate a string with a null character, type \0 (backslash zero) at the end of the string.


Testing a user-defined resource

See also

You cannot test user-defined resources within Resource Workshop. You need to use Resource Workshop to compile the project file that contains the resource and bind it to your executable file. You can then run your program and test the resource.


Using the Text editor (overview)
Using the Text editor

See also

The text version of a resource is also called source code or script.You can edit the text version of any resource.

To edit the text version of a resource,

1.	Click the resource in the Resource Project window.

2.	Choose Resource|Edit As Text.

Resource Workshop opens the Text editor and displays the script for the resource.

Saving your changes

To save your changes to a script,

1.	Close the Text editor window.

2.	Choose Yes in response to the prompt "Resource has changed. Compile?"

Resource Workshop compiles your resource script and saves the changes. If it encounters a syntax error, you are returned to the Text editor so you can correct the error.

Compiling a text version of a resource

After editing a text version of a resource, you must compile the resource in order to save it.

To compile and save a resource script in the Text editor, right-click and choose Compile.

If you do not compile the resource, Resource Workshop prompts you to compile it when you exit the Text editor.


Creating resources with the Text editor

See also

Resource Workshop always edits some kinds of resources as scripts. These resources are referred to as scripted resources:

Accelerator

DLGINIT

RCDATA

User-Defined Resources

StringTable

VERSIONINFO

Note:	DLGINIT resources are created whenever dialogs contain VBX controls. This resource type should never be modified.

You can also define bitmapped and dialog template resources with scripts, but you will usually find it easier to use the visual editors in Resource Workshop, especially for creating those resources. You will probably edit bitmap or dialog template scripts only to make changes to existing resources.


Writing resource scripts

See also

A resource script is a text file that consists of three kinds of items:

Resource definition statements

Resource compiler directives

Comments

The majority of a resource script is made up of resource definition statements. Each resource in the resource script is defined by a definition statement, which has the following general syntax:

keyword resource_id [options]

BEGIN

  items

  .

  .

  .

END

In this syntax:

keyword	is one of the resource keywords

resource_id	is either a numeric constant or an identifier

options	is optional information specific to the type of resource being defined

items	is one or more items within the resource, such as menu items in a menu resource or strings in a string table

Comments

A comment can be placed in the script surrounded by a C-style comment string (/* ... */). Do not place a comment within a resource definition block, as the resource compiler will strip it out.

Here as an example of a valid coment:

/* This is a valid comment   */

keyword resource_id [options]

BEGIN

.

.

.

END

Here is an invalid comment:

keyword resource_id [options]

/* Do not put comments here */

BEGIN

/* And don't put them here */

END

Note:	A comment is valid only if it was added before the resource project was opened by Resource Workshop. Comments added to the text of a resource, edited with the Resource|Edit As Text command, will be stripped out by the resource compiler.


BITMAP examples

Example 1

The bitmap "image" is in IMAGEF.BMP:

image BITMAP imagef.bmp

Example 2

The bitmap 200 is in FRAME.BMP. It is loaded when the application starts:

200 BITMAP PRELOAD frame.bmp

Example 3

The bitmap "bigstar" is in STAR.BMP. It cannot be moved around in memory:

bigstar BITMAP FIXED star.bmp


CURSOR examples

Example 1

This example names the cursor resource 20 and tells Resource Workshop that the resource is found in the file HAND.CUR.

20 CURSOR hand.cur

Example 2

This example names the resource "paintcan" and tells Resource Workshop it can be found in the file PAINT.CUR. The resource is loaded into memory when the application begins. It must remain in the same place in memory while the application runs. The application can't remove it from memory before the application ends.

paintcan CURSOR PRELOAD FIXED NONDISCARDABLE paint.cur


ICON examples

Example 1

This Type 1 example names an icon "myicon" and tells Resource Workshop to look for it in the file MYICON.ICO:

myicon ICON myicon.ico

Example 2

This Type 2 example creates an icon named "myicon." The icon will be defined elsewhere in the resource file with a Type 1 icon statement. The icon's control ID is 120, and the upper-left corner coordinates are 30, 40. Notice that there are no width and height arguments.

ICON "myicon" 120, 20, 20


DIALOG, RADIOBUTTON and GROUPBOX example

View Resource	Implementation

This example shows how to use the DIALOG statement to display a dialog box that asks the user to select an option using radio buttons:

Resource Script

DLG_DIRECTION DIALOG 71, 65, 143, 65

STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU

CAPTION "Choose a Direction"

FONT 8, "MS Sans Serif"

{

 DEFPUSHBUTTON "OK", IDOK, 87, 8, 50, 14

 PUSHBUTTON "Cancel", IDCANCEL, 87, 26, 50, 14

 PUSHBUTTON "Help", IDHELP, 87, 44, 50, 14

 AUTORADIOBUTTON "&Forward", 2, 13, 20, 44, 12, BS_RADIOBUTTON

 AUTORADIOBUTTON "&Backward", 3, 13, 33, 44, 12, BS_RADIOBUTTON

 GROUPBOX "Direction", IDC_DIRECTION, 5, 8, 67, 42, BS_GROUPBOX

}


Implementation

To use this resource in a Windows application, use one of these functions or classes:

TDialog (ObjectWindows)

DialogBox() (Windows API)


DIALOG example (displayed resource)

Click on any part of the dialog box to view the resource script behind that element:


DLG_DIRECTION DIALOG 71, 65, 143, 65

STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU

CAPTION "Choose a Direction"


DEFPUSHBUTTON "OK", IDOK, 87, 8, 50, 14


PUSHBUTTON "Cancel", IDCANCEL, 87, 26, 50, 14


PUSHBUTTON "Help", IDHELP, 87, 44, 50, 14


AUTORADIOBUTTON "&Forward", 2, 13, 20, 44, 12, BS_RADIOBUTTON


AUTORADIOBUTTON "&Backward", 3, 13, 33, 44, 12, BS_RADIOBUTTON


GROUPBOX "Direction", IDC_DIRECTION, 5, 8, 67, 42, BS_GROUPBOX


DIALOG, CHECKBOX, LISTBOX, and LTEXT example
DIALOG, CHECKBOX, LISTBOX and LTEXT example

View Resource	Implementation

This example shows how to use the DIALOG statement to display a dialog box that asks the user to select an item from a list box:

Resource Script

ListBox DIALOG 16, 24, 163, 102

STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU

CAPTION "List Box Dialog"

FONT 8, "MS Sans Serif"

{

  DEFPUSHBUTTON "OK", IDOK, 16, 80, 37, 14

  PUSHBUTTON "Cancel", IDCANCEL, 62, 80, 37, 14

  PUSHBUTTON "Help", IDHELP, 109, 80, 37, 14

  LISTBOX 100, 7, 19, 69, 50, LBS_STANDARD | LBS_MULTIPLESEL

  LTEXT "Select an item:", 100, 7, 7, 48, 8, SS_LEFTNOWORDWRAP | WS_GROUP

  AUTOCHECKBOX "Show Predefined", IDC_SHOWPREDEFINED, 83, 19, 70, 12

  AUTOCHECKBOX "Show Unused", IDC_SHOWUNUSED, 83, 32, 70, 12

  AUTOCHECKBOX "Show User-Defined", IDC_USERDEFINED, 83, 45, 70, 12

}


DIALOG example (displayed resource)

Click on any part of the dialog box to view the resource script behind that element:


ListBox DIALOG 16, 24, 163, 102

STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU

CAPTION "List Box Dialog"


DEFPUSHBUTTON "OK", IDOK, 16, 80, 37, 14


PUSHBUTTON "Cancel", IDCANCEL, 62, 80, 37, 14


PUSHBUTTON "Help", IDHELP, 109, 80, 37, 14


LISTBOX 100, 7, 19, 69, 50, LBS_STANDARD | LBS_MULTIPLESEL


LTEXT "Select an item:", 100, 7, 7, 48, 8, SS_LEFTNOWORDWRAP | WS_GROUP


AUTOCHECKBOX "Show Predefined", IDC_SHOWPREDEFINED, 83, 19, 70, 12


AUTOCHECKBOX "Show Unused", IDC_SHOWUNUSED, 83, 32, 70, 12


AUTOCHECKBOX "Show User-Defined", IDC_USERDEFINED, 83, 45, 70, 12


DIALOG, COMBOBOX and CTEXT example

View Resource	Implementation

This example shows how to use the DIALOG statement to display a dialog box that asks the user to select a value from a combo box:

Resource Script

ChooseUsers DIALOG 35, 35, 163, 87

STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU

CAPTION "Choose Users"

FONT 8, "MS Sans Serif"

{

  DEFPUSHBUTTON "OK", IDOK, 105, 25, 50, 14

  PUSHBUTTON "Cancel", IDCANCEL, 105, 43, 50, 14

  PUSHBUTTON "Help", IDHELP, 105, 61, 50, 14

  COMBOBOX IDC_Users, 10, 25, 74, 55, CBS_DROPDOWNLIST | WS_TABSTOP

  CTEXT "Select &Users:", -1, 17, 8, 60, 8

}


DIALOG (displayed resource)
DIALOG example (displayed resource)

Click on any part of the dialog box to view the resource script behind that element:


ChooseUsers DIALOG 35, 35, 163, 87

STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU

CAPTION "Choose Users"


DEFPUSHBUTTON "OK", IDOK, 105, 25, 50, 14


PUSHBUTTON "Cancel", IDCANCEL, 105, 43, 50, 14


PUSHBUTTON "Help", IDHELP, 105, 61, 50, 14


COMBOBOX IDC_Users, 10, 25, 74, 55, CBS_DROPDOWNLIST | WS_TABSTOP


CTEXT "Select &Users:", -1, 17, 8, 60, 8


DIALOG, SCROLLBAR, EDITTEXT and CONTROL example

View Resource	Implementation

This example shows how to use the DIALOG statement to display a dialog box that asks the user to select a value using a scrollbar and edit field:

Resource Script

TempControl DIALOG 16, 27, 143, 120

STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION

CAPTION "Temperature Control"

FONT 8, "MS Sans Serif"

{

  DEFPUSHBUTTON "OK", IDOK, 57, 99, 36, 14

  PUSHBUTTON "Cancel", IDCANCEL, 101, 99, 36, 14

  SCROLLBAR IDC_VSCROLL1, 40, 22, 9, 91, SBS_VERT | WS_GROUP

  LTEXT "Range", -1, 5, 7, 22, 8

  CONTROL "", -1, "static", SS_BLACKFRAME | WS_CHILD | WS_VISIBLE, 5, 22, 36, 91

  LTEXT "Log To:", -1, 70, 7, 27, 8

  EDITTEXT IDC_LOGNAME, 70, 22, 60, 11, WS_BORDER | WS_TABSTOP

  CONTROL "Stop Logging", IDC_STOPLOG, "BUTTON", BS_PUSHBUTTON, 70, 41, 60, 14

  RTEXT "NOTE: Log Is ON By Default", -1, 67, 60, 58, 23

}


DIALOG example (displayed resource)

Click on any part of the dialog box to view the resource script behind that element:


TempControl DIALOG 16, 27, 143, 120

STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION

CAPTION "Temperature Control"


DEFPUSHBUTTON "OK", IDOK, 57, 99, 36, 14


PUSHBUTTON "Cancel", IDCANCEL, 101, 99, 36, 14


SCROLLBAR IDC_VSCROLL1, 40, 22, 9, 91, SBS_VERT | WS_GROUP


LTEXT "Range", -1, 5, 7, 22, 8


LTEXT "Log To:", -1, 70, 7, 27, 8


EDITTEXT IDC_LOGNAME, 70, 22, 60, 11, WS_BORDER | WS_TABSTOP


CONTROL "Stop Logging", IDC_STOPLOG, "BUTTON", BS_PUSHBUTTON, 70, 41, 60, 14


RTEXT "NOTE: Log Is ON By Default", -1, 67, 60, 58, 23


DIALOG example (BWCC)

View Resource	Implementation

This example shows how to use the DIALOG statement to display a Borland-style dialog box that uses Borland Windows Custom Controls:

Resource Script

BWCC_Dialog DIALOG PRELOAD MOVEABLE DISCARDABLE 20, 20, 144, 107

STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU

CLASS "BorDlg"

CAPTION "New Project"

FONT 8, "Helv"

{

  CONTROL "Project file type", -1, "BorShade", BSS_GROUP | BSS_CAPTION | BSS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 8, 8, 128, 48

  CONTROL ".&RC", 151, "BorRadio", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 12, 21, 33, 12

  CONTROL ".RE&S", 154, "BorRadio", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE, 12, 37, 33, 12

  CONTROL ".&CUR", 158, "BorRadio", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE, 54, 21, 33, 12

  CONTROL ".&ICO", 159, "BorRadio", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE, 55, 37, 33, 12

  CONTROL ".&BMP", 160, "BorRadio", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE, 99, 21, 33, 12

  CONTROL ".&FNT", 162, "BorRadio", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE, 98, 37, 33, 12

  CONTROL "", -1, "BorShade", BSS_HDIP | BSS_LEFT | WS_CHILD | WS_VISIBLE, 0, 64, 144, 2

  CONTROL "", 1, "BorBtn", BS_DEFPUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 8, 74, 37, 25

  CONTROL "", 2, "BorBtn", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 53, 74, 37, 25

  CONTROL "", 998, "BorBtn", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 98, 74, 37, 25

}


DIALOG example (displayed resource)

Click on any part of the dialog box to view the resource script behind that element:


BWCC_Dialog DIALOG PRELOAD MOVEABLE DISCARDABLE 20, 20, 144, 107

STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU

CLASS "BorDlg"

CAPTION "New Project"


CONTROL "Project file type", -1, "BorShade", BSS_GROUP | BSS_CAPTION | BSS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 8, 8, 128, 48

CONTROL ".&RC", 151, "BorRadio", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 12, 21, 33, 12

CONTROL ".RE&S", 154, "BorRadio", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE, 12, 37, 33, 12

CONTROL ".&CUR", 158, "BorRadio", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE, 54, 21, 33, 12

CONTROL ".&ICO", 159, "BorRadio", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE, 55, 37, 33, 12

CONTROL ".&BMP", 160, "BorRadio", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE, 99, 21, 33, 12

CONTROL ".&FNT", 162, "BorRadio", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE, 98, 37, 33, 12


CONTROL "", -1, "BorShade", BSS_HDIP | BSS_LEFT | WS_CHILD | WS_VISIBLE, 0, 64, 144, 2


CONTROL "", 1, "BorBtn", BS_DEFPUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 8, 74, 37, 25


CONTROL "", 2, "BorBtn", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 53, 74, 37, 25


CONTROL "", 998, "BorBtn", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 98, 74, 37, 25


MENU, MENUITEM and POPUP example 1
MENU, MENUITEM and POPUP example

View Resource	Implementation

This example specifies the the File menu of an application. File is a pop-up menu (commonly known as a drop-down menu) with several options, each defined with a MENUITEM substatement.

Resource Script

The ampersand (&) underlines the letter that immediately follows it. This lets the user choose the command from the menu by typing that letter.

mainmenu MENU PRELOAD

BEGIN

  POPUP "&File"

  BEGIN

    MENUITEM "&New", 100

    MENUITEM "&Open", 101

    MENUITEM "&Close", 102, GRAYED

    MENUITEM "&Save",103

    MENUITEM "Save &As", 104

    MENUITEM SEPARATOR

    MENUITEM "&Print", 105

    MENUITEM "&Draft Printing", 107, CHECKED

    MENUITEM SEPARATOR

    MENUITEM "E&xit", 106

  END

  POPUP "&Help"

END


Implementation

To use this resource in a Windows application, use one of these functions or classes:

TMenu (ObjectWindows)

CreateMenu (Windows API)

CreatePopupMenu (Windows API)


MENU, MENUITEM and POPUP example
MENU, MENUITEM and POPUP example (displayed resource)

Click on any part of the menu to view the resource script behind that element:


POPUP "&File"


MENUITEM "&New", 100


MENUITEM "&Open", 101


MENUITEM "&Close", 102, GRAYED


MENUITEM "&Save",103


MENUITEM "Save &As", 104


MENUITEM SEPARATOR


MENUITEM "&Print", 105


MENUITEM "&Draft Printing", 107, CHECKED


MENUITEM "E&xit", 106


MENU, MENUITEM and POPUP example 2
MENU, MENUITEM and POPUP example

View Resource	Implementation

This example specifies the Options menu of an application. Options is a pop-up menu (commonly known as a drop-down menu) with a secondary menu.

Resource Script

The ampersand (&) underlines the letter that immediately follows it. This lets the user choose the command from the menu by typing that letter.

OptionsMenu MENU

{

  POPUP "Options"

  {

    POPUP "&Display"

    {

      MENUITEM "&Editor", 3101

      MENUITEM "&Messages", 3102

      MENUITEM "&Windows", 3103

    }

    MENUITEM "&Save", 3200

  }

}


MENU, MENUITEM and POPUP example
MENU, MENUITEM and POPUP example (displayed resource)

Click on any part of the menu to view the resource script behind that element:


POPUP "Options"


POPUP "&Display"


MENUITEM "&Editor", 3101


MENUITEM "&Messages", 3102


MENUITEM "&Windows", 3103


MENUITEM "&Save", 3200


MENU, MENUITEM and POPUP example 3
MENU, MENUITEM and POPUP example

View Resource	Implementation

This example specifies the main menu of an application. The main menu contains the default File, Edit, and Help menus. Each of these menus are defined as pop-up menus (commonly known as drop-down menus) with several options, each defined with a MENUITEM substatement.

Resource Script

The ampersand (&) underlines the letter that immediately follows it. This lets the user choose the command from the menu by typing that letter.

Main_Menu MENU

{

  POPUP "&File"

  {

    MENUITEM "&New", CM_FILENEW

    MENUITEM "&Open...", CM_FILEOPEN

    MENUITEM "&Save", CM_FILESAVE

    MENUITEM "Save &as...", CM_FILESAVEAS

    MENUITEM SEPARATOR

    MENUITEM "&Print...", CM_FILEPRINT

    MENUITEM "Page se&tup...", CM_FILEPAGE_SETUP

    MENUITEM "P&rinter setup...", CM_FILEPRINTER_SETUP

    MENUITEM SEPARATOR

    MENUITEM "E&xit", CM_FILEEXIT

  }

  POPUP "&Edit"

  {

    MENUITEM "&Undo\tCtrl+Z", CM_EDITUNDO

    MENUITEM "&Cut\tCtrl+X", CM_EDITCUT

    MENUITEM "&Copy\tCtrl+C", CM_EDITCOPY

    MENUITEM "&Paste\tCtrl+V", CM_EDITPASTE

  }

  POPUP "&Help"

  {

    MENUITEM "&Index\tF1", CM_HELPINDEX

    MENUITEM "&Keyboard", CM_HELPKEYBOARD

    MENUITEM "&Commands", CM_HELPCOMMANDS

    MENUITEM "&Procedures", CM_HELPPROCEDURES

    MENUITEM "&Using help", CM_HELPUSING_HELP

    MENUITEM SEPARATOR

    MENUITEM "&About...", CM_HELPABOUT

  }

}


MENU, MENUITEM and POPUP example
MENU, MENUITEM and POPUP example (displayed resource)

Click on any part of the menu to view the resource script behind that element:


POPUP "&File"


POPUP "&Edit"

{

  MENUITEM "&Undo\tCtrl+Z", CM_EDITUNDO

  MENUITEM "&Cut\tCtrl+X", CM_EDITCUT

  MENUITEM "&Copy\tCtrl+C", CM_EDITCOPY

  MENUITEM "&Paste\tCtrl+V", CM_EDITPASTE

}


POPUP "&Help"


Using the Graphics editor (overview)
Using the Graphics editor

See also

You use the Graphics editor to create and edit any bitmapped resource, including bitmaps, cursors, and icons.

Although most of the Graphics editor's features are the same for the bitmapped resource types, there are some features that are unique to each resource type. For example, the name of the Graphics editor menu is the same as the resource type: Icon for an icon resource, Bitmap for a bitmap resource, and Cursor for a cursor resource.

The Graphics editor features whose functionality is generally the same for all types of bitmapped resources are the Color palette, the status line and bar, the Tool palette, and the window panes.

For more information on using the Graphics editor, choose one of the following topics:

Using the Color palette

Selecting a pen style

Selecting a brush shape

Selecting a paint pattern

Drawing and painting

Adding text

Selecting an area

Erasing an area

Aligning an area

Moving or resizing an area

Copying an area

Removing an area

Zooming in or out

Moving a graphic around in the drawing area


Using the Color palette

See also

Bitmapped images drawn with the Graphics editor are created on a grid of pixels. You create the image by setting each pixel to a foreground or background color. Strictly speaking, there's no difference between the foreground and background color. There is, however, a difference in how you choose foreground and background colors and in how they are created when you edit the bitmapped image.

The Graphics editor's Color palette makes it easy to choose foreground and background colors. You can work with a Color palette even if your image is black and white.

You use the Color palette to choose:

a foreground color

a background color

transparent and inverted areas (for icons and cursors only)

You can move the palette anywhere you want it. You can also hide it and show it by:

Right-clicking and choosing the Show|Color Palette command

Clicking the palette's Close box.


Selecting a foreground color

See also

The foreground color is the color you select and draw with the left mouse button. It is typically one of the colors you use to create the features of your resource, such as lines, boxes, shading, and so on. The current foreground color is indicated on the Tool palette.

To select a foreground color,

1.	Select the color you want on the Color palette (using the left mouse button).

2.	The color is displayed at the bottom of the Tool palette.

Select a tool that draws or paints.

3.	Click or drag with the left mouse button to draw or paint with the foreground color.

The Eraser tool operates in the opposite fashion from the drawing tools. Dragging it with the left mouse button produces the background color, and dragging it with the right mouse button produces the foreground color.


Selecting a background color

See also

The background color is the color you select and draw with the right mouse button and is usually the color that appears to underlie your drawing. It is also the color that's left behind when you select an area and delete or move it. The background color is indicated on the Tool palette.

To select a background color,

1.	Right-click the color you want in the Color palette.

2.	The color is displayed on the Tool Palette next to the foreground color

Select a tool that draws or paints.

3.	Click or drag with the right mouse button to draw or paint with the background color.

The Eraser tool operates in the opposite fashion from the drawing tools. Dragging it with the left mouse button produces the background color, and dragging it with the right mouse button produces the foreground color.


Transparent and inverted areas

See also

Transparent and inverted color areas are unique to icon and cursor resources.

A transparent area allows the desktop color behind the icon or cursor to show through.

An inverted area reverses the desktop color at run time.

The designated transparent and inverted colors do not appear in your icon or cursor at run time. Instead, they are replaced by the desktop color or its inverse. The colors that you set as Transparent and Inverted should be colors that you will not use in your icon or cursor.

The default transparent color is the current desktop color set in the Windows Control Panel's color palette. If the desktop uses a dithered color, the default transparent color is the nearest solid color that Resource Workshop can provide. (If you have a 256-color device, this restriction does not apply; the default transparent color will always match the desktop color.)

You can change the transparent color to something other than the desktop color, but it will always revert to the desktop color each time you start Resource Workshop. Nevertheless, regions that you designate as transparent - using the default color or a color you assign - remain transparent and take on the current transparent color.

Note:	You can change colors so that you have transparent and non-transparent regions that use the same color.

To change the colors the Graphics editor displays for transparent and inverted areas,

1.	Double-click the button for Transparent or Inverted in the Color palette.

2.	Select either Transparent or Inverted as the foreground or background color.

3.	If you're working with icons, right-click and choose Edit Foreground Color or Edit Background Color.

4.	If you're working with cursors, right-click and choose Set Transparent Color.

Resource Workshop displays the Color dialog box, where you can change the color.


Hiding and showing the Color palette

See also

If you want to hide the Color palette you can close it by clicking the Close button in the upper right corner of the palette.

You can also right-click and uncheck the Show|Color Palette command. Or you can select Show|Color Palette from the Bitmap, Cursor, or Icon menus.


Choosing the number of colors for a resource

See also

When you create a bitmap, cursor, or icon, you choose how many colors you want in your resource.

For bitmaps, this dialog box is the New Bitmap Resource Options dialog box.

For cursors, this dialog box is the New Cursor Resource Options dialog box.

For icons, it is the New Icon Resource Options dialog box.

To display these dialog boxes, press the Options button while in the New Resource Project or New Resource dialog boxes.

While you are editing a bitmap, cursor, or icon, you can change the number of colors in the image using the Size and Attributes command. Depending on the type of resource you edit, you find this command on the Bitmap, Cursor, or Icon menu.

You can include up to 256 colors in your bitmap, cursor, or icon. The number of colors you can use (and see in the Color palette) depends on the type of display driver you're using with Windows. The standard Windows VGA driver supports a fixed set of only 16 colors.


Customizing colors

See also

When you are editing a color image you can modify the Color palette to include any colors supported by your display driver.

It does not make sense to do this if the Color palette already includes all the colors supported by your computer. But if your display driver is capable of displaying 256 colors and you're working with a 16-color image, you can include any of the 256 colors in the 16-color Color palette.

When you're editing a cursor or icon, you can change the color used to display transparent or inverted areas of the image.

Modifying the Color palette

To edit a color, double click it.

Resource Workshop displays the Color dialog box, where you can specify a new color.

Note:	You can't change the first or last color in the palette. By default, the first and last entries are always black and white respectively.


Selecting a pen shape
 Selecting a pen style

See also

The pen style affects the width of a line or shape border and whether a line or shape is solid, dashed, or dotted. The pen style applies to the following tools:

Arc

Line

Ellipse

Pen

Rectangle

Rounded Rectangle

To select a pen style,

1.	Choose the Pen Style tool on the Tool Palette. You can also select the Pen Style command from the Bitmap, Cursor, or Icon menu.

The Set Pen Style and Width dialog box is displayed.

2.	Choose the line style you want.

3.	Choose OK. The new pen style displays in the Tool palette.

You can select one of the tools mentioned above and draw with the new pen style.


 Selecting a brush shape

See also

You can select a brush shape for the Paintbrush or Airbrush tool.

To select a brush shape,

1.	Select the Paintbrush Shape or Airbrush Shape tool on the Tool palette. You can also select the Paintbrush Shape or Airbrush Shape command from the Bitmap, Cursor, or Icon menu.

For both tools, you see the Set Brush Tip dialog box.

2.	Select a brush shape.

3.	Choose OK. The new shape displays in the Tool palette.

You can select one of the tools mentioned above and draw with the new brush shape style.


 Selecting a paint pattern

See also

The paint pattern affects the interior of a filled shape and the painting styles of the brush tools. The paint pattern applies to the following tools:

Airbrush

Filled Ellipse

Filled Rectangle

Filled Rounded Rectangle

Paintbrush

To select a paint pattern,

1.	Choose the Pattern tool on the Tool palette. You can also choose Pattern from the Bitmap, Cursor, or Icon menu.

The Set Pattern Type dialog box is displayed.

2.	Select a paint pattern.

3.	Choose OK. The new pattern displays on the Tool palette.

You can select one of the tools mentioned above and draw with the new paint pattern.


 Drawing and painting

See also

You can draw and paint with the Pen, Paintbrush, and Airbrush tools.

The size of the area covered by these tools is proportionate to the size of the drawing area. You can zoom out to paint a larger area, and zoom in to paint a smaller area.

To draw or paint,

1.	Choose the Pen, Paintbrush, or Airbrush tool on the Tool palette.

2.	In the drawing area, move the cursor to where you want to start drawing, and then click and hold down the left mouse button (for foreground color) or the right mouse button (for background color).

3.	Drag the cursor around the drawing area.

4.	When you are done, release the mouse button.


 Drawing a line

See also

To draw a line,

1.	Choose the Line tool on the Tool palette.

2.	In the drawing area, move the cursor to where you want to the line to start, and click and hold down the left mouse button (for foreground color) or the right mouse button (for background color).

3.	Move the cursor to where you want the line to end, and release the mouse button.

To draw a line at a 0-, 45-, or 90-degree angle, hold down the Shift key while you are drawing.


Drawing a shape

See also

You can draw a filled or unfilled rectangle, rounded rectangle, or ellipse.

To draw a shape,

1.	Choose one of the following tools on the Tool palette:

Rectangle

Rounded Rectangle

Filled Rectangle

Filled Rounded Rectangle

Ellipse

Filled Ellipse

2.	In the drawing area, move the cursor to where you want a corner of the shape to be, and hold down the left button (for the foreground color) or the right mouse button (for the background color).

3.	Move the cursor to the opposite corner of the shape, and release the mouse button.

The interior of a filled shape depends on the current paint pattern, and the shape border depends on the current pen style.

To draw a shape without a border, select Null for the pen style.


 Filling an area with color

See also

You can fill any area that is bounded by one or more different colors.

To fill an area with color,

1.	Choose the Paint Can tool from the Tool Palette.

2.	In the drawing area, move the crosshairs into the area that you want to fill, and hold down the left mouse button (for the foreground color) or the right mouse button (for the background color).


 Adding text

See also

To add text to a graphic,

1.	Choose the Text tool on the Tool palette.

2.	In the drawing area, click where you want to add text.

3.	Type the text.

To change the font and alignment of the text,

1.	Choose Bitmap, Cursor, or Icon|Text Attributes. The Font is displayed.

2.	Choose the font name, size, style, and text alignment.

3.	Choose OK.

To change the color of text,

1.	Choose a new color from the Color palette.

After you click to make another selection, you cannot change the attributes of the text you have just typed.


 Erasing an area

See also

To erase an area,

1.	Select the Eraser tool on the Tool palette.

2.	Drag the eraser over the area you want erased.

To erase the entire drawing area, double-click the Eraser tool on the Tool palette.

An erased area is colored the selected background color. This means that you can:

Erase an area by drawing or painting using the background color.

For example, you can use the Line tool to erase a line if the selected color for the line is the background color.

Use the Eraser tool to paint an area with the background color while you are hold down the left mouse button, and paint an area with the foreground color while you hold down the right mouse button.


  Selecting an area

See also

You can align, copy, move, and remove any area that you select.

To select a rectangular area,

1.	Choose the Pick Rectangle tool on the Tool palette.

2.	In the drawing area, move the cursor to a corner of the area you want to select and hold down the mouse button.

3.	Move the cursor to the opposite corner of the area you want to select and release the mouse button.

To select a non-rectangular area,

1.	Choose the Scissors tool on the Tool palette.

2.	In the drawing area, move the cursor to a boundary of the area you want to select and hold down the mouse button.

3.	Draw a closed shape around the area you want to select and release the mouse button.

You can now align, copy, move, or delete the selected area.


Aligning an area

See also

You can align an area with the top, bottom, sides, or center of a graphic.

To align an area,

1.	Choose the area with Pick Rectangle or Scissors tool.

2.	Choose Bitmap, Cursor, or Icon|Align. The Align Selection dialog box is displayed.

3.	Select a horizontal alignment option.

4.	Select a vertical alignment option.

5.	Choose OK.

Any area that is left open is filled with the current background color.


Moving or resizing an area

See also

To move an area,

1.	Choose the area with Pick Rectangle or Scissors tool.

2.	Drag the area to a new location.

To resize an area,

1.	Choose the area with Pick Rectangle or Scissors tool.

2.	Choose Bitmap, Cursor, or Icon|Size. The Stretch Selection dialog box is displayed.

3.	To move the area, specify new pixel coordinates for the Top and Left sides.

4.	To resize the area, specify a new height and width.

5.	Choose OK.

Any area left open is filled with the current background color.


Copying an area

See also

To copy an area,

1.	Choose the area with Pick Rectangle or Scissors tool.

2.	Choose Edit|Copy to place a copy of the area in the Windows Clipboard.

3.	Choose Edit|Paste to insert the area into the image.

A copy of the selected area appears in the upper left corner of the drawing area. It remains selected.

4.	Drag the selected area to where ever you want to place it.

You can also use this method to copy an area:

1.	Select the area.

2.	Choose Edit|Copy.

3.	Select an area where you want the copied image to appear.

4.	Choose Edit|Paste.

The copied image fits within the selected area as best it can and remains selected. You can move the selected area if you want.

Any area left open is filled with current background color.


Removing an area

See also

To remove or delete an area,

1.	Choose the area with Pick Rectangle or Scissors tool.

2.	Choose Edit|Cut.

You can then paste the removed area somewhere else using the Edit|Paste command.

Any area left open is filled with the current background color.

You can also use Edit|Clear to delete an area. The area is not copied to the Clipboard for pasting.


 Zooming in or out

See also

To zoom in on a graphic,

1.	Double-click the Zoom tool on the Tool palette. You can also right-click and choose Zoom In, or press Control+Z.

To zoom in on a particular area of a graphic,

1.	Select the Zoom tool.

2.	In the drawing area, move the cursor to a corner of the area and hold down the mouse button.

3.	Drag the cursor to the opposite corner of the area and release the mouse button.

To zoom out from a graphic,

1.	Hold down the shift key and double-click the Zoom tool on the Tool palette. You can also press Ctrl+O or right-click and choose Zoom Out.

To view the actual size of a graphic,

1.	Press Ctrl+A or right-click and choose Actual Size.

To help you control images on a pixel-by-pixel basis, you can display a grid on any zoomed image by choosing Bitmap, Cursor, or Icon|Editor Options. Check the Grid on Zoomed Windows check box. Each square of the grid represents a single pixel.

If you zoom an image to a size that is too large to fit in the pane, and the image is displayed at its true size in the other window pane, Resource Workshop places a dotted rectangle over the unzoomed image. This dotted rectangle indicates the portion of the image currently displayed in the zoomed window pane.


Moving a graphic around in the drawing area

See also

If a graphic is too large to display in the drawing area, you can move it around to see other parts of it.

To move a graphic in the drawing area,

1.	Hold down the Ctrl key.

The cursor becomes the Hand tool.

2.	Drag the graphic to a new position.

You can also move a graphic around with the scroll bars on the right and bottom sides of the drawing area.


Tool palette

See also

When you open a resource in the Graphics editor, the Tool palette is displayed in the Edit window. You use the Tool palette to choose the Graphics editor tool you want to work with or to change settings for the various tools.

You can move the Tool palette around, dock it, and you can hide it or show it.

Here are tools on the Tool palette:

	Pick Rectangle
	Scissors
	Zoom
	Eraser
	Pen
	Paintbrush
	Airbrush
	Paint Can
	Line
	Text
	Rectangle
	Filled Rectangle
	Rounded Rectangle
	Filled Rounded Rectangle
	Ellipse
	Filled Ellipse
	Eye Dropper
	Arc
These four buttons, displayed at the bottom of the Tool palette, allow you to customize settings:

	Pen style
	Pattern
	Brush shape
	Airbrush shape
There are also color setting buttons for the foreground color and background color. The current settings are displayed on these buttons.

In addition, there is a Hand tool that you can use to move a zoomed image. It is not displayed in the Tool palette.


Hiding and showing the Tool palette

See also

To hide or show the Tool palette,

Right-click and choose Show|Tool Palette.

Toggle the Show|Tool Palette command. This command is located on the menu bar selection that corresponds to the type of resource you are working with (Bitmap, Cursor, or Icon).

The check mark next to the command indicates that it is displayed. No check mark indicates that it is hidden.


Pick Rectangle tool

See also

You use the Pick Rectangle tool to select a rectangular area of your image for copying, moving, or deleting. To select an area, click the left mouse button and drag the mouse until the flashing outline surrounds the area you want. Release the mouse button. Clicking either mouse button outside the outline turns the area selection off.

When you select an area, you can use the Edit menu commands to cut, copy, clear, duplicate, or paste into the selected area. You can also use the mouse to move (click) or duplicate the area (shift-click). In addition, you can align or resize the selected area.


Scissors tool

See also

The Scissors tool performs basically the same function as the Pick Rectangle tool: it selects an area of an image. However, with the scissors you can select and move areas of any shape, not just rectangles. To select an area, click the left mouse button and drag the scissors until the flashing outline surrounds the area you want, then release the mouse button.

When you select an area, you can use the Edit menu commands to cut, copy, clear, duplicate, or paste into the selected area. You can also use the mouse to move (click) or duplicate the area (shift-click). In addition, you can align or resize the selected area.


Zoom tool

See also

You use the Zoom tool to zoom the entire image, or you can outline an area of an image that you'd like to zoom, and have Resource Workshop zoom that area. Double click the Zoom tool to zoom in on the entire image. The image is zoomed based on the center of the image.

Images are zoomed one magnification increment per zoom action, until the maximum or minimum magnification is reached.

To zoom out, press Shift and double-click the Zoom tool.

To zoom in on a selected area,

1.	Select the Zoom tool.

2.	Click and drag to select the area you want to zoom in on.

The magnification depends on the size of the area you select. The smaller the selected area, the greater the magnification.


Eraser tool

See also

The Eraser tool works like a square paintbrush - you drag the tool over the area you want to erase. To erase an entire image, double-click the Eraser tool.

Use the left mouse button to reveal the current background color. Use the right mouse button to reveal the current foreground color.

Since you use the eraser to reveal colors, the buttons on the mouse are the opposite of other tools you use to paint. For example, when you use the Paintbrush tool, you use the left mouse button to paint the foreground color. But with the eraser, the left mouse button reveals the background color.

Before you use the eraser, you may want to select the foreground and background colors you want to use in the Color palette.


Pen tool

See also

Use the Pen tool to paint free-form lines and shapes using the current pen style. To sketch with the Pen tool, click a mouse button and drag the pen across your image. Release the mouse button when you finish sketching.

Use the left mouse button to sketch with the current foreground color.

Use the right mouse button to sketch with the current background color.

Before you use the Pen tool, you might want to select the pen style and the foreground and background colors.

You can also use the Pen tool to fill individual pixels with a color. Left-click to use the foreground color or right-click to use the background color. You may want to zoom in on the image before making changes to make it easier to color individual pixels.


Paintbrush tool

See also

Use the Paintbrush tool to paint free-form patterns using the current brush pattern and shape. To paint, click a mouse button and drag the paintbrush across your image. Release the mouse button when you finish painting.

When you choose the Paintbrush tool, you see a cursor that represents the current brush shape. The area painted by the paintbrush is always proportionally the same relative to the size of the image frame.

Use the left mouse button to paint with the current foreground color.

Use the right mouse button to sketch with the current background color.

Before you use the paintbrush, you might want to select the foreground and background colors and the paintbrush shape and pattern.


Airbrush tool

See also

The Airbrush tool paints free-form patterns similar to a real airbrush on your image using the current airbrush pattern and shape.

To use the airbrush, you can either click a mouse button once and drag the airbrush, or you can click it repeatedly, as if you were repeatedly pressing the nozzle of a spray can. If you drag it slowly, it paints a thick pattern. If you drag it quickly, it paints a scattered, thinner pattern.

When you choose the Airbrush tool, you see a cursor that represents the Airbrush tool. The area painted by the airbrush is always proportionally the same relative to the size of the image frame.

Use the left mouse button to paint with the current foreground color.

Use the right mouse button to paint with the current background color.

Before you use the airbrush, you might want to select the foreground and background colors and specify the airbrush shape and pattern.


Paint Can tool

See also

Use the Paint Can tool to fill an area of your image with the currently selected color. It fills in any area of your image that is a single color.

If you use this tool on an area that is not entirely surrounded by other colors, the color leaks out into other parts of the image that are the same color as the original area.

If you hold down the Shift key when you use the Paint Can, you replace all instances of the color you click on, contiguous or not.

To use the Paint Can tool, point the paint can's cross hairs in the portion of the image you want to fill, then click a mouse button.

Use the left mouse button to sketch with the current foreground color.

Use the right mouse button to sketch with the current background color.

Before you use the paint can, you might want to specify the foreground and background colors.


Line tool

See also

Use the Line tool to paint straight lines. Press the mouse button and drag the Line tool across your image. Release the mouse button when you've finished drawing the line.

If you want the lines you paint to be limited to 45-degree increments, hold down Shift as you draw the line. With Shift down, you can paint only a horizontal or vertical line or a line on a 45-degree angle.

Use the left mouse button to sketch with the current foreground color.

Use the right mouse button to sketch with the current background color.

Before you paint a line, you might want to specify the pen style and choose the foreground and background colors.


Text tool

See also

To add text to your image, choose the Text tool and click where you want the text to begin. A flashing cursor appears and you can begin typing text.

Before you use the Text tool, you might want to specify how and where you want the text displayed:

Use the Bitmap, Cursor, or Icon|Text Attributes command to display the Font dialog box, where you specify the typeface, size, style of the text, and how text is aligned.

Text is always displayed in the current foreground color. Before you type text, you might want to specify the foreground color by clicking the left mouse button on the color you want in the Color palette.


Empty Frame tools

See also

You use one of these tools to paint an empty frame in your image:

Ellipse

Rectangle

Rounded Rectangle

To paint an empty frame,

1.	Choose the tool you want.

2.	Point the tool's cross hair where you want to start a corner of the frame.

3.	Click a mouse button and drag the frame tool until the frame outline surrounds the area you want.

4.	Release the mouse button.

Use the left mouse button to sketch with the current foreground color.  Use the right mouse button to sketch with the current background color.

Before you paint a frame, you might want to specify the pen style, as the frame is effected by the pen style and width. You may also want to choose the foreground and background colors before painting the frame.


Ellipse tool

See also

Use the Ellipse tool to paint an ellipse-shaped empty frame in your image.


Rectangle tool

See also

Use the Rectangle tool to paint a rectangular empty frame in your image.


Rounded Rectangle tool

See also

Use the Rounded Rectangle tool to paint an empty frame shaped like a rounded rectangle in your image.


Filled-In Frame tools

See also

Use one of these tools to paint filled-in frames in your image:

Filled Ellipse

Filled Rectangle

Filled Rounded Rectangle

These tools paint a frame using the current pen style. The frame is filled using the current pattern and color. Specify a null pen style in the Set Pen Style and Width dialog box if you don't want Resource Workshop to put an outline around the filled-in pattern.

To paint a filled-in frame,

1.	Choose the tool you want.

2.	Point the tool's cross hairs where you want to start a corner of the frame.

3.	Click a mouse button and drag the frame tool until the frame outline surrounds the area you want.

4.	Release the mouse button.

Use the left mouse button to sketch with the current foreground color.   Use the right mouse button to sketch with the current background color.

Before you paint a filled-in frame, you might want to specify the pen style and pattern and choose the foreground and background colors.


Filled Rectangle tool

See also

Use the Filled Rectangle tool to paint a rectangular filled-in frame in your image.


 Filled Rounded Rectangle tool

See also

Use the Filled Rounded Rectangle tool to paint a filled-in frame, in the shape of a rounded rectangle, in your image.


Filled Ellipse tool

See also

Use the Filled Rounded Ellipse tool to paint an ellipse-shaped filled-in frame in your image.


 Eye Dropper tool

See also

Use the Eye Dropper tool to copy a color from the current image. This is useful when you have a color in an image that isn't displayed in your color palette.

To select a color for use with any tool,

1.	Select the Eye Dropper from the Tool palette.

2.	Click to copy the color as a foreground color, or right-click to copy the color as a background color.

3.	Select the tool you want to use with the new color.


 Arc tool

See also

Use the Arc tool to create a Bezier arc, curve, or closed loop using the current pen style and color.

To create an arc,

1.	Select the Arc tool from the Tool Palette.

2.	Click and drag to draw a line of the appropriate length.

3.	Click the line you just created and drag it to create the arc you want. The point you select on the line determines the shape of the arc. To create a symetrical arc, click the center of the line.

4.	Without moving the cursor, click again to "set" the arc.

To create a curve,

1.	Select the Arc tool from the Tool Palette.

2.	Click and drag to draw a line of the appropriate length.

3.	Click the line you just created and drag it to create the arc you want. The point you select on the line determines the shape of the arc.

4.	Click another part of the line and drag it to create another arc in the line. You can click many points on the line to create the desired curve.

To create a closed loop,

1.	Select the Arc tool from the Tool Palette.

2.	Click where you want the closed end of the loop to be. This end is stationary and will not move as you create the loop.

3.	Click where you want the top of the loop to be. This creates a line. This end may move as you create the loop.

4.	Click the line and drag it to adjust the arc. The arc is mirrored, resulting in a closed loop.

To constrain the lines to 45-degree angles, press Shift as you draw the line. You will only be able to draw horizontal, vertical or 45-degree lines.

Use left mouse button to draw with the current foreground color.

Use the right mouse button to draw with the current background color.


Hand tool

See also

Unlike other tools, the Hand tool isn't included in the Tool palette. But you can change any tool (except the Text tool) into a hand by holding down Ctrl.

The Hand tool is a grabbing tool. You just click the hand on the image and drag it in the direction you want it to move.

The Hand tool is automatically displayed when you select an area using the Pick Rectangle or Scissors tool. Sometimes when you display a zoomed image, not all of it fits in the display. You can use the Hand tool to move the image around to see other parts of it.


Pattern style

See also

The Pattern style tool shows the current pattern style. Some of the tools in the Tool palette use this style when they paint a pattern on your image. These tools are:

Airbrush

Filled Ellipse

Filled Rectangle

Filled Rounded Rectangle

Paintbrush

Click the Pattern tool to display the Set Pattern Type dialog box where you choose the pattern that is painted when you use these tools.


Pen style

See also

The Pen style tool shows the current pen style and width. Some of the tools in the Tool palette use this style when they draw a line on your image. These tools are:

Line

Ellipse

Pen

Arc

Rectangle

Rounded Rectangle

Click the Pen style tool to display the Set Pen Style and Width dialog box, where you choose the pen style and width for these tools. The pen style is drawn relative to the size of the image.


Airbrush shape

See also

The Airbrush shape shows the current shape used for the Airbrush tool. Click the Airbrush shape tool to display the Set Brush Tip dialog box, where you choose the airbrush tip shape.


Paintbrush shape

See also

The Brush shape tool shows the current shape of the Paintbrush tool. Click the Brush shape tool to display the Set Brush Tip dialog box where you choose the brush shape.


About the Control palette

See also

The Control palette consists of the following pages:

The Standard page contains tools that let you place standard Windows controls.

The Common page contains tools that let you place common Windows controls.

The BWCC page contains tools that let you place Borland-style controls.

The Custom page contains tools that let you place any custom controls you may have installed, including VBX controls

The Data Access page contains tools that let you place the Visual Database Tools Data Access controls.

The Data Aware page contains tools that let you place the Visual Database Tools Data Access controls.

Moving the Control palette

To move the Control palette, click and drag the title bar of the palette to a new location.

Hiding and showing the Control palette

To hide and show the Control palette:

Choose Dialog|Show|Control Palette

Right-click outside the dialog box you are designing and choose Control Palette

To place a control,

1.	Click the page of the Control palette you want.

2.	Select a control tool with your mouse by clicking it.

3.	To place the control with the default size, click the mouse button on the dialog.

To place the control and size it at the same time, click and drag the mouse in the dialog to the desired size.


Standard page of the Control palette

See also

The Standard page of the Control palette contains tools for placing standard Windows controls in your dialog box. Click one of the following tools for more information:

	Selector
	Push Button
	Radio Button
	Check Box
	Static Text
	Text Edit
	List Box
	Combo Box
	Horizontal Scroll Bar
	Vertical Scroll Bar
	Group Box
	Horizontal Static Line
	Vertical Static Line
	Static Frame
	Static Rectangle
	Static Picture


Selector tool

See also

You use the Selector tool to select one or more controls in your dialog box. To select a single control, click the Selector inside the control. To select more than one control, click and drag your mouse around the controls you want to select.

Note:	You can also select multiple controls by pressing the Shift key while clicking on controls. The selection becomes cumulative. Clicking a second time while holding the Shift key will unselect the control, while keeping other selections.

When you use the Selector tool, your pointer is the shape of an arrow. Choose the Selector tool to exit another mode and return your pointer to the arrow shape.

The Selector tool is available on all pages of the Control palette.


Push Button tool

See also

The Push Button tool puts a push button control in your dialog box. A push button control sends a message to its parent when a user selects it. The push button is a rectangle with rounded corners. It can contain text, an icon, or a bitmap.

Windows defines a set of control ID values and names for the standard push buttons used to exit dialog boxes. To use these buttons, you need to enter the predefined value or name in the General page of the Property Inspector.

Enter the ID name (IDOK, etc.) in the ID box.

Enter the text you want to display on the button in the Caption box.

The predefined ID values are:

IDValue	ID Name	Button Type

1	IDOK	OK

2	IDCANCEL	Cancel

3	IDABORT	Abort

4	IDRETRY	Retry

5	IDIGNORE	Ignore

6	IDYES	Yes

7	IDNO	No

Note:	The ID name must be entered in uppercase letters.


Radio Button tool

See also

The Radio Button tool puts a radio button control in your dialog box. A radio button control is a circular button with text, an icon, or a bitmap. The control sends a message to its parent when the user selects it. Radio buttons are used in groups to represent related but mutually exclusive options.


Check Box tool

See also

The Check Box tool puts a check box control in your dialog box. A check box control is a small button that sends a message to its parent when a user selects it.

When a check box is selected, an X appears on the button. When a check box is not selected, the X disappears. Check boxes are often used to represent Boolean (on/off) states for individual options. Check boxes can also have a third state, represented by a light gray shading. This state is usually interpreted as "indeterminate."


Static Text tool

See also

The Static Text tool puts a static text control in your dialog box. A static text control is text in a rectangle. The text is displayed as:

Left-aligned, without word wrap

Left-aligned, with word wrap

Centered

Right-aligned

Simple


Text Edit tool

See also

The Text Edit tool puts an edit control in your dialog box. An edit control allows a user to:

Enter text

Edit text

Move the insertion point

Delete text

Move text

An Edit control receives focus when the user clicks it or presses the Tab key to move to it. Once selected, the Edit control displays text and a flashing cursor to indicate the insertion point. The Edit control can send a message to its parent when the user selects it.


List Box tool

See also

The List Box tool puts a list box control in your dialog box. The list box control displays a list of items. The user can browse the list and choose one or more items. List box items can be represented by text strings, bitmaps, or both.


Combo Box tool

See also

The Combo Box tool puts a combo box control in your dialog box. A combo box control is a combination of a list box control and a static text or edit control.

The list box control can drop down; it does not have to display all the time.

The static text control forces an item (if one exists) to be displayed in the list box portion of the combo box control.

The edit control allows the user to enter a selection. The list box will then higlight the first item that matches the selection. Then, the user can select the highlighted item.


Horizontal Scroll Bar tool

See also

The Horizontal Scroll Bar tool puts a horizontal scroll bar control in your dialog box. A horizontal scroll bar control consists of a horizontal rectangle with a direction arrow at both ends.

A horizontal scroll bar control lets the user scroll the contents of the window to the left or right. The control sends a message to its parent when a user selects it.


Vertical Scroll Bar tool

See also

The Vertical Scroll Bar tool puts a vertical scroll bar control in your dialog box. A vertical scroll bar control consists of a vertical rectangle with a direction arrow at both ends.

A vertical scroll bar control lets the user scroll the contents of the window to the up or down. The control sends a message to its parent when a user selects it.


Group Box tool

See also

The Group Box tool puts a group box control in your dialog box. A group box control is rectangular box around a group of controls. It is used to visually group controls together. You can include a caption in the upper left corner of the group box. An application cannot send messages to a group box.


 Static Frame tool

See also

The Static Frame tool puts a static frame control in your dialog box. A static frame is an empty border that can be black, gray, or white. It can also appear etched.

A Static Frame control is used for visual effect.


Static Rectangle tool

See also

The Static Rectangle tool puts static rectangle control in your dialog box. A static rectangle control is a rectangle that can be black, gray, or white.

A static rectangle control is used for visual effect.


Horizontal Static Line tool

See also

The horizontal static line tool puts a horizontal static line control in your dialog box. A horizontal static line control is used for visual effect.

Note:	Static lines are only displayed when using Windows 95 or Windows NT with the shell.


Vertical Static Line tool

See also

The vertical static line tool puts a vertical static line control in your dialog box. A vertical static line control is used for visual effect.

Note:	Static lines are only displayed when using the Windows 95 or Windows NT with the shell.


Static Picture tool

See also

The Static Picture tool puts a static picture control in your dialog box. A static picture control can display an icon, bitmap, or enhanced metafile. A static picture control is used for visual effect.

The Caption property identifies the resource ID of the icon, bitmap, or enhanced metafile. The actual picture can be viewed by putting the Dialog editor into test mode with the Dialog|Test Dialog command.


Common page of the Control palette

See also

The Common page of the Control palette contains tools for placing Windows common controls in your dialog box. Click one of the following tools for more information:

	Selector
	Animation
	Tab Control
	Tree View
	List View
	Hot Key
	Progress Bar
	Up-Down
	Track Bar
	Status Window
	Tool Bar
	Header
	Rich Edit


 Animation tool

See also

The Animation tool puts an animation control in your dialog box. An animation control is a window that displays an Audio Video Interleaved (AVI) clip, a series of bitmap frames. The clip is displayed without sound. Set the Caption property to the AVI file name of the clip.

Note:	You can set up the AVI file to display when the animation control is created. However, you cannot play the clip in design mode. To play the clip, check the Auto Play property on the Animation page and put the Dialog editor into test mode (Dialog|Test Dialog).


 Tab Control tool

See also

The Tab Control tool puts a tab control, like a set of notebook dividers, in your dialog. Tabs contain identifying text. Tabs are used to define multiple pages in a dialog box. A user clicks a tab to switch between dialog box pages.

Note:	You cannot add the actual tabs using the Dialog editor because the tabs are not encoded in the .RC files. They can only be created through programming. You can use the Sample Item Count property (one of the properties on the TabControl page) to test what the tabs would look like.


 Tree View tool

See also

The Tree View tool places a tree view control in your dialog. A tree view control displays a group of items in a hierarchy, with icons to expand and collapse the hierarchy. Each item consists of a label and an optional bitmapped image.


List View tool

See also

The List View tool places a list view control in your dialog. A list view control displays a group of items. You can display the items in the group:

With their standard icons. Each item is represented by an icon and a text label. Items can be moved.

With their small icons. Each item is represented by a small icon and a text label to the right of the icon. Items can be moved.

As a list. Each item is represented by a small icon and a text label. Items are arranged in columns and cannot be moved.

As a report. Each item is represented by a small icons and text label, and additional information about each item.

A header control is usually associated with a list view control.


Hot Key tool

See also

The Hot Key tool places a hot key control in a dialog box. A hot key control lets the user enter a combination of keystrokes to be used as a shortcut key. The hot key control displays the current choices and makes sure that the key combination selected is valid.


 Progress Bar tool

See also

The Progress Bar tool places a progress bar control in your dialog box. A progress bar control, using a range and current position, shows an operation's percentage of completion. It can include text. You usually use a progress bar for an installation program.


 Up-Down tool

See also

The Up-Down tool places an up-down control in your dialog. An up-down control consists of an up and down arrow. The up-down control increments and decrements values in the companion control.

Usually, you use an up-down control in conjunction with a companion control, also referred to as a buddy window.


 Track Bar tool

See also

The Track Bar tool places a track bar control in your dialog box. A track bar control lets the user change a value within a set range. The track bar displays ticks that represent the current value. The user adjusts a slider to change the value.


 Header tool

See also

The Header tool places a header control in a window, usually in a list view window. Headers can contain a string, a bitmapped image, and an application-defined 32-bit value. If a header contains both a string and an image, the image is displayed above the string. If they overlap, the string overwrites the image.

Headers are usually used for column headings. By default, headers appear as text on a gray background. Headers do not have input focus.


 Rich Text Edit tool

See also

The Rich Text Edit tool places a rich text edit control in your dialog box. A user can enter and edit text in this control. The user can assign character and paragraph formatting attributes (font, colors, etc.) to the text, and can include embedded OLE objects.


Status Bar tool
 Status Window tool

See also

The Status Window tool places a status window control in your dialog box. A status window control is a horizontal window at the bottom of a parent window. The application can display different kinds of status information in the control. The control can be divided into parts to display different kinds of information.


 Tool Bar tool

See also

The Tool Bar tool places a tool bar control in your dialog. A tool bar control contains one or more buttons, that are visual representations of commands. When a button is selected, it sends a command message to the parent window.


BWCC page of the Control palette

See also

The BWCC page of the Control palette contains tools for placing Borland-style controls in your dialog box. Click one of the following tools for more information:

	Selector
	Push Button
	Radio Button
	Check Box
	Group Box
	Horizontal Line
	Vertical Line
	Static Text
Note:	When you use one of more BWCC controls, you must link the BWCC library to your program or load it as a DLL.


 BWCC Push Button tool

See also

The BWCC Push Button tool puts a Borland-style push button control in your dialog box. A Borland-style push button control can contain symbols with high visual impact, as well as an owner draw option. A Borland push button is larger than most standard Windows push buttons. Its class is BorBtn.

These are the values for the predefined Borland-style bitmap buttons:

ID Name	ID Value	Button

IDOK	1
IDCANCEL	2
IDABORT	3
IDRETRY	4
IDIGNORE	5
IDYES	6
IDNO	7
IDHELP	998
To add your own bitmap to the button, see Adding a bitmap to a BWCC button.


Adding a bitmap to a BWCC push button

See also

To add your own bitmap to a BWCC push button,

1.	Use the BWCC Push Button tool to add the generic BWCC button to your dialog box. Note its control ID.

2.	Switch to the Graphics editor and create a bitmap image.

3.	In the Graphics editor, choose Resource|Resource Attributes to display the Resource Attributes dialog box. Then, do either of the following:

In the Resource Name box, enter an integer value that equals the control ID of the button plus the appropriate offset from the following table.

Rename the bitmap and assign it an identifier whose value equals the control ID of the button plus the appropriate offset from the following table.

Button State	Example	VGA Offset	EGA Offset

standard		id + 1000	id + 2000
pressed		id + 3000	id + 4000
keyboard focus		id + 5000	id + 6000
4.	Close the Graphics editor.

5.	Return to the Dialog editor. The bitmap displays on the BWCC button.


 BWCC Check Box tool

See also

The BWCC Check Box tool puts a Borland-style check box control in your dialog box. A Borland-style check box control is raised and displays a check mark, rather than an "X." Its class is BorCheck.

A BWCC check box can also have a third state, represented by a light gray shading. This state is usually interpreted as "indeterminate."


 BWCC Group Box tool

See also

The BWCC Group Box tool puts a Borland-style Group Box control in your dialog box. A Borland-style Group Box control is a shaded rectangular box. The box groups other controls visually. It can appear recessed into the dialog box or raised above its surface. Its class is BorShade.


 BWCC Horizontal Line tool

See also

The BWCC Horizontal Line tool puts a Borland-style horizontal line control in your dialog box. The horizontal line control gives the impression of being etched into the surface of the dialog box. Its class is BorShade.

You can convert lines to bumps, which appear to be raised above the surface of the dialog box.


 BWCC Radio Button tool

See also

The BWCC Radio Button tool puts a Borland-style radio button control in your dialog box. The radio button control is diamond-shaped and appears raised from the surface of the dialog box.

When the user clicks the button, a black diamond appears in its center and the button shading reverses, giving the impression that it has been pushed down. Its class is BorRadio.


 BWCC Vertical Line tool

See also

The BWCC Vertical Line tool puts a Borland-style vertical line control in your dialog box. The vertical line control gives the impression of being etched into the surface of the dialog box. Its class is BorShade.

You can convert lines to bumps, which appear to be raised above the surface of the dialog box.


 BWCC Static Text tool

See also

The BWCC Static Text tool places a Borland-style Static Text control in your dialog box. The static text control is a fixed text string in your dialog box. You use the string principally for labeling parts of the dialog box. Its class is BorStatic.


Custom page of the Control palette

See also

The Custom page of the Control palette contains all installed custom controls, including VBX controls. For information on installing custom controls, see Working with custom controls.


Data Access page of the Control palette

See also

The Data Access page of the Control palette contains the installed Visual Database Tools Data Access components.


Data Aware page of the Control palette

See also

The Data Aware page of the Control palette contains the installed Visual Database Tools Data Aware components.


Tool palette

See also

The Tool palette provides access to some of the most common Dialog editor tools, such as the alignment and spacing tools.

Here are the tools you can choose from:

	Left Sides
	Horizontal Center
	Horizontal Center in Dialog
	Space Horizontally Equal
	Right Sides
	Vertical Center
	Vertical Center in Dialog
	Space Vertically Equal
	Tops
	Bottoms
You can also use the Alignment dialog box to align controls and the Dialog|Space command to space controls.


Left Sides tool

See also

The Left Sides tool aligns selected controls so their left sides are aligned along the left side of the selection frame. The control that is leftmost determines the left edge of the selection frame.


Horizontal Centers tool

See also

The Horizontal Centers tool aligns controls so their horizontal centers are in the center of the selection frame. The leftmost and rightmost controls determine the size and location of the selection frame.


Right Sides tool

See also

The Right Sides tool aligns controls so their right sides are aligned along the right side of the selection frame. The control that is rightmost determines the right side of the selection frame.


Horizontal Center in Dialog tool

See also

The Horizontal Center in Dialog tool moves the selection frame horizontally so it is centered in the dialog box. The relative position of the individual controls within the selection frame is unchanged.


Tops tool

See also

The Tops tool aligns controls so their tops are aligned along the top of the selection frame. The topmost control determines where the top of the selection frame is located.


Vertical Centers tool

See also

The Vertical Centers tool aligns controls so their vertical centers are in the center of the selection frame.


Bottoms tool

See also

The Bottoms tool aligns controls so their bottoms are aligned along the bottom of the selection frame. The bottom most control determines where the bottom of the selection frame is located.


Vertical Centers in Dialog tool

See also

The Vertical Center in Dialog tool moves the selection frame vertically so it is centered in the dialog box. The relative position of the individual controls within the selection frame is unchanged.


 Space Horizontally Equal tool

See also

The Space Horizontally Equal tool moves the selected controls so that they are horizontally equi-distant from one another.


 Space Vertically Equal tool

See also

The Space Vertically Equal tool moves the selected controls so that they are vertically equi-distant from one another.


Property pages

See also

Use the pages of the Property Inspector to set properties for controls or dialog boxes. Pages are identified by tabs at the top of the Inspector. To choose a property page, just click the tab of the page you want. The pages displayed depend on the item (control or dialog) you have selected.

Here are the pages of the Property Inspector:

Page	Applies to

General	Dialogs; standard controls, common controls, BWCC controls

Window	Dialogs

Frame	Dialogs

Font	Dialogs

Extended	Dialogs

Extended	Standard push button, radio button, check box, and groupbox controls; common header; progress bar; status window, and track bar controls

Extended	Standard line, static frame, static rectangle, and static picture controls; common animation and up down controls

Extended	Standard edit, list box, and combo box controls; common tree view, list view, and rich edit controls

Extended	Common tab controls

Extended	Common hot key and tool bar controls

PushButton	Standard push button controls

RadioButton	Standard radio button controls

CheckBox	Standard check box controls

Edit	Standard edit box controls

ComboBox	Standard combo box controls

ListBox	Standard list box controls

Scroll Bar	Standard horizontal and vertical scroll bar controls

Text	Static text controls

Frame	Standard static frame controls

Rect	Standard static rectangle controls

Picture	Standard static picture controls

Animation	Common animation controls

TabControl	Common tab controls

TreeView	Common tree view window controls

ListView	Common list view window controls

HotKey	Common hot key controls

ProgressBar	Common progress bar controls

UpDown	Common up-down controls

TrackBar	Common track bar controls

Header	Common header controls

RichEdit	Common rich text edit controls

Status Window	Common status bar controls

ToolBar	Common tool bar controls

BWCCButton	Borland push button controls

BWCCRadioButton	Borland radio button controls

BWCCCheckBox	Borland check box controls

BWCCShade	Borland group box, vertical line, and horizontal line controls

BWCCStatic	Borland static text control


General property
General/Generic

See also

Use the General Property Page to specify the caption, identifier, and placement of your dialog box or control, as well as to set some common styles, including Visible, Tab Stop, Group Flag, and Disabled. You set properties on the General page for currently selected control(s) or the dialog.

The Generic page, displayed by choosing the Generic Page SpeedMenu command when working with the modeless Property Inspector, is similar to the General page of the Property Inspector. You use the Generic page to set the style and extended style for the control or dialog.

General properties

Caption

ID

Help ID

Left

Top

Width

Height

Visible

Disabled

Tab Stop

Horizontal Scrollbar (dialogs only)

Vertical Scrollbar (dialogs only)

Group Flag

Note:	If you are displaying the Generic page of the modeless Property Inspector, these properties are displayed instead of the Disabled, Tab Stop, Scrollbar, and Group Flag properties:

Style

ExStyle

Class

Data


ID
ID (General, Generic property)

The control's identifier. An ID can be a short integer or an integer expression. By convention, static controls that are not modified at run time are assigned a control ID of -1.


Help ID
Help ID (General, Generic property)

The control's Help ID. This ID is used for context-sensitive help, and displays the topic used for What's This help.


Left
Left (General, Generic property)

The coordinate of the dialog or control's left edge. Units are in dialog units.


Top
Top (General, Generic property)

The coordinate of the dialog or control's top edge. Units are in dialog units.


Width
Width (General, Generic property)

The width of the dialog box or control. For dialogs, 207 is the default width. See Default widths and heights of controls for information on control widths. For both dialogs and controls, units are in dialog units.


Height
Height (General, Generic property)

The height of the dialog box or control. For dialogs, 111 is the default height. See Default widths and heights of controls for information on control heights. For both dialogs and controls, units are in dialog units.


Visible
Visible (General property)

For dialog boxes, the Visible check box makes a modeless dialog box visible before the return from CreateDialog. This option has no effect on modal dialog boxes (the usual kind of dialog box); they are always visible. By default, this option is not checked.

For controls, the Visible check box determines whether the control is visible when the dialog box is first displayed. By default, the option is checked. If the option is not checked, the control does not appear. The application can call the ShowWindow function at run time to make the control appear.

This property controls the WS_VISIBLE style.


Disabled
Disabled (General property)

For dialogs, creates a window that is disabled when it is opened. A disabled dialog box cannot receive input from the user. The dialog is not disabled by default.

For controls, disables the control by graying it. This prevents the control from initially responding to user input. The control can be enabled at runtime with the EnableWindow function.

This property controls the WS_DISABLED style.


Tab Stop
Tab Stop (General property)

For dialogs, specifies that the dialog can receive keyboard focus when the user presses Tab. This is useful for nested dialogs.

For controls, specifies that the user can tab to this control. Turn this setting off to disable the tab stop.

This property controls the WS_TABSTOP style.


Horizontal Scrollbar
Horizontal Scrollbar (General property)

Inserts a horizontal scroll bar in the dialog box frame. This property controls the WS_HSCROLL style. It does not appear on the General page for controls.


Vertical Scrollbar
Vertical Scrollbar (General property)

Inserts a vertical scroll bar in the dialog box frame. This property controls the WS_VSCROLL style. It does not appear on the General page for controls.


Group Flag
Group Flag (General property)

For nested dialogs, enables the WS_GROUP style, allowing the user to move from one control in the group to the next with the arrow keys.

For controls, indicates the first control in a group. Turn this setting off to remove the control from the group.


Class
Class (Generic property)

The custom class for your dialog box. A custom class designation lets your application process dialog box messages with your own windows procedures instead of using standard Windows procedures.


Style
Style (Generic property)

A hexadecimal value that results from the settings on the other property pages. Only change this value if you are an advanced user.


ExStyle
ExStyle (Generic property)

A hexadecimal value that results from the settings on the other property pages. Only change this value if you are an advanced user.


Data
Data (Generic property)

Enter up to 255 bytes of data that can be passed to the WM_CREATE message. This data is meaningful within Resource Workshop only; if you enter data here, your dialog box will not be compatible with the Microsoft Resource Compiler.


Caption
Caption (General, Generic property)

For dialogs

Specifies the dialog box caption. The default is DIALOG-n, where n is an integer. The Caption property (a Frame Type) automatically displays the caption in a title bar at the top of the dialog box.

For controls

Specifies the control caption. The type of control determines where the caption displays. For example, in a group box, the caption displays at the top left. In a push button, the caption displays inside the button. Not all controls display a caption.

By default, the caption is the control type name with a number (incremented for each control). If you cut or copy a control and then paste it, the number is not incremented. For a Static Picture control, enter the name of the picture.

Choose Default control names for information on the default names assigned to controls.


Default control names

Standard Control	Default Caption	Caption Displayed?

Push Button	Button	Y

Radio Button	RadioButton	Y

Check Box	CheckBox	Y

Static Text	The static text	Y

Edit Text	Edit	Y

List Box	ListBox 	N

Combo Box	ComboBox	N

Scroll Bar	ScrollBar 	N

Group Box	Group	Y

Line	Line 	N

Static Frame	Frame 	N

Static Rectangle	Rect 	N

Static Picture	Picture	N

Common Control	Default Caption	Caption Displayed?

Animation	Animation	Y

Tab Control	TabControl 	N

Tree View	TreeView 	N

List View	ListView 	N

Hot Key	HotKey 	N

Progress Bar	ProgressBar 	N

Up-Down	UpDown 	N

Track Bar	TrackBar 	N

Header	Header 	N

Rich Text Edit	RichText	Y

Status Window	StatusWindow 	N

Tool Bar	ToolBar 	N

BWCC Control	Default Name	Caption Displayed?

Push Button	Button	Y

Radio Button	RadioButton	Y

Check Box	CheckBox	Y

Group Box	Group 	Y

Horizontal Line	Line 	N

Vertical Line	Line	N

Static Text	Text	Y


Default widths and heights of controls

Standard Control	Default Width	Default Height

Push Button	50 	14

Radio Button 	60	12

Check Box	60	12

Group Box	70	70

Text Edit 	20 	12

Combo Box	50	35

List Box	50 	35

Horizontal Scroll Bar	60 	9

Vertical Scroll Bar	9	35

Static Frame	20	20

Static Rectangle	20	20

Horizontal Static Line	20	1

Vertical Static Line	1	20

Static Text	60	8

Static Picture	20	20

Common Control	Default Width	Default Height

Animation	80	30

Tab Control	80	30

Tree View	80	30

List View	80	30

Hot Key	80	30

Progress Bar	80	30

Up-Down	9	30

Track Bar	80	30

Header	80	30

Rich Text Edit	80	30

Status Window	Width of dialog	Based on font and window border placement

Tool Bar	Width of dialog	14

BWCC Control	Default Width	Default Height

Push Button	37 (fixed)	25 (fixed)

Radio Button	60	12

Check Box	60	12

Group Box	40	40

Horizontal Line	100	2

Vertical Line	2	100

Static Text	60	8


Window Property
Window

See also

Use the Window Property Page to define the dialog's window type, positioning, initial state, and clipping attributes.

Window properties

Class

Menu

Window Type

Positioning

Initial State

Clipping


Class
Class (Window property)

The custom class for your dialog box. A custom class designation lets your application process dialog box messages with your own windows procedures instead of using standard Windows procedures.

If you enter bordlg in this box, your dialog box is implemented as a Borland-style dialog box. Use the Borland custom control tools to put Borland-style controls in your dialog box.

Using the Borland custom control class changes the appearance of your dialog window by painting the background with a brush that varies according to the target display device. For screens of VGA and higher resolution, the background is a fine grid of perpendicular white lines, giving the effect of "chiseled steel." For EGA and monochrome screens, the background is white.

Bordlg_Gray achieves the same effect as the bordlg class, except the background is solid gray instead of chiseled. Using this background can prevent flickering with some screen drivers and monitors.


Menu
Menu (Window property)

The menu associated with the dialog box. Enter the menu's resource identifier or resource ID.

The Dialog editor will not display the menu resource exactly as you define it. Instead, it displays a pop-up called "Menu" that includes a single menu item called "Item."


Window Type
Window Type (Window property)

The Window Type property selects a type of dialog box window.

Popup

Creates a dialog as a pop-up window. Because most dialog boxes are pop-ups, this is the default. This value sets the WS_POPUP style.

Overlapped

Creates a dialog as an overlapped pop-up window that can be partially covered by another. An overlapped window has a title bar and a border. Define a dialog box as overlapped only when it is the main window in the application.

This value sets the WS_OVERLAPPED style.

Child

Creates the dialog box as a child of another window. This value sets the WS_CHILD style.


Positioning
Positioning (Window property)

The Positioning property determines the placement of the dialog box in the window.

Absolute Align

Indicates that the coordinates of the dialog box are screen coordinates. Otherwise, Windows assumes they are client coordinates.

This value sets the DS_ABSALIGN style.

Center Dialog

Centers the dialog box in the working area. Changes only take effect for Windows 95 and Windows NT with the shell.

This value sets the DS_CENTER style.

Center Mouse

Centers the mouse cursor in the dialog box when the dialog is first opened. Changes only take effect for Windows 95 and Windows NT with the shell.

This value sets the DS_CENTERMOUSE style.

Foreground

Brings the dialog box to the foreground. Windows calls the SetForegroundWindow function for the dialog box. This setting does not apply to the 16-bit versions of Windows.

This value sets the DS_SETFOREGROUND style.


Initial State
Initial State (Window property)

The Initial State property determines how the dialog box displays when it is first opened.

Normal

Displays the dialog box in the size and position specified on the General property page.

Minimized

Minimizes the dialog box. This value sets the WS_MINIMIZE style.

Maximized

Maximizes the dialog box. This value sets the WS_MAXIMIZE style.


Clipping
Clipping (Window property)

The Clipping property determines how the dialog box is drawn.

Clip Children

Protects child windows from being drawn on by the dialog box window. This value sets the WS_CLIPCHILDREN style.

Clip Siblings

Protects the overlapping siblings of this window. This value sets the WS_CLIPSIBLINGS style.


Frame Property
Frame

See also

Use the Frame Property Page to define the dialog's frame type and attributes, and allow you to set miscellaneous dialog attributes.

Frame properties

Frame Type

Frame Attributes

Misc Flags


Frame Type (Frame property)

The Frame Type property determines if a title bar is displayed at the top of the dialog box.

None

Does not display a border or title bar on the dialog box.

If None is selected, the Caption property (a Frame Attribute). is automatically turned off.

Border

Places a single, thin border, without a title bar, around the dialog box. This value sets the WS_BORDER style.

Thick Frame

Creates a dialog with a sizing border. Use this option if you want the dialog box to be resizeable. This value sets the WS_THICKFRAME style.

Dialog Frame

Places a double border, without a title bar, around the dialog box. This value sets the WS_DLGFRAME style.


Frame Attributes
Frame Attributes (Frame property)

The Frame Attributes determine what the dialog box looks like and how the user can work with it.

System Menu

Inserts a system menu (control menu) on the left side of the title bar.

The system menu appears only if you turn on the Caption property.

If you turn on the Child property (one of the Window Types on the Window page), you see a close box instead of a Control menu.

This value sets the WS_SYSMENU style.

Caption

Creates a single, thin border around the dialog box and a title bar for the caption at the top of the dialog box. This is the default value. This value sets the WS_CAPTION style.

Minimize Box

Adds a Minimize button to the right side of the dialog box title bar. The minimize box appears only if you turn on the Caption property (a Frame Type). This value sets the WS_MINIMIZEBOX style.

Enabling the Minimize Box will automatically enable the Maximize Box.

Maximize Box

Adds a Maximize button to the right side of the dialog box title bar. The maximize box appears only if you turn on the Caption property (a Frame Type). This value sets the WS_MAXIMIZEBOX style.

Enabling the Maximize Box will automatically enable the Minimize Box.

System Modal

Creates a system modal dialog box. This means that the user cannot switch to anything else until the dialog box is closed. This value sets the DS_SYSMODAL style.


Misc Flags
Misc Flags (Frame property)

The Misc Flags control dialog box behavior and appearance.

Fixed Sys Font

Is Control

No Idle Messages

Local Edit

3-D Look

No Fail Create


Fixed Sys Font
Fixed Sys Font (Frame property)

Uses the Fixed System Font instead of the System Font. Changes only take effect for Windows 95 and Windows NT with the shell.

This value sets the DS_FIXEDSYS style.


Is Control
Is Control (Frame property)

Creates a dialog box that works well as a child window of another dialog box, like a page in a property sheet. This style allows the user to tab among the control windows of a child dialog box, use its accelerator keys, etc.

This value sets the DS_CONTROL style.


No Idle Messages
No Idle Messages (Frame property)

Suppresses sending idle (WM_ENTERIDLE) messages to the application's main window. For this option to have any effect, you must also turn on the System Modal setting.

This value sets the DS_NOIDLEMSG style.


Local Edit
Local Edit (Frame property)

Directs any edit controls in the dialog box to allocate memory from the application's data segment. Turn this setting on if your application uses the EM_SETHANDLE and EM_GETHANDLE messages. This setting applies to 16-bit applications only. This value sets the DS_LOCALEDIT style.


3-D Look
3-D Look (Frame property)

Applies a three-dimensional look and feel to all controls in the dialog box. Gives the dialog box a non-bold font and draws 3-dimensional borders around controls in the dialog box. Changes only take effect for Windows 95 and Windows NT with the shell.

This value sets the DS_3DLOOK style.

Note:	This setting is not required by 32-bit based applications that are marked as version 4.0 or greater; the system automatically applies the three dimensional look to dialog boxes created by these applications.


No Fail Create
No Fail Create (Frame property)

Creates the dialog box even if errors occur. Changes only take effect for Windows 95 and Windows NT with the shell.

This value sets the DS_NOFAILCREATE style.


Extended Property
Extended

See also

Use the Extended Property Page to determine how the dialog box is positioned, its alignment, reading order, and its behavior. These properties apply to 32-bit applications only.

Extended properties

General Alignment

Reading Order

ScrollBar Alignment

Window Flags


Reading Order
Reading Order (Extended property)

The Reading Order property determines the side from which you begin reading text.

Left to Right

Displays the text using left-to-right reading order. This value sets the WS_EX_LTRREADING style.

Right to Left

Displays the text using right-to-left reading order. This is only available for the Arabic and Asian language versions of Windows.

This value sets the WS_EX_RTLREADING style.


ScrollBar Alignment
Scroll Bar Alignment (Extended property)

The Scroll Bar Alignment property aligns the scroll bar.

Left

Places a vertical scroll bar to the left of the client area. This value sets the WS_EX_LEFTSCROLLBAR style.

Right

Places a vertical scroll bar to the right of the client area. This is the default. This value sets the WS_EX_RIGHTSCROLLBAR style.


General Alignment
General Alignment (Extended property)

The General Alignment property determines the default alignment behavior.

Left

Gives the dialog box or control generic left-aligned properties. This is the default. This value sets the WS_EX_LEFT style.

Right

Gives the dialog box or control generic right-aligned properties. Set this value when the Right to Left Reading Order property is set.

This value sets the WS_EX_RIGHT style.


Window Flags
Window Flags (Extended property)

The Window Flags control dialog box behavior and appearance.

Client Edge

Static Edge

Modal Frame

Control Parent

MDI Child

Context Help

Transparent

Accept Files

No Parent Notify

Top Most

App Window

Tool Window


Client Edge
Client Edge (Extended property)

Creates a three-dimensional frame that looks like it is sunken into the background. This value sets the WS_EX_CLIENTEDGE style.


Static Edge
Static Edge (Extended property)

Creates a window with a three-dimensional frame. Use it for items that do not accept user input. This value sets the WS_EX_STATICEDGE style.


MDI Child
MDI Child (Extended property)

Creates the dialog box as an MDI child window. This value sets the WS_EX_MDICHILD style.


Control Parent
Control Parent (Extended property)

Allows the user to navigate among the child windows (controls) of the window with the Tab key. This value sets the WS_EX_CONTROLPARENT style.


Context Help
Context Help (Extended property)

Displays the question mark for context-sensitive help in the upper right corner of the dialog box.

This value sets the WS_EX_CONTEXTHELP styles.


Tool Window
Tool Window (Extended property)

Creates a window that is intended to be used as a floating tool bar. The title bar of a tool window is shorter than a normal title bar, and the title is in a smaller font. A tool window is not displayed in the Task Bar or Windows Change To dialog.

This value sets the WS_EX_TOOLWINDOW styles.


Transparent
Transparent (Extended property)

Specifies that the dialog box is transparent, so that any windows beneath this dialog box are not obscured.

This value sets the WS_EX_TRANSPARENT style.


Accept Files
Accept Files (Extended property)

Specifies that the dialog box accepts drag and drop files. This value sets the WS_EX_ACCEPTFILES style.


No Parent Notify
No Parent Notify (Extended property)

Prevents the dialog box from sending the WM_PARENTNOTIFY message to its parent window when it is created, destroyed, or is mouse-clicked. This value sets the WS_EX_NOPARENTNOTIFY style.


TopMost
TopMost (Extended property)

Causes the dialog box to be placed above all other non-topmost windows and stay above them even when the dialog box is not active. This value sets the WS_EX_TOPMOST style.


AppWindow
AppWindow (Extended property)

Forces a topmost window to the Windows Task Bar when the window is minimized. Changes only take effect for Windows 95 and Windows NT with the shell.

This value sets the WS_EX_APPWINDOW style.


Dialog Modal Frame
Modal Frame (Extended property)

Frames the window with a combination of the dialog frame and the caption styles. This option also lets users move the dialog box.

This value sets the WS_EX_DLGMODALFRAME styles.


Font Property
Font

See also

Use the Font Property Page to choose the font, size, and font style for the text in your dialog. An example of your choices are displayed at the bottom of the dialog box.

Font properties

Name

Size

Styles


Name
Name (Font property)

Chooses the typeface for text in the dialog box.


Size
Size (Font property)

Specifies the font point size.


Styles
Styles (Font property)

Selects the font style. Applies only to DIALOGEX resources.

Italic

Italicizes the font.

Bold

Makes the font bold.

Strikeout

Strikes out the font.

Underline

Underlines the font.


Push Button Property
PushButton

See also

Use the PushButton Property Page to customize a standard Windows push button. You place a push button control with the Push Button tool.

PushButton properties

PushButton Type

Button Image

Horz Alignment

Vert Alignment

PushButton Flags


PushButton Type
PushButton Type (PushButton property)

The PushButton Type property determines the type of push button.

Normal

Defines a button containing text. When the user clicks the button, a WM_COMMAND message is sent to the owner window. This is the default.

This value sets the BS_PUSHBUTTON style.

Default

Defines a button containing text. It is identical to a normal push button, but also includes a bold border indicating that the user can select the button by pressing Enter, even when the button does not have focus.

This value sets the BS_DEFPUSHBUTTON style.

Owner Draw

Defines an owner-drawn button. This value sets the BS_OWNERDRAW style.


Horz Alignment
Horz Alignment (PushButton, CheckBox, RadioButton, GroupBox property)

The Horz Alignment property aligns text horizontally in the button or box text area. Changes only take effect for Windows 95 and Windows NT with the shell.

Left

Left-justifies text. This value sets the BS_LEFT style.

For radio buttons and check boxes, if the Right Button flag is set, the text is left-justified on the right side of the button or box.

Center

Centers text horizontally. This is the default. This value sets the BS_CENTER style.

Right

Right-justifies text. This value sets the BS_RIGHT style.

For radio buttons and check boxes, if the Right Button flag is set, the text is right-justified on the right side of the button or box.


Button Image
Button Image (PushButton, CheckBox, RadioButton, GroupBox property)

The Button Image property determines what image is displayed on the button or box. Changes only take effect for Windows 95 and Windows NT with the shell.

Text

Specifies that the button or box displays text. This is the default. This value sets the BS_TEXT style.

Bitmap

Specifies that the button or box displays a bitmap. This value sets the BS_BITMAP style.

Icon

Specifies that the button or box displays an icon. This value sets the BS_ICON style.


Vertical Alignment
Vert Alignment (PushButton, CheckBox, RadioButton property)

The Vert Alignment property aligns text vertically in the  button or box text area. Changes only take effect for Windows 95 and Windows NT with the shell.

Top

Pushes text to the top of the button or box. This value sets the BS_TOP style.

Center

Center texts in the middle of the button or box. This is the default. This value sets the BS_VCENTER style.

Bottom

Pushes text to the bottom of the button or box. This value sets the BS_BOTTOM style.


PushButton Flags
PushButton Flags (PushButton property)

The PushButton Flags control the button’s behavior. Changes only take effect for Windows 95 and Windows NT with the shell.

Notify Parent

Multiline

Flat


Notify Parent (PushButton, CheckBox, RadioButton, GroupBox)
Notify Parent (PushButton, CheckBox, RadioButton, GroupBox property)

Lets the button send BTN_DBLCLK, BTN_KILLFOCUS, and BTN_SETFOCUS messages to the parent window. This value sets the BS_NOTIFY style.

Note:	A button will send the BTN_CLICKED message even if Notify Parent is off.


Flat
Flat (PushButton, CheckBox, RadioButton, GroupBox property)

When on, gives the button a flat appearance (a two-dimensional style). When off, the button has a three-dimensional style.

This value sets the BS_FLAT style.


Multiline
Multiline (PushButton property)

When off, allows the text on the button to contain only a single line of text. When on, the text can wrap to multiple lines if the string is too long to fit on a single line.

This value sets the BS_MULTILINE style.


RadioButton Property
RadioButton

See also

Use the RadioButton Property Page to customize a standard Windows radio button. You place a radio button control with the Radio Button tool.

RadioButton properties

RadioButton Type

Button Image

Horz Alignment

Vert Alignment

RadioButton Flags


RadioButton Type
RadioButton Type (RadioButton property)

The RadioButton Type property determines the type of radio button.

Normal

Defines a small, circular button with identifying text. By default, text is displayed to the right of the circle. To display text to the left, set the Right Button flag.

This value sets the BS_RADIOBUTTON style.

Auto

Defines a button that is identical to a normal radio button, but when the user selects it, Windows fills the radio button and unchecks all other radio buttons in the group. This is the default.

This value sets the BS_AUTORADIOBUTTON style.


RadioButton Flags
Radiobutton Flags (RadioButton property)

The Radiobutton Flags control the button’s behavior. Changes only take effect for Windows 95 and Windows NT with the shell.

Notify Parent

Flat

Right Button

Push Like

Multiline


Right Button
Right Button (RadioButton property)

Positions the radio button circle on the right side of the button control.

This value sets the BS_RIGHTBUTTON style.


Push Like
Push Like (RadioButton property)

Makes the radio button look and act like a push button. The button looks raised when it is off, and sunken when it is on.

This value sets the BS_PUSHLIKE style.


Multiline
Multiline (RadioButton property)

When off, allows the text on the radio button to contain only a single line of text. When on, the text can wrap to multiple lines if the string is too long to fit on a single line.

This value sets the BS_MULTILINE style.


Check Box Property
CheckBox

See also

Use the CheckBox Property Page to customize a standard Windows check box. You place a check box control with the Check Box tool.

CheckBox properties

CheckBox Type

Button Image

Horz Alignment

Vert Alignment

CheckBox Flags


CheckBox Type
CheckBox Type (CheckBox property)

The CheckBox Type property determines the type of check box.

Normal

Defines a small, rectangular box with identifying text to the right. The box is marked with an X when it is selected. It is the application's responsibility to check and uncheck the box when the user turns the box on or off.

This value sets the BS_CHECKBOX style.

Auto

Defines a check box that is identical to a normal check box, but Windows automatically checks and unchecks the box when the user selects it. This is the default.

This value sets the BS_AUTOCHECKBOX style.

TriState

Defines a box that is identical to a check box. In addition to being on or off, the button has a third state - it can be grayed to show that its state is unknown or indeterminate. It is the application's responsibility to check, uncheck, and dim the box.

This value sets the BS_3STATE style.

Auto TriState

Defines a box that is identical to a TriState button, but Windows does the checking, unchecking, and dimming instead of the application program.

This value sets the BS_AUTO3STATE style.


CheckBox Flags
CheckBox Flags (CheckBox property)

The CheckBox Flags control the check box behavior. Changes only take effect for Windows 95 and Windows

Notify Parent

Flat

Right Button

Push Like

Multiline


Right Button
Right Button (CheckBox property)

Positions the box on the right side of the check box control.

This value sets the BS_RIGHTBUTTON style.


Push Like
Push Like (CheckBox property)

Makes the check box look and act like a push button. The button looks raised when it is off, and sunken when it is on.

This value sets the BS_PUSHLIKE style.


Multiline
Multiline (CheckBox property)

When off, allows text in the check box text area to contain only a single line of text. When on, the text can wrap onto multiple lines if the string is too long to fit on a single line.

This value sets the BS_MULTILINE style.


GroupBox Property
GroupBox

See also

Use the GroupBox Property Page to customize a standard Windows group box. You place a group box control with the Group Box tool.

GroupBox properties

Button Image

GroupBox Flags

Horz Alignment


GroupBox Flags
GroupBox Flags (Group Box property)

The GroupBox Flags control the group box behavior. Changes only take effect for Windows 95 and Windows NT with the shell.

Notify Parent

Flat


Edit Property
Edit

See also

Use the Edit Property Page to customize a standard Windows text edit control. You place a text edit control with the Text Edit tool.

Edit properties

Alignment

Case

Edit Flags

Scrolling


Alignment
Alignment (Edit, RichEdit, BWCCShade property)

The Alignment property aligns text entered into the control.

Left

Text is left-justified. This is the default. For Edit and Rich Edit properties, this value sets the ES_LEFT style. For the BWCCShade property, it sets the BBS_LEFT style.

Center

Text is centered. For Edit and Rich Edit properties, applies only to multi-line text and sets the ES_CENTER style. For the BWCCShade property, sets the BSS_CENTER style.

Right

Text is right-justified. For Edit and Rich Edit properties, applies only to multi-line text and sets the ES_RIGHT style. For the BWCCShade property, sets the BSS_RIGHT style.


Case
Case (Edit, ComboBox property)

The Case property determines how edit text is displayed as it is typed.

Mixed

Displays text as the user types it. This is the default.

Upper

Displays text in uppercase characters, regardless of how it is typed.

For edit text, this value sets the ES_UPPERCASE style. For combo boxes, it sets the CBS_UPPERCASE style.

Lower

Displays text in lowercase characters, regardless of how it is typed.

This value sets the ES_LOWERCASE style. For combo boxes, it sets the CBS_LOWERCASE style.


Edit Flags
Edit Flags (Edit property)

The Edit Flags control the text edit control's behavior.

Multiline

OEM Convert

Number

No Hide Sel

ReadOnly

Password

Want Return

Border


Multiline
Multiline (Edit property)

Creates a text edit control that allows for multiple lines of text. This value sets the ES_MULTILINE style.


OEM Convert
OEM Convert (Edit property)

Converts text the user enters to the current OEM character set, then reconverts the text to ANSI. This option is useful in file input boxes because it ensures that any file name entered will be translatable into the OEM character set, which is used by the DOS file system.

This value sets the ES_OEMCONVERT style.


Number
Number (Edit property)

Restricts input to digits only. Changes only take effect for Windows 95 and Windows NT with the shell.

This value sets the ES_NUMBER style.


No Hide Sel
No Hide Sel (Edit property)

Highlights the selected text, even when the control does not have the keyboard focus. Choose Keep Selection when you want the user to see the highlighted text even when working with other controls.

This value sets the ES_NOHIDESEL style.


Read Only
Readonly (Edit property)

Makes the edit text read-only. The user cannot enter or modify text.  This value sets the ES_READONLY style.


Password
Password (Edit property)

Suppresses the display of each letter as it is typed. An application-defined character (usually an asterisk) appears in its place. This is helpful for keeping passwords secret.

This value sets the ES_PASSWORD style.


Want Return
Want Return (Edit property)

Windows inserts a return when the user presses Enter. Applies to multi-line text only.

This value sets the ES_WANTRETURN style.


Border
Border (Edit property)

Draws a border around the control. This value sets the WS_BORDER style.


Scrolling
Scrolling (Edit property)

The Scrolling property determines how text is scrolled and scroll bars are placed.

Horz Scroll

Places a horizontal scroll bar in the control. This value sets the WS_HSCROLL style.

Vert Scroll

Places a vertical scroll bar in the control. This value sets the WS_VSCROLL style.

Auto Horz Scroll

Automatically scrolls text to the right by 10 characters when the user types a character at the end of the line. When the user presses Enter, the text is scrolled back to position 0.

This value sets the ES_AUTOHSCROLL style.

Auto Vert Scroll

Automatically scrolls text vertically, if necessary, by 1 page when the user presses Enter on the last line of the page. Applies only to multi-line text.

This value sets the ES_AUTOVSCROLL style.


ComboBox Property
ComboBox

See also

Use the Combo Box Property Page to customize a standard Windows combo box. You place a combo box control with the Combo Box tool.

ComboBox properties

Sample Item Count

Combo Type

Case

Owner Draw

Vertical Scroll

Combo Flags


Sample Item Count
Sample Item Count (ComboBox property)

The number of sample items you want in the list at design time. This is a design aid only and is not saved in the resource script.


Combo Type
Combo Type (ComboBox property)

The Combo Type property chooses the type of combo box you're creating.

Simple

Always expands the drop-down list to display items. The user can edit the first item in the list. This is the default.

This value sets the CBS_SIMPLE style.

Drop Down

Creates a combo box with a single line of editable text when the dialog box is first displayed. The user can click the down arrow to expand the list.

This value sets the CBS_DROPDOWN style.

Drop Down List

Creates a combo box that works just like a drop down combo box, but the first item cannot be edited. The user can select an item in the list, but cannot change anything.

This value sets the CBS_DROPDOWNLIST style.


Vertical Scroll
Vertical Scroll (ComboBox property)

The Vertical Scroll property determines how text in the list is scrolled.

Never

Never scrolls text. This is the default.

Auto

Places a vertical scroll bar in the combo box. The scroll bar is hidden when the combo box does not contain enough items to scroll.

This value sets the WS_VSCROLL style.

Always

Always places a vertical scroll bar in the combo box. The scroll bar is visible, but disabled when the combo box does not contain enough items to scroll.

This value sets the CBS_DISABLENOSCROLL style.


Owner Draw
Owner Draw (ComboBox, ListBox property)

The Owner Draw property determines whether the list contained in the control should be drawn by the combo or list box or by the application.

None

The combo or list box control draws the list. This is the default.

Fixed

The owner of the combo or list box draws the contents. The items in the list are all the same height.

The combo or list box control sends the WM_MEASUREITEM message to the parent window once when the combo box is created. It sends WM_DRAWITEM message for each item to be displayed when a visual aspect of the combo or list box has changed.

For combo boxes, this value sets the CBS_OWNERDRAWFIXED style.  For list boxes, it sets the LBS_OWNERDRAWFIXED style.

Variable

The owner of the combo or list box draws the contents. The items in the list are of variable height.

The combo or list box control sends the WM_MEASUREITEM message to the parent window once when the combo or list box is created. It sends WM_DRAWITEM message for each item to be displayed when a visual aspect of the combo or list box has changed.

For combo boxes, this value sets the CBS_OWNERDRAWVARIABLE style. For list boxes, it sets the LBS_OWNERDRAWVARIABLE style.


Combo Flags
ComboFlags (ComboBox property)

The Combo Flags control the combo box behavior.

Auto Horz Scroll

Has Strings

No Integral Height

OEM Convert

Sort


Auto Horz Scroll
Auto Horz Scroll (ComboBox property)

Automatically scrolls text to the right when the user types a character at the end of the line.

This value sets the CBS_AUTOHSCROLL style.


Has Strings
Has Strings (ComboBox property)

Turn Has Strings on if you turn on either the Fixed or Variable values and you want the combo box to store text for each list item with the CB_SETLBTEXT message. The combo box can retrieve list items from CB_GETLBTEXT.

This value sets the CBS_HASSTRINGS style.


No Integral Height
No Integral Height (ComboBox property)

When off, sizes the combo box so all items in the list are completely displayed. This is off by default. If you need to precisely control the height of the list, turn this option on.

This value sets the CBS_NOINTEGRALHEIGHT style.


OEM Convert
OEM Convert (ComboBox property)

Converts text the user enters to the current OEM character set, then reconverts the text to ANSI. This setting applies only to combo boxes with the Simple or Drop Down Combo Type values set.

This value sets the CBS_OEMCONVERT style.


Sort
Sort (ComboBox property)

Automatically sorts items in the list alphabetically. This value sets the CBS_SORT style.


ListBox Property
ListBox

See also

Use the ListBox Property Page to customize a standard Windows list box. You place a list box control with the List Box tool.

ListBox properties

Sample Item Count

Scroll Bars

Selection

Owner Draw

ListBox Flags


Sample Item Count
Sample Item Count (ListBox property)

The number of sample items you want in the list at design time. This is a design aid only and is not saved in the resource script.


Selection
Selection (ListBox property)

The Selection property determines how items are selected.

Single

Only one item in the list can be selected at a time. This is the default.

Multiple

Allows the user to select any number of items.

This value sets the LBS_MULTIPLESEL style.

Extended

Allows the user to select any number of items using Shift and the mouse or other key combinations.

This value sets the LBS_EXTENDEDSEL style.


ScrollBars
ScrollBars (ListBox property)

The ScrollBars property determines how text is scrolled.

Horz Scroll

Places a horizontal scroll bar in the list box. This value sets the WS_HSCROLL style.

Vert Scroll

Places a vertical scroll bar in the list box. This is the default. This value sets the WS_VSCROLL style.

Force Visible

Forces the horizontal and/or vertical scroll bars to be displayed, if they have been activated.

Normally, the vertical scroll bar is not displayed when the list box is tall enough to display all items and the horizontal scroll bar is not displayed if the list box is wide enough to display all items. See WM_SETHORIZONTALEXTENT for more information.

This value sets the LBS_DISABLENOSCROLL style.


List Box Flags
ListBox Flags (ListBox property)

The ListBox Flags control the list box behavior.

Has Strings

Multi Column

No Integral Height

No Redraw

No Select

Notify Parent

Use Tab Stops

Keyboard Input

Sort

Border


Has Strings
Has Strings (ListBox property)

Turn the Has Strings flag on if you turn on either the Fixed or Variable Owner Draw values and you want the list box to store text for each list item with the LB_SETTEXT message. The list box can retrieve list items from LB_GETTEXT.

This value sets the LBS_HASSTRINGS style.


Multi Column
Multi Column (ListBox property)

Creates a list box in which the text wraps from column to column. The user scrolls the list box horizontally to display additional text. If you select this option, the application must send the LB_SETCOLWIDTH message to set the width of all columns in pixels.

This value sets the LBS_MULTICOLUMN style.


No Integral Height
No Integral Height (ListBox property)

When off, causes the list box to resize its height so that the client area is large enough to display items completely. This is off by default.

If No Integral Height is off and the list box needs to be resized to show items completely, the list box always decreases its size. For example, if three items are completely displayed at run time but another item does not quite fit, the list box will decrease its size so that only the three items are displayed.

If you turn this option on, your application must set the height of the list box to account for any items listed in it. This value sets the LBS_NOINTEGRALHEIGHT style.


No Redraw
No Redraw (ListBox property)

When off, redraws the list box when the list changes. This is off by default. Turn it off to prevent the list from being redrawn. This value sets the LBS_NOREDRAW style.


No Select
No Select (ListBox property)

When off, the user can select items in the list. When on, items can only be viewed, but not selected. This is off by default. This value sets the LBS_NOSEL style.


Notify Parent
Notify Parent (ListBox property)

Sends an input message to the parent window when the user clicks on an item in the list. This is the default.

This value sets the LBS_NOTIFY style.


Use Tab Stops
Use Tab Stops (ListBox property)

Organizes the information in the list box in columns. The default column width is 32 dialog units or 8 characters. Use Tab characters (\x09) to format the text.

(If you want to change the column width, the application should set its own tab stops using the LB_SETTABSTOPS message.)

This value sets the LBS_USETABSTOPS style.


Keyboard Input
Keyboard Input (ListBox property)

Passes what the user types to the application. This value sets the LBS_WANTKEYBOARDINPUT style.


Sort property
Sort (ListBox property)

Sorts the items in the list alphabetically. This is on by default. This value sets the LBS_SORT style.


Border
Border (ListBox property)

Draws a border around the control. This is on by default. This value sets the WS_BORDER style.


ScrollBar Property
ScrollBar

See also

Use the ScrollBar Property Page to customize a standard Windows scroll bar. You place a scroll bar control with the Horizontal and Vertical scroll bar tools.

ScrollBar properties

Scroll Bar Type

Alignment


Scroll Bar Type
Type (ScrollBar property)

The Type property determines the orientation and type of scroll bars.

Horizontal

Specifies a horizontal scroll bar. This value sets the SSB_HORZ style.

Vertical

Specifies a vertical scroll bar. This value sets the SSB_VERT style.

Size Box

Creates a size box. By default, the size box takes the height, width, and position specified in the General page. To change values, change None (an Alignment option) to Bottom/Right or Top/Left.

This value sets the SSB_SIZEBOX style.

Size Grip

Creates a size box that has a raised edge. Changes only take effect for Windows 95 and Windows NT with the shell.

This value sets the SSB_SIZEGRIP style.


Alignment
Alignment (ScrollBar property)

The Alignment property aligns the scroll bar. A rectangle defines the boundaries of the scroll bar. You can resize the rectangle, then use these alignment properties to decide how the scroll bar is aligned within the rectangle.

Bottom/Right

Determines placement of horizontal and vertical scroll bars in the selection frame. The horizontal scroll bar is placed at the bottom of the selection frame and extends the full width of the frame. The vertical scroll bar is placed at the right side of the selection frame and extends the full height of the frame.

This value sets the SSB_SIZEBOXBOTTOMRIGHTTALIGN style.

Top/Left

Determines the placement of horizontal and vertical scroll bars in the selection frame. The horizontal scroll bar is placed at the top of the selection frame and extends the full width of the frame. The vertical scroll bar is placed at the left side of the selection frame and extends the full height of the frame.

This value sets the SSB_SIZEBOXTOPLEFTALIGN style.

None

Places a scroll bar that fills the entire selection frame. If you resize the selection frame, you can distort the scroll bar. This option is the default.


Frame Property (Static Frame)
Frame

See also

Use the Frame Property Page to customize a standard Windows static frame. You place a static frame control with the following tools:

Static Frame tool

Horizontal Static Line tool

Vertical Static Line tool

Frame properties

Frame Style

Frame Type

Frame Flags


Frame Style
Frame Style (Frame property)

The Frame Style property determines the style of the frame or line.

Black

Displays an empty frame or line that is the color of the current window frame color. The default color is black for non-NewShell systems (NT3.51 and the old shell).

When you add a frame or line to your dialog box, it might appear to be filled with the current background color. When you switch to Test mode, you see the frame as it is displayed at run time.

This value sets the SS_BLACKFRAME style.

Gray

Displays an empty frame or line with a solid outline that is the color of the current screen background (desktop). The default color for the desktop is gray.

This value sets the SS_GRAYFRAME style.

White

Displays an empty frame or line with a solid outline that is the color of the current window background. The default color for the window background is white.

This value sets the SS_WHITEFRAME style.

Etched

Displays a static frame or line that appears etched into the background. This is the default for NT 3.51 and NT 4.0. Changes only take effect for Windows 95 and Windows NT with the shell.

This value sets the SS_ETCHEDFRAME style.


Frame Type
Frame Type (Frame property)

The Frame Style property determines the type of frame or line.

Frame

Creates a static frame. This is the default.

Vertical Line

Creates a vertical line. The default Width on the General page is 1.

Horizontal Line

Creates a horizontal line. The default Height on the General page is 1.


Frame Flags
Frame Flags (Frame property)

The Frame Flags control the frame behavior.

Notify Parent

Sunken


Notify Parent
Notify Parent (Frame property)

Sends the parent window the following message at the appropriate times: STN_CLICKED, STN_DBLCLK, STN_DISABLE, and STN_ENABLE.

This value sets the SS_NOTIFY style.


Sunken
Sunken (Frame property)

Draws a half-sunken border around the frame. This value sets the SS_SUNKEN style.


Rectangle Property
Rectangle

See also

Use the Rectangle Property Page to customize a standard Windows static rectangle. You place a static rectangle control with the Static Rectangle tool.

Rectangle properties

Rect Type

Rect Flags


Rectangle Type
Rectangle Type (Rectangle property)

The Rectangle Type property determines the type of rectangle.

Black

Displays a filled-in rectangle that is the same color as the current window frame color. The default color for a window frame is black.

This value sets the SS_BLACKRECT style.

Gray

Displays a filled-in rectangle that is the color of the current screen background (desktop). The default color for the desktop is gray.

This value sets the SS_GRAYRECT style.

White

Displays a filled-in rectangle that uses the current window background color. The default color for the window background is white.

This value sets the SS_WHITERECT style.


Rectangle Flags
Rectangle Flags (Rectangle property)

The Rectangle Flags control the rectangle behavior.

Notify Parent

Sunken


Notify Parent
Notify Parent (Rectangle property)

Sends the parent window the following message at the appropriate times: STN_CLICKED, STN_DBLCLK, STN_DISABLE, and STN_ENABLE.

This value sets the SS_NOTIFY style.


Sunken
Sunken (Rectangle property)

Draws a half-sunken border around the frame. This value sets the SS_SUNKEN style.


Text Property
Text

See also

Use the Text Property Page to customize a standard Windows static text box. You place a static text control with the Static Text tool.

Text properties

Text Type

Text Flags


Static Text Type
Text Type (Text property)

The Text Type property determines the type of text display.

Left, No Wrap

Displays text flush left within the control border. If there are multiple lines of text, this option automatically disables word wrapping. Text that extends past the end of a line is clipped.

This value sets the SS_LEFTNOWORDWRAP style.

Left

Displays text flush left within the control border. This is the default. If there are multiple lines of text, words that extend beyond the line wrap to the next line.

This value sets the SS_LEFT style.

Center

Displays text centered within the control border. If there are multiple lines of text, words that extend beyond the line wrap to the next line.

This value sets the SS_CENTER style.

Right

Displays text flush right within the control border. If there are multiple lines of text, words that extend beyond the line wrap to the next line.

This value sets the SS_RIGHT style.

Simple

Displays a single line of flush-left text. Text is displayed as opaque and is clipped to the size of the control.

The control must never be disabled. Text cannot be changed to a shorter string, because the control display is never cleared.

This value sets the SS_SIMPLE style.


Text Flags
Text Flags (Text property)

The Text Flags control the static text behavior.

Notify Parent

Sunken

No Prefix

Border


Notify Parent
Notify Parent (Text property)

Sends the parent window the following message at the appropriate times: STN_CLICKED, STN_DBLCLK, STN_DISABLE, and STN_ENABLE.

This value sets the SS_NOTIFY style.


Sunken
Sunken (Text property)

Draws a half-sunken border around the frame.

This value sets the SS_SUNKEN style.


No Prefix
No Prefix (Text property)

When on, translates ampersand (&) characters in the control's text to accelerator prefix characters. These characters are displayed with the ampersand removed and the next character underlined.

This value sets the SS_NOPREFIX style.


Border
Border (Text property)

Draws a border around the control. The border is a dark line.

This value sets the WS_BORDER style.


Picture Property
Picture

See also

Use the Static Picture Property Page to customize a standard Windows static picture. You place a static picture control with the Static Picture tool.

Static Picture properties

Picture Type

Picture Flags


Static Picture Type
Picture Type (Picture property)

The Picture Type property determines the type of static picture.

Bitmap

Specifies that a bitmap is to be displayed. The caption is the name of a bitmap defined elsewhere in the resource file. The picture automatically sizes itself to accommodate the size of the bitmap.

This value sets the SS_BITMAP style.

Icon

Specifies that an icon is to be displayed. The caption is the name of an icon defined elsewhere in the resource file. The picture automatically sizes itself to accommodate the size of the icon.

This value sets the SS_ICON style.

Enhanced Metafile

Specifies that an enhanced metafile is to be displayed. The caption is the name of a metafile. An enhanced metafile has a fixed size; it is scaled to fit the control's size.

This value sets the SS_ENHMETAFILE style.

Owner Draw

Defines an owner drawn static picture. The parent window receives a WM_MEASUREITEM message when the picture is created and a WM_DRAWITEM when a visual aspect of the picture changes.

This value sets the SS_OWNERDRAW style.


Picture Flags
Picture Flags (Picture property)

The Picture Flags control the static picture behavior.

Notify Parent

Sunken

Real Size Image

Center Image

Right Justified

Border


Notify Parent
Notify Parent (Picture property)

Sends the parent window the following message at the appropriate times: STN_CLICKED, STN_DBLCLK, STN_DISABLE, and STN_ENABLE.

This value sets the SS_NOTIFY style.


Sunken
Sunken (Picture property)

Draws a half-sunken border around the frame.

This value sets the SS_SUNKEN style.


Real Size Image
Real Size Image (Picture property)

Prevents an icon or bitmap from being resized as it is loaded or drawn. If the image is larger than the control size, the image is clipped. This only applies to a Bitmap or Icon Picture Type setting.

This value sets the SS_REALSIZEIMAGE style.


Center Image
Center Image (Picture property)

Centers the icon or bitmap image in the frame. If the image is smaller than the control area, the remaining area is filled with the color of the pixel in the top left corner of the bitmap or icon. This only applies to a Bitmap or Icon Picture Type setting.

This value sets the SS_CENTERIMAGE style.


Right Justified
Right Justified (Picture property)

Specifies that the lower right corner of an icon or bitmap remains fixed when the control is resized. Only the top and left sides are redrawn. This only applies to a Bitmap or Icon Picture Type setting.

This value sets the SS_RIGHTJUST style.


Border
 Border (Picture property)

Draws a border around the control. The border is a dark line.

This value sets the WS_BORDER style.


BWCCButton Property
BWCCButton

See also

Use the BWCCButton Property Page to customize a Borland-style push button. You place a BWCC push button control with the BWCC Push Button tool.

When you first place a Borland push button in your dialog box, its text is Button-n, where n is an integer. To change the button to one of the standard Borland buttons, change the control ID to one of the preset button style values. See the BWCC Push Button tool topic for more information.

BWCCButton properties

Button Flags


BWCC PushButton Flags
PushButton Flags (BWCCButton property)

The PushButton Flags determine the attributes of the Borland push button control.

Notify Parent

Border

Owner Draw

Default

Bitmap


Notify Parent (BWCC PushButton)
Notify Parent (BWCCButton, BWCCRadioButton, BWCCCheckBox property)

Sends the parent window the following messages at the appropriate times: BTN_CLICKED, BTN_DBLCLK, BTN_DISABLE, and BTN_ENABLE.

This value sets the BS_NOTIFY style.


Border
Border (BWCCButton, BWCCRadioButton, BWCCCheckBox property)

Draws a border around the control. The border is a dark line.

This value sets the BS_BORDER style.


Owner Draw
Owner Draw (BWCCButton, BWCCRadioButton, BWCCCheckBox property)

Defines the button as an owner drawn button. The owner window receives a WM_MEASUREITEM message when the button is created and a WM_DRAWITEM when a visual aspect of the button changes.

This value sets the BS_OWNERDRAW style.


Default
Default (BWCCButton property)

Places a Borland-style push button. This button behaves like a normal Borland-style push button, but has a heavy black border, indicating that the user can select the button by pressing Enter even when the button does not have focus.

This value sets the BS_DEFPUSHBUTTON style.


Bitmap
Bitmap (BWCCButton property)

Inserts a bitmap image (based on its control ID) into the button. This value sets the BS_BITMAP style.

Note:	If you choose Bitmap as the button type, use the Graphics Editor to create the bitmap. Then, you can display the bitmap image on the button. See Adding a bitmap to a BWCC push button for more information.


BWCCRadioButton Property
BWCCRadioButton

See also

Use the BWCCRadioButton Property Page to customize a Borland-style radio button. You place a BWCC radio button control with the BWCC Radio Button tool.

BWCCRadioButton properties

RadioButton Flags


RadioButton Flags (BWCCRadioButton)
RadioButton Flags (BWCCRadioButton property)

The RadioButton Flags determine the attributes of the Borland radio button control.

Notify Parent

Border

Owner Draw

Auto

Right Button


Auto
Auto (BWCCRadioButton property)

Creates a radio button that is identical to a Borland-style radio button, except that BWCC and Windows combine to highlight the selected button and deselect the other buttons.

This value sets the BS_AUTORADIOBUTTON style.


Right Button (BWCCRadioButton)
Right Button (BWCCRadioButton property)

Positions the radio button diamond on the right side of the button control.

This value sets the BS_RIGHTBUTTON style.


BWCCCheckBox Property
BWCCCheckBox

See also

Use the BWCCCheckBox Property Page to customize a Borland-style check box. You place a BWCC check box control with the BWCC Check Box tool.

BWCCCheckBox properties

CheckBox Type

CheckBox Flags


CheckBox Type
CheckBox Type (BWCCCheckBox property)

The CheckBox Type property determines the attributes of the Borland check box control.

Normal

Places a Borland-style check box in your dialog box. You can put text to the left or right of the box. The application must call the CheckDlgButton function to send a BM_SETCHECK message to check the selected box.

This value sets the BS_CHECKBOX style.

Auto

Creates a check box that is identical to a Borland-style check box, except that BWCC and Windows combine to handle checking the selection box. This is the default option.

This value sets the BS_AUTOCHECKBOX style.

TriState

Creates a Borland-style check box that has three states - on, off, and "indeterminate," which is displayed as a checkerboard pattern. The application determines what is meant by "indeterminate." The application must call the CheckDlgButton function to send a BM_SETCHECK message to check the selected box.

This value sets the BS_3STATE style.

Auto TriSate

Creates a check box that is identical to a Borland-style 3-state check box, except that BWCC and Windows combine to handle checking the selection box.

This value sets the BS_AUTO3STATE style.


CheckBox Flags (BWCCCheckBox)
CheckBox Flags (BWCCCheckBox property)

The CheckBox Flags control the check box behavior.

Notify Parent

Border

Owner Draw

Right Button


Right Button (BWCCCheckBox)
Right Button (BWCCCheckBox property)

Positions the check box on the right side of the button control.

This value sets the BS_RIGHTBUTTON style.


BWCCShade Property
BWCCShade

See also

Use the BWCCShade Property Page to customize a Borland-style group box, horizontal line, and vertical line. You place these controls with the:

BWCC Group Box tool

BWCC Horizontal Line tool

BWCC Vertical Line tool

BWCCShade properties

Shade Type

Caption Alignment

Shade Flags


Shade Type
Shade Type (BWCCShade property)

The Shade Type property defines the type of shade control. A dip is intended to act as a separator in a dialog box background or in a Raised Shade box. A bump is intended as a separator in a Group Shade box.

Group

Creates a gray box that appears recessed below the surface of the dialog box.

This value sets the BSS_GROUP style.

Raised

Creates a gray box that appears raised above the surface of the dialog box.

This value sets the BSS_RGROUP style.

Horz Dip

Creates a concave horizontal line. This is the default horizontal line.

This value sets the BSS_HDIP style.

Vert Dip

Creates a concave vertical line. This is the default vertical line.

This value sets the BSS_VDIP style.

Horz Bump

Creates a convex horizontal line. This value sets the BSS_HBUMP style.

Vert Bump

Creates a convex vertical line. This value sets the BSS_VBUMP style.


Shade Flags
Shade Flags (BWCCShade property)

The Shade Flags determine the shade control's behavior.

Caption Above

No Prefix

Control Color


Caption Above
Caption Above (BWCCShade property)

Displays the caption at the top of the control. This value sets the BSS_CAPTION style and only applies to Group and Raised Shade types.


No Prefix
No Prefix (BWCCShade property)

Forces an ampersand (&) to appear as a literal character, instead of underlining the next character in the text.

This value sets the BSS_NOPREFIX style.


Control Color
Control Color (BWCCShade property)

Sends the equivalent of a WM_CTLCOLOR message to its parent to set the color of the shade control's background and caption text. This is only available when the Shade Type is Group.

This value sets the BSS_CTLCOLOR style.


Caption Alignment
Caption Alignment (BWCCShade property)

The Caption Alignment property chooses the alignment of the control's caption.

Left

Left-justifies the caption. This value sets the BSS_LEFT style.

Centered

Centers the caption. This value sets the BSS_CENTER style.

Right

Right-justifies the caption. This value sets the BSS_RIGHT style.


BWCCStatic Property
BWCCStatic

See also

Use the BWCCStatic Property Page to customize Borland-style static text. You place a BWCC static text control with the BWCC Static Text tool.

BWCCStatic properties

Static Type

Static Flags


Static Type
Static Type (BWCCStatic property)

The Static Type property determines how static text is displayed.

Left

Displays text flush left within the control border. This is the default. If there are multiple lines of text, words that extend beyond the end of the line wrap to the next line.

This value sets the SS_LEFT style.

Left, No Wrap

Displays text flush left within the control border. If there are multiple lines of text, this option automatically disables word wrapping. You must end lines with a return character.

This value sets the SS_LEFTNOWORDWRAP style.

Centered

Centers text within the control border. If there are multiple lines of text, words that extend beyond the end of the line wrap to the next line.

This value sets the SS_CENTER style.

Right

Displays text flush right within the control border. If there are multiple lines of text, words that extend beyond the end of the line wrap to the next line.

This value sets the SS_RIGHT style.

Simple Text

Displays a single line of flush-left text. This value sets the SS_SIMPLE style.


Static Flags
Static Flags (BWCCStatic property)

The Static Flags control the static text behavior.

Border

No Prefix


Border
Border (BWCCStatic property)

Draws a border around the control. The border is a standard Windows border that uses the current color for the window frame. This value sets the WS_BORDER style.


No Prefix
No Prefix (BWCCStatic property)

Forces an ampersand (&) to appear as a literal character, instead of underlining the next character in the text. This value sets the SS_NOPREFIX style.


Animation Property
Animation

See also

Use the Animation Property Page to customize a Windows common Animation control. You place an Animation control with the Animation tool.

Animation properties

Animation Flags


Animation Flags
Animation Flags (Animation property)

The Animation Flags determine the animation control’s behavior.

Auto Play

Center

Transparent

Border


Auto Play
Auto Play (Animation property)

Automatically plays the clip specified in the Caption when the animation control is created and displayed.

This value sets the ACS_AUTOPLAY style.


Center
Center (Animation property)

Centers the image in the animation control's window.

This value sets the ACS_CENTER style.


Transparent
Transparent (Animation property)

Draws the animation using a transparent background. The default is to use the background color specified in the animation clip.

This value sets the ACS_TRANSPARENT style.


Border
Border (Animation property)

Draws a border around the control. The border is a standard Windows border that uses the current color for the window frame.

This value sets the WS_BORDER style.


TabControl Property
TabControl

See also

Use the TabControl Property Page to customize a common Windows tab control. You place a tab control with the TabControl tool.

TabControl properties

Sample Item Count

Type

Alignment

Focus Control

TabControl Flags


Sample Item Count
Sample Item Count (TabControl property)

The number of sample tab items to display at design time. This is a design aid only and is not saved in the resource script.


Tab Control Type
TabControl Type (TabControl property)

The TabControl Type property determines the type of tab used.

Tabs

Creates a tab that control whose tabs look like a notebook divider. This is the default.

This value sets the TCS_TABS style.

Buttons

Creates a tab control whose tabs look and work like buttons. This value sets the TCS_BUTTONS style.


Alignment
Alignment (TabControl property)

The Alignment property controls the appearance of the tab in the control.

Right Justified

Increases the width of each tab so that each row of tabs fills the entire width of the tab control. If this is on, the Multiline flag must also be set. This is the default.

This value sets the TCS_RIGHTJUSTIFY style.

Fixed Width

Specifies that all tab controls in the dialog are a fixed width.

This value sets the TCS_FIXEDWIDTH style.

Ragged Right

Does not stretch each row of tabs to fill the width of the dialog.

This value sets the TCS_RAGGEDRIGHT style.


Focus Control
Focus Control (TabControl property)

The Focus Control property determines how input focus is received.

Normal

Allows the tab control to receive focus. This is the default.

Never

Specifies that the tab control never receives input focus. This value sets the TCS_FOCUSNEVER style.

On Button Down

Forces the tab to received input focus when it is clicked. If this is on, the Buttons option (a TabControl Type option) must also be on.

This value sets the TCS_FOCUSBUTTONDOWN style.


Tab Control Flags
TabControl Flags (TabControl property)

The TabControl Flags control the tab control’s appearance.

Tool Tips

Multiline

Border

Force Icon Left

Force Label Left

Owner Draw


Tool Tips
Tool Tips (TabControl property)

Creates a tool tip control when the tab control is created. The tool tip is destroyed when the tab control is destroyed. If you use a tool tip control with a tab control, the parent window must process the TTN_NEEDTEXT message to provide a description of each tab.

This value sets the TCS_TOOLTIPS style.


Multiline
Multiline (TabControl property)

Creates a tab control that can contain multiple rows of tabs, so that all tabs are visible at once. The default is to create only a single row of tabs.

This value sets the TCS_MULTILINE style.


Border
Border (TabControl property)

Places a single, thin border around the dialog box. This value sets the WS_BORDER style.


Force Icon Left
Force Icon Left (TabControl property)

If the tab control displays an icon, the icon is left-justified. If this is on, the Fixed Width option (a TabControl Type option) must also be on.

This value sets the TCS_FORCEICONLEFT style.


Force Label Left
Force Label Left (TabControl property)

If the tab control displays a label, the label is left-justified. If this is on, the Fixed Width option (a TabControl Type option) must also be on.

This value sets the TCS_FORCELABELEFT style.


Owner Draw
Owner Draw (TabControl property)

Forces the parent window to draw the tab control.

This value sets the TCS_OWNERDRAW style.


TreeView Property
TreeView

See also

Use the TreeView Property Page to customize a common Windows tree view control. You place a tree view control with the TreeView tool.

TreeView page properties

Sample Item Count

TreeView Flags


Sample Item Count
Sample Item Count (TreeView property)

The number of outer level items you want in the control at design time. This is a design aid only and is not saved in the resource script.


TreeView Flags
TreeView Flags (TreeView property)

The TreeView Flags control the tree view window appearance.

Edit Labels

Has Lines

Border

Show Sel Always

Lines At Root

Has Buttons

Disable Drag Drop


Edit Labels
Edit Labels (TreeView property)

Lets a user edit the item labels in the tree view window.

This value sets the TVS_EDITLABELS style.


Has Lines
Has Lines (TreeView property)

Displays lines to show the hierarchy of items in the tree view. Lines link the parent and child items. Lines do not link items at the hierarchy's root.

This value sets the TVS_HASLINES style.


Border
Border (TreeView property)

Draws a border around the control. The border is a dark line.

This value sets the WS_BORDER style.


Lines At Root
Lines At Root (TreeView property)

Displays lines to link items at the hierarchy's root. If this option is on, the Has Lines flag must also be on.

This value sets the TVS_LINESATROOT style.


Has Buttons
Has Buttons (TreeView property)

Displays plus and minus icons next to parent items. This allows users to expand and collapse the parent item list of child items.

This value sets the TVS_HASBUTTONS style.


Disable Drag Drop
Disable DragDrop (TreeView property)

Disables dragging and dropping. The default is to allow a user to move items in the tree view.

This value sets the TVS_DISABLEDRAGDROP style.


Show Sel Always
Show Sel Always (TreeView property)

Keeps the selection highlighted even when the control loses focus.

This value sets the TVS_SHOWSELALWAYS style.


ListView Property
 ListView

See also

Use the ListView Property Page to customize a common Windows list view control. You place a list view control with the ListView tool.

ListView properties

Sample Item Count

Alignment

View Type

Sort Type

ListView Flags


Sample Item Count
Sample Item Count (ListView property)

The number of sample items you want in the list at design time. This is a design aid only and is not saved to the resource script.


View Type
View Type (ListView property)

The View Type property determines the current view of the list view window.

Icon

Creates a list view window that displays each item as a full-sized icon with a label below it. Items can be dragged and dropped.

This value sets the LVS_ICON style.

Small Icon

Creates a list view window that displays each item as a small icon with a label to the right. Items can be dragged and dropped.

This value sets the LVS_SMALLICON style.

List

Creates a list view window that displays each item as a small icon with a label to the right. Items are arranged in columns and cannot be moved.

This value sets the LVS_LIST style.

Report View

Creates the list view window that displays each item on its own line with additional information arranged in columns. The left column is always left-aligned and contains the small icon and label. Each column has a header by default. Choose the No Column Hdr flag to disable the column header.

This value sets the LVS_REPORT style.


Alignment
Alignment (ListView property)

The Alignment property specifies the alignment of items in the list view window. These flags only apply when the View Type is set to Icon or Small Icon.

Top

Aligns items at the top of the window.

This value sets the LVS_ALIGNTOP style.

Left

Aligns items on the left side of the window.

This value sets the LVS_ALIGNLEFT style.


Sort Type
Sort Type (ListView property)

The Sort Type property specifies how items in the list view are sorted.

Ascending

Sorts items in ascending order by label. This value sets the LVS_SORTASCENDING style.

Descending

Sorts items in descending order by label. This value sets the LVS_SORTDESCENDING style.

None

Does not sort items.


ListView Flags
List View Flags (ListView property)

The ListView Flags control the list view window appearance and behavior.

No Column Hdr

No Scroll

Edit Labels

Auto Arrange

Border

No Label Wrap

No Sort Hdr

Owner Draw

Share Image Lists

Show Sel Always

Single Selection


No Column Hdr
No Column Hdr (ListView property)

Disables the column header. This flag only applies when the View Type is set to Report.

This value sets the LVS_NOCOLUMNHEADER style.


No Scroll
No Scroll (ListView property)

Disables scrolling, so that the user cannot scroll the window to see more items.

This value sets the LVS_NOSCROLL style.


Edit Labels
Edit Labels (ListView property)

Lets the user edit the text labels in the list view. This value sets the LVS_EDITLABELS style.


Auto Arrange
Auto Arrange (ListView property)

Automatically arranges icons. This flag only applies when the View Type is set to Icon or Small Icon.

This value sets the LVS_AUTOARRANGE style.


Border
Border (ListView property)

Draws a border around the control. The border is a dark line.

This value sets the WS_BORDER style.


No Label Wrap
No Label Wrap (ListView property)

Displays text labels on a single line. This flag only applies when the View Type is set to Icon. (By default, text labels wrap in the Icon view.)

This value sets the LVS_NOLABELWRAP style.


No Sort Hdr
No Sort Hdr (ListView property)

Does not allow column headers to work like sorting buttons. This flag only applies when the View Type is set to Report.

This value sets the LVS_NOSORTHEADER style.


Owner Draw
Owner Draw (ListView property)

Forces the parent window to draw the list view window.

This value sets the LVS_OWNERDRAWFIXED style.


Share Image Lists
Share Image Lists (ListView property)

Does not destroy the image list when the control is destroyed. This enables the same image list to be used with more than one list view control.

This value sets the LVS_SHAREIMAGELISTS style.


Show Sel Always
Show Sel Always (ListView property)

Keeps the selection highlighted even when the control loses focus.

This value sets the LVS_SHOWSELALWAYS style.


Single Selection)
Single Selection (ListView property)

Allows the user to select only one item at a time. The default allows the user to select multiple items at a time.

This value sets the LVS_SINGLESEL style.


HotKey Property
HotKey

See also

Use the HotKey Property Page to customize a common Windows hot key control. You place a hot key control with the HotKey tool.

HotKey properties

Hot Key Flags


HotKey Flags
HotKey Flags (HotKey property)

The HotKey Flags control the hot key appearance.

Border


Border
Border (HotKey property)

Draws a border around the control. The border is a dark line.

This value sets the WS_BORDER style.


ProgressBar Property
ProgressBar

See also

Use the ProgressBar Property Page to customize a common Windows progress bar control. You place a progress bar control with the ProgressBar tool.

ProgressBar page properties

Border


Border
Border (ProgressBar property)

Draws a border around the control. This value sets the WS_BORDER style.


UpDown Property
UpDown

See also

Use the UpDown Property Page to customize a common Windows up-down control. You place an up-down control with the Up-Down tool.

UpDown properties

Orientation

Alignment

UpDown Flags


Orientation
Orientation (UpDown, TrackBar property)

The Orientation property determines the up-down control’s orientation.

Horizontal

Displays the control horizontally. For track bars, the slider goes back and forth.

For up-down controls, this value sets the UDS_HORZ style. For track bars, it sets the TBS_HORZ style.

Vertical

Displays the control vertically. This is the default orientation.

For track bars, the slider goes up and down.

For up-down controls, this value sets the UDS_HORZ style. For track bars, it sets the TBS_VERT style.


Alignment
Alignment (UpDown property)

The Alignment property determines how the up-down control is aligned.

Unattached

Leaves the up-down control separate from other controls.

Left

Places the up-down control to the left of its companion control (buddy window). The width of the companion control decreases by the width of the up-down control.

This value sets the UDS_ALIGNLEFT style.

Right

Places the up-down control to the right of its companion control (buddy window). The width of the companion control decreases by the width of the up-down control.

This value sets the UDS_ALIGNRIGHT style.


UpDown Flags
UpDown Flags (UpDown property)

The UpDown Flags control the up-down control’s appearance.

Auto Buddy

Wrap

Arrow Keys

Set Buddy Int

No Thousands


Auto Buddy
Auto Buddy (UpDown property)

Identifies the previously created control as the companion control (buddy window).

This value sets the UDS_AUTOBUDDY style.


Wrap
Wrap (UpDown property)

Makes the position “wrap,” so that it is incremented or decremented beyond the beginning or ending or the range.

This value sets the UDS_WRAP style.


Set Buddy Int
Set Buddy Int (UpDown property)

Sets the text of the buddy window when the up-down control position's value changes. The text is the position's value formatted as a decimal or hexadecimal string.

This value sets the UDS_SETBUDDYINT style.


No Thousands
No Thousands (UpDown property)

Does not allow a separator to be inserted between thousands (groups of three digits) in the companion control. The separator is inserted by default.

This value sets the UDS_NOTHOUSANDS style.


Arrow Keys
Arrow Keys (UpDown property)

Allows the use of the up and down arrow keys to increment or decrement the position.

This value sets the UDS_ARROWKEYS style.


TrackBar Property
TrackBar

See also

Use the TrackBar Property Page to customize a common Windows track bar control. You place a track bar control with the TrackBar tool.

TrackBar properties

Orientation

Location

TrackBar Flags


Location
Location (TrackBar property)

The Location property places a slider in the track bar.

Bottom/Right

Tick marks are placed on the bottom for horizontal track bars. They are placed on the right for vertical trackbars.

This value sets the TBS_BOTTOM and the TBS_RIGHT styles.

Top/Left

Tick marks are placed on the top for horizontal track bars. They are placed on the left for vertical trackbars.

This value sets the TBS_TOP and the TBS_LEFT styles.

Both

Places tick marks on both sides of the track bar pointer. This value sets the TBS_BOTH style.


TrackBar Flags
TrackBar Flags (TrackBar property)

The TrackBar Flags configure the track bar.

Auto Ticks

Border

Enable Sel Range

Fixed Length

No Thumb

No Ticks


Auto Ticks
Auto Ticks (TrackBar property)

Creates a track bar that has a tick mark for each increment in its range of values. Tick marks are automatically displayed when you set the range with TBM_SETRANGE.

This value sets the TBS_AUTOTICKS style.


Border
Border (TrackBar property)

Draws a border around the control. This value sets the WS_BORDER style.


Enable Sel Range
Enable Sel Range (TrackBar property)

Sets the range of the track bar. The tick marks at the staring and ending positions of a selection range are displayed as triangles and the selection range is highlighted.

This value sets the TBS_ENABLESELRANGE style.


Fixed Length
Fixed Length (TrackBar property)

Determines the length of the track bar. The length of the slider stays the same even if the selection range changes.

This value sets the TBS_FIXEDLENGTH style.


No Thumb
No Thumb (TrackBar property)

Removes the slider from the track bar. This value sets the TBS_NOTHUMB style.


No Ticks
No Ticks (TrackBar property)

Does not display the track bar ticks. This value sets the TBS_NOTICKS style.


Header Property
Header

See also

Use the Header Property Page to customize a common Windows header control. You place a header control with the Header tool.

Header properties

Sample Item Count

Header Flags


Sample Item Count
Sample Item Count (Header property)

The number of sample items you want in the control at design time. This is a design aid only and is not saved in the resource script.


Header Flags
Header Flags (Header property)

The Header Flags customize the header window.

Buttons

Hidden

Border


Buttons
Buttons (Header property)

Creates a header whose items act like push buttons. This is on by default.

This value sets the HDS_BUTTONS style.


Hidden
Hidden (Header property)

Initially hides the header control. This is useful when you want to first determine the header’s initial size and position.

This value sets the HDS_HIDDEN style.


Border
Border (Header property)

Draws a border around the control. This value sets the WS_BORDER style.


RichEdit Property
RichEdit

See also

Use the RichEdit Property Page to customize a common Windows rich text edit control. You place a rich text edit control with the Rich Edit tool.

RichEdit properties

Alignment

Scrolling

RichEdit Flags


Scrolling
Scrolling (RichEdit property)

The Scrolling property determines the control's appearance and scrolling behavior.

Horz Scroll

Places a horizontal scroll bar in the control. This value sets the WS_HSCROLL style.

Vert Scroll

Places a vertical scroll bar in the control. This value sets the WS_VSCROLL style.

Auto Horz

Automatically scrolls text to the right by 10 characters when the users types a character at the end of the line. When the user presses Enter, the text is scrolled back to position 0.

This value sets the ES_AUTOHSCROLL style.

Auto Vert

Automatically scrolls text vertically, if necessary, by one page when the user presses Enter on the last line of the page. Applies only to multi-line text.

This value sets the ES_AUTOVSCROLL style.


RichEdit Flags
RichEdit Flags (RichEdit property)

The RichEdit Flags determine the control's behavior.

Multiline

Disable No Scroll

No IME

Self IME

Save Selection

Border

Sunken

Vertical

No Hide Sel

Read Only

Want Return


Multiline
Multiline (RichEdit property)

Allows text to wrap to multiple lines if the string is too long to fit on a single line. When Multiline is off, text typed in the control can only contain a single line of text.

This value sets the ES_MULTILINE style.


Disable No Scroll
Disable No Scroll (RichEdit property)

Disables scroll bars instead of hiding them when they are not needed.

This value sets the ES_DISABLENOSCROLL style.


No IME
No IME (RichEdit property)

Disables the Input Method Editor (IME) operator. Available for Asian languages only.

This value sets the ES_NOIME style.


Self IME
Self IME (RichEdit property)

Directs the control to allow the application to handle all Input Method Editor (IME) operations. Available for Asian languages only.

This value sets the ES_SELFIME style.


Save Selection
Save Selection (RichEdit property)

Saves the selection when the control loses focus. This value sets the ES_SAVESEL style.


Border
Border (RichEdit property)

Draws a border around the control. This value sets the WS_BORDER style.


Sunken
Sunken (RichEdit property)

Displays the control with a sunken border, so it appears recessed into the dialog.

This value sets the ES_SUNKEN style.


Vertical
Vertical (RichEdit property)

Draws text and objects vertically. Available for Asian languages only.

This value sets the ES_VERTICAL style.


No Hide Sel
No Hide Sel (RichEdit property)

Inverts the selected text, even when the control does not have focus.

This value sets the ES_NOHIDESEL style.


Read Only
Read Only (RichEdit property)

Makes the control read only. This value sets the ES_READONLY style.


Want Return
Want Return (RichEdit property)

Windows inserts a return when the user presses Enter. This attribute applies to multi-line text only.

This value sets the ES_WANTRETURN style.


StatusWindow Property
StatusWindow

See also

Use the StatusWindow Property Page to customize a common status window control. You place a status bar control with the Status Window tool.

StatusWindow properties

Sample Item Count

Location

StatusWindow Flags


Sample Item Count
Sample Item Count (StatusWindow, ToolBar property)

The number of sample area you want in the control at design time. This is a design aid only and is not saved in the resource script.


Location
Location (StatusWindow, ToolBar property)

The Location property places the control in the dialog.

Bottom

Positions the control at the bottom of the parent window. Its width is the same as the parent's. This is the default.

This value sets the CCS_BOTTOM style.

Top

Positions the control at the top of the parent window. Its width is the same as the parent's.

This value sets the CCS_TOP style.

No Move Y

Allows the control to be resized and move itself horizontally in response to a WM_SIZE message. The control will not resize vertically.

This value sets the CCS_NOMOVEY style.

No Resize

The control uses the width and height specified in the request for creation or sizing. It can be placed anywhere in the parent window and can be resized.

This value sets the CCS_NORESIZE style.


StatusWindow Flags
StatusWindow Flags (StatusWindow property)

The StatusWindow Flags configure the status window.

Sizing Grip

Border

No Parent Align

No Divider


Sizing Grip
Sizing Grip (StatusWindow property)

Displays a sizing border, a rectangular area that the user can click and drag, at the right end of the status window.

This value sets the SBARS_SIZEGRIP style.


Border
Border (StatusWindow property)

Draws a border around the control. This value sets the WS_BORDER style.


No Divider
No Divider (StatusWindow property)

Does not draw a two-pixel highlight at the top of the control.

This value sets the SBARS_NODIVIDER style.


No Parent Align
No Parent Align (StatusWindow property)

Does not allow the control to automatically move to the top or bottom of the parent window when that window is resized. Instead, the control keeps its original position.

This value sets the CCS_NOPARENTALIGH style.


ToolBar Property
ToolBar

See also

Use the ToolBar Property Page to customize a common Windows tool bar control. You place a tool bar control with the Tool Bar tool.

ToolBar properties

Sample Item Count

Location

ToolBar Flags


ToolBar Flags
ToolBar Flags (ToolBar property)

The ToolBar Flags configure the tool bar.

Tool Tips

Adjustable

Border

Alt Drag

Wrappable

No Divider

No Parent Align


Tool Tips
Tool Tips (ToolBar property)

Supports tool tips for the tool bar. This value sets the TBSSTYLE_TOOLTIPS style.


Adjustable
Adjustable (ToolBar property)

Enables the tool bar's customization features, allowing the user to move a button's location in the tool bar and drag a button off the tool bar.

This value sets the CCS_ADJUSTABLE style.


Border
Border (ToolBar property)

Draws a border around the control. This value sets the WS_BORDER style.


Alt Drag
Alt Drag (ToolBar property)

Allows the user to drag a tool bar button while holding down the Alt key. The default is to use the Shift key when dragging the button. The Adjustable option must be on for this option to take effect.

This value sets the TBSSTYLE_ALTDRAG style.


Wrappable
Wrappable (ToolBar property)

Creates a tool bar that can wrap to the next line when all buttons cannot be displayed on the same line.

This value sets the TBSSTYLE_WRAPPABLE style.


No Divider
No Divider (ToolBar property)

Does not draw a two-pixel highlight at the top of the control.

This value sets the CCS_NODIVIDER style.


No Parent Align
No Parent Align (ToolBar property)

Does not allow the control to automatically move to the top or bottom of the parent window when that window is resized. Instead, the control keeps its original position.

This value sets the CCS_NOPARENTALIGN style.


Extended Property
Extended (standard push button, radio button, check box, and group box controls; common header, progress bar, status window and track bar controls)

See also

Use the Extended Property Page to determine the control's reading order and its behavior. These properties apply to 32-bit applications only.

Extended properties

Reading Order

Window Flags


Reading Order
Reading Order (Extended property)

The Reading Order property determines the side from which you begin reading text.

Left to Right

Displays the control text using left-to-right reading order. This value sets the WS_EX_LTRREADING style.

Right to Left

Displays the control text using right-to-left reading order. This is only available for the Arabic and Asian language versions of Windows.

This value sets the WS_EX_RTLREADING style.


Flags
Flags (Extended property)

The Flags control dialog box behavior and appearance.

Client Edge

Static Edge

Modal Frame

Transparent

Accept Files

No Parent Notify

Control Parent (Tab Control only)


Client Edge
Client Edge (Extended property)

Creates a three-dimensional frame that looks like it is sunken into the background. This value sets the WS_EX_CLIENTEDGE style.


Static Edge
Static Edge (Extended property)

Creates a control with a three-dimensional frame. Use it for items that do not accept user input. This value sets the WS_EX_STATICEDGE style.


Transparent
Transparent (Extended property)

Specifies that the control is transparent, so that any controls beneath this one are not obscured.

This value sets the WS_EX_TRANSPARENT style.


Accept Files
Accept Files (Extended property)

Specifies that the control accepts drag and drop files. This value sets the WS_EX_ACCEPTFILES style.


No Parent Notify
No Parent Notify (Extended property)

Prevents the control from sending the WM_PARENTNOTIFY message to its parent window when it is created, destroyed, or is mouse-clicked. This value sets the WS_EX_NOPARENTNOTIFY style.


Modal Frame
Modal Frame (Extended property)

Frames the control with a combination of the control frame and the caption styles. This option also lets users move the control. This is on by default.

This value sets the WS_EX_DLGMODALFRAME styles.


Control Parent
Control Parent (Extended property)

Allows the user to navigate among the tabs of a Tab Control with the Tab key. This value sets the WS_EX_CONTROLPARENT style.


Extended Property
Extended (standard line, static frame, static rectangle, and static picture controls; common animation and up down controls)

See also

Use the Extended Property Page to determine the control's behavior. These properties apply to 32-bit applications only.

Extended properties

Window Flags


Extended Property
Extended (standard edit, list box, and combo box controls; common tree view, list view, and rich edit controls)

See also

Use the Extended Property Page to determine the control's general alignment, reading order, scroll bar alignment, and behavior. These properties apply to 32-bit applications only.

Extended properties

General Alignment

Reading Order

ScrollBar Alignment

Window Flags


ScrollBar Alignment
Scroll Bar Alignment (Extended property)

The Scroll Bar Alignment property aligns the scroll bar.

Left

Places a vertical scroll bar to the left of the client area. This value sets the WS_EX_LEFTSCROLLBAR style.

Right

Places a vertical scroll bar to the right of the client area. This is the default. This value sets the WS_EX_RIGHTSCROLLBAR style.


General Alignment
General Alignment (Extended property)

The General Alignment property determines the default alignment behavior.

Left

Gives the control generic left-aligned properties. This is the default. This value sets the WS_EX_LEFT style.

Right

Gives the control generic right-aligned properties. Set this value when the Right to Left Reading Order property is set.

This value sets the WS_EX_RIGHT style.


Extended Property
Extended (common tab controls)

See also

Use the Extended Property Page to determine the control's general alignment, reading order, and behavior. These properties apply to 32-bit applications only.

Extended properties

General Alignment

Reading Order

Window Flags


Extended Property
Extended (common hot key and tool bar controls)

See also

Use the Extended Property Page to determine the control's general alignment, reading order, and behavior. These properties apply to 32-bit applications only.

Extended properties

General Alignment

Reading Order

Window Flags


OK

Accepts any changes and closes the Property Inspector or dialog box.


Cancel

Cancels any changes on the current page and closes the Property Inspector or dialog box.


Help

Displays Help for the Property Inspector or dialog box.


Using the Dialog editor (overview)
Using the Dialog editor

See also

You use the Dialog editor to create and edit dialog boxes. The Dialog editor displays:

The dialog you are designing

The Control palette that contains pages for standard Windows controls, Windows common controls, BWCC controls, Visual Database controls, and custom controls, including VBX controls

The Tool palette that contains tools such as alignment tools

The Property Inspector that lets you set properties for controls and dialog boxes


Using the Property Inspector (Dialog editor)

See also

You use the Property Inspector to view and set properties for controls and dialog boxes. The Property Inspector can be modal or modeless.

The Dialog editor uses a WYSIWYG method of displaying properties when it can. However, changes for any properties denoted with "Windows 95 applications only" will not take effect if you are running an operating system other than Windows 95 or Windows NT with the shell.

The modal Property Inspector

The modal Property Inspector only displays property pages. Changes you make in the modal Property Inspector do not take effect until you click the OK or Apply button, or select another property page tab. You can also cancel changes to the current page by clicking Cancel.

The modal Property Inspector lets you set properties for:

One control

A group of selected controls with properties in common

The dialog box

The modeless Property Inspector

The modeless Property Inspector displays different view of properties:

Property pages

The sorted property list box

The unsorted property list box

The generic, or summary, property page

Changes you make in the modeless Property Inspector take effect immediately. There are no buttons to click to apply or cancel changes.

The modeless Property Inspector lets you switch between properties for different controls or dialog boxes. To switch between objects, use the drop-down list at the top of the Inspector. The sorted list displays properties in sorted alphabetically; the unsorted list displays properties in the order they are displayed on the Property Page.

To set properties in the sorted or unsorted list,

1.	Click the property you want to change.

2.	Enter a value or choose it from the drop down list.

If an ellipse is displayed in the right column, click it to display a dialog box where you set multiple properties.

Note:	If a VBX control is among the selected controls, the Property Inspector is always modeless (changes take effect immediately) and is in list format only.


Displaying the Property Inspector (Dialog editor)

See also

To display the modal Property Inspector, do one of the following:

Right-click the control and choose Properties

Right-click in an empty area of the dialog box and choose Properties

Double-click the control you want to set properties for

Double-click in an empty area of the dialog box

Select multiple controls, right-click one of them, and choose Properties.

Select multiple controls and double-click one of them

To display the modeless Property Inspector:

Choose Dialog|Show|Property Inspector. Once the Property Inspector is displayed, right-click the Inspector to choose the view you want


Using the Menu editor

See also

You use the Menu editor to create and edit menus. It provides different views of the menu you are editing:

The Edit window shows the structure of the menu you are editing. It also has a test mode where you can view the menu as it will appear in your application.

The Property Inspector is where you customize the currently selected item in the menu.


Edit window (Menu editor)
Edit window

See also

The Edit window shows you the structure of the menu you are editing. It looks very similar to a real menu. You can modify item text, add or remove items, and move items. To change other properties of the menu, use the Property Inspector. You can also view the menu in Test Mode.

Test Mode

Test Mode allows you to view the menu as it will appear in your application. You can navigate the menu items as you would in your application.


Property Inspector (Menu editor)

See also

You use the Property Inspector to edit pop-up commands and menu items, assign ID values, and set attributes for your menus and menu items. The item you are editing is selected in the Edit window.

You can view the properties for items you add to menus by using the Menu|Show Property Inspector command. When Show Property Inspector is selected, the Property Inspector appears listing the properties for the selected item.

Here are the pages of the Property Inspector:

Page	Applies to:

General	Menu items

Accelerator	Accelerators

Extended	MENUEX menu items


General property (Menu editor)

See also

Use the General properties to specify the menu item type name, identifier, and state of the menu item.

Use the mouse, Tab, or Shift+Tab keys to position on the field you want.

General page properties

Item Type radio buttons

The Item Type radio buttons display the type of menu item you have selected. You can use these buttons to change the menu item type.

Text input box

The Text input box is where you specify the name of a menu item or pop-up menu.

ID input box

The ID input box is where you choose a unique identifier (ID) for the menu item.

Enable Style State list box

The Enable Style list box allows you to choose the menu item's initial state.

Break Style list box

The Break Style list box controls the format of menu commands.

Checked checkbox

The Checked checkbox specifies whether the menu item is initially checked or unchecked.

Help message input box

The Help message input box is where you specify the help text associated with the selected object.


Help message text input box
Help message input box

See also

The Help message input box is where you specify the help text that appears in the status line of the application window when the menu item is selected.

When you enter a string in this input box, it is added to the stringtable resource associated with the current menu resource. If the stringtable does not exist, Resource Workshop creates one.


 Text input box

See also

The Text input box is where you enter the menu name or command that appears in the menu bar or menu.

If you want the user to choose the command from the menu by typing one of the letters in the command, put an ampersand (&) immediately before that letter. Windows will display the command with that letter underlined. This is known as a keyboard mnemonic.

If you plan to link an accelerator to this command, you can add accelerator text to the menu.

Use the tab character (\t) to separate the menu title from the accelerator text. For example, Cut\tShift+Del means that the accelerator Shift+Del is assigned to the menu command Cut.

Use the right-align character (\a) to right-align accelerator text.

Note that pop-up commands do not have accelerator keys.


Item ID input box
 ID input box

See also

Resource Workshop automatically assigns a unique ID to each new menu item when the "Generate identifiers automatically" option is selected in Options|Environments|Resource Editors. You can accept this value, or you can enter a unique number or name into the ID input box. You do not need to enter this value for pop-up commands.

Accelerators are added using the Accelerator page of the Property Inspector.


Item Type radio buttons

See also

The Item Type radio button selects the item type you are creating. You can choose between a pop-up, an actual menu item, and a menu separator.

Pop-up

Select the Pop-up radio button if you want to change the selected item to a pop-up menu.

Menu Item

Select the Menuitem radio button if you want to change the selected item to a menu item.

Separator

Select the Separator radio button if you want to change the selected item to a menu separator.


Break Style list box

See also

The Break Style list box controls the format of menu commands in the menu bar and in pop-up menus.

No Break

Select No Break if you do not want a break before this menu item.

Menu Bar Break

Select Menu Bar Break if you want to start a new line in the menu bar, or a new column in a pop-up menu.

Menu Break

Select Menu Break to start a new line in the menu bar. In a pop-up menu, this option starts a new column and draws a vertical line to separate the columns.

Help Break

Select Help Break to move the menu item to the far right of the menu bar. Use this option only with top-level menu items in the menu bar.


Enable Style radio buttons
Enable Style list box

See also

The Enable Style list box is where you set the menu item's initial state.

Enabled

Select Enabled to enable the menu item or pop-up, so that it will work when the user chooses it.

Disabled

Select Disabled to disable the menu item. The user will not be able to distinguish between Enabled and Disabled items; they will look the same on the menu, but the user cannot choose a disabled menu item. Use the EnableMenuItem function to change the state of the menu item.

Grayed

Select Grayed to disable the menu item or pop-up and gray the displayed text. The shading lets the user know the menu item is not currently available. Use the EnableMenuItem function to change the state of the menu item.


Checked checkbox

See also

If the item will toggle on and off, turn the Checked check box on. This places a checkmark next to the item. A checkmark means that the command is on.

Checkmarks are only visible if the item is on a pop-up menu. They are not displayed on menu bars.

Use the CheckMenuItem function to change the state of the menu item.


Accelerator property
Accelerator

See also

Use the Accelerator property page to set accelerator key properties.

Use the mouse, Tab, or Shift+Tab keys to position on the field you want.

After choosing this command, press Record and the key you want assigned to the menu command, then press the Esc key, The key you pressed will be displayed in the Key input box of the Menu style dialog box displayed on the left side of the menu editor.

Accelerator page properties

Record pushbutton

Push Record to begin recording an accelerator key for the menu item. Alt, Ctrl, or Shift can be used as modifiers of the key. To finish recording, press Esc or click the mouse.

Key input box

The Key input box is where the keyboard shortcut (if any) you want assigned to this menu command is displayed. Push Record to record a keyboard shortcut.

Key Type radio buttons

The Key Type radio buttons are where you specify the type of key assignment. You can set it to be either an ASCII or virtual key.

Modifiers check boxes

The Modifiers check boxes are where you specify what additional keys are used for the key (if any) you assigned to this menu command.


Modifiers check boxes

See also

The Modifiers check boxes are where you specify the key modifier for the key (if any) you assigned to this menu command. You can choose any number of these options for a specific key.

Control check box

The Ctrl key and the assigned key have to be pressed at the same time.

Alt check box

The Alt key and the assigned key have to be pressed at the same time.

Shift check box

The Shift key and the assigned key have to be pressed at the same time.

Invert Menu Item check box

The Invert Menu Item check box indicates whether the menu that contains this item should be inverted when the key combination is pressed.


Extended property (Menu editor)
Extended

See also

Use the Extended property page to set properties for MENUEX-style menus. These options are not supported on 16-bit platforms.

Use the mouse, Tab, or Shift+Tab keys to position on the field you want.

Extended page properties

Default

The Default check box indicates the default menu item.

Highlight

The Highlight check box highlights the menu item.

Radio Checkmark

The Radio Checkmark displays a radio button next to a checked menu item.

Help ID list box

The Help ID list box is where you specify the help text ID that is associated with the selected object.


Default check box

The Default check box indicates the default menu item. The default menu item is displayed in bold. A menu can only have one default menu item.


Highlight check box

The Highlight check box highlights the menu item.


Default check box
Radio Checkmark

The Radio Checkmark displays a radio button like symbol next to a checked menu item.


Using command-line resource tools (overview)
Using command-line resource tools

See also

There are several Borland command-line resource tools:

Resource compiler

BRCC32.EXE is the Borland resource compiler. It compiles resource script files (.RC files) and produces the binary .RES file.

Resource linkers

RLINK.EXE and RLINK32.DLL are the Borland resource linkers that bind resources, in .RES file form, to an .EXE file, and mark the resulting .EXE file as a Windows executable. RLINK32.DLL is accessed through TLINK32.EXE. RLINK.EXE is for 16 bit resources only.

Resource shells

BRC32.EXE is a shell through which BRCC32 and RLINK or RLINK32 (through TLINK32) can be started in a single step.

Note:	BRC and BRCC are no longer compliers.These files are shells that call BRC32 or BRCC32 with 16-bit options. All resources are compiled with BRCC32. The command line options are supported for downward compatability.


Resource compiler (BRCC32)

See also	Examples

BRCC32 is the command-line version of the Resource Workshop resource compiler. It accepts a resource script file (.RC) as input and produces a resource object file (.RES) as output. BRCC32 is used for both 16-bit and 32-bit resources.

Syntax

BRCC32 [options] <filename>.RC

Command-line options

BRCC32 accepts these options:

Option	Description

@responsefile	Takes instructions from the specified command file.

-d<name>[=<string>]	Defines a preprocessor symbol.

-fo<filename>	Renames the output .RES file. (By default, BRCC32 creates the output .RES file with the same name as the input .RC file.)

-i<path>	Adds one or more directories (separated by semicolons) to the include search path.

-r	This switch is ignored. It is included for compatibility with other resource compilers.

-v	Prints progress messages (verbose).

-x	Deletes the current include path.

-? or -h	Displays help.

-16	Builds a 16-bit resource.

-32	Builds a 32-bit resource.

BRCC32 predefines common resource-related Windows constants such as WS_VISIBLE and BS_PUSHBUTTON. Also, two special compiler-related symbols are defined: RC_INVOKED and WORKSHOP_INVOKED. These symbols can be used in the source text in conjunction with conditional preprocessor statements to control compilation. For example, the following construct can greatly speed up compilation:

#ifndef WORKSHOP_INVOKED

#include "windows.h"

#endif

Downward compatability

The following syntax and options are supported for downward compatability:

Syntax

BRCC [options] <filename>.RC

Command-line options

BRCC accept these options:

Option	Description

-31	Builds Windows 3.1-compatible .RES files.

-w32	Builds Win32-compatible .RES files.


Resource compiler examples

See also

The following example adds two directories to the include path and produces a .RES file with the same name as the input .RC file.

brcc32 -i<dir1>;<dir2> <filename>.RC

This example produces an output .RES file with a name different from the input .RC file name:

brcc32 -fo<filename>.RES <filename>.RC

This example builds a 16-bit .RES file:

brcc32 -16 -fo<filename>.RES <filename>.RC


Resource linkers (RLINK and RLINK32)

See also	Examples

RLINK (and RLINK32) combines a .RES file with an .EXE file to produce a new Windows executable. RLINK accepts as input one or more object files (.RES) and a single Windows executable file. RLINK links the resources by fixing up string tables and message tables and then binding these linked resources to the executable. RLINK32 is called by TLINK32, and is used for 32-bit resources.

Syntax

rlink [options] <filename>.RES <filename>.EXE

Command-line options

RLINK accepts these options:

Option	Description

@<filename>	Takes instructions from the specified command file.

-d	Removes resources from the .EXE file (default if no .RES file is specified).

-fe<filename>	Renames the output .EXE file.

-fi<filename>	Specifies additional input files.

-k	Does not reorder segments for fastload. (This option only applies to 16-bit resources.)

-v	Prints progress messages (verbose listing).

-vx	Lists resources but does not bind to EXE file.

-? or -h	Displays help.

-Vd.d	Makes the .EXE file with Windows version provided (v3.1 is the default). Version options are listed in the following table.

Option	Bit	Resulting look

3.1	16	Gives white background with a non 3-D look for Windows 3.1x, Windows 32s, or WinNT 3.1

4.0	16	Gives gray 3-D look for Windows 95 and WinNT 3.51

3.1	32	Gives white background with a non 3-D look for Windows 32s or WinNT 3.1

4.0	32	Gives gray 3-D look for Windows 95 and WinNT 3.51


Resource linker examples

See also

The following example binds the resources in the .RES file into the .EXE file:

rlink <filename>.RES <filename>.EXE

This example links the resources in the two .RES files and binds them to the .EXE file:

rlink -fi<filename>.RES <filename>.RES <filename>.EXE

This example combines the program code in the input .EXE file with the resources in the input .RES file and produces an output .EXE file with a new name:

rlink -fe<filename>.EXE <filename>.RES <filename>.EXE

This example takes input from an .RLK command file. It then links the resources in three .RES files and binds them to the .EXE file:

rlink @<filename>.RLK

The command file (<filename>.RLK) contains:

-fi<filename>.RES

-fi<filename>.RES

<filename>.RES

<filename>.EXE


Resource shells (BRC32)
Resource shell (BRC32)

See also	Examples

The Borland resource compiler (BRC32) is a resource compiler shell. It invokes BRCC32 and RLINK or RLINK32, depending on the command-line syntax.

Syntax

brc32 [options] <filename>.RC [<filename>.EXE]

Command-line options

BRC32 accepts these options:

Switch	Description

-d<name>=string	Defines a symbol you can test with the #IFDEF preprocessor directive.

-fo<filename>	Renames the .RES file.

-fe<filename>	Renames the .EXE file.

-i<path>	Adds one or more directories (separated by semicolons) to the include search path.

-r	Creates a .RES file only. The compiled .RES file is not added to the .EXE.

-v	Prints progress messages (verbose listing).

-x	Directs the compiler to ignore the INCLUDE environment variable when it searches for include or resource files.

-16	Builds 16-bit .RES files.

-32	Builds 32-bit .RES files.

-Vd.d	Makes the .EXE file with Windows version provided (v3.1 is the default for 16-bit resources; -v4.0 is the default for 32-bit resources). Version options are listed in the following table.

Option	Bit	Resulting look

3.1	16	Gives white background with a non 3-D look for Windows 3.1x, Windows 32s, or WinNT 3.1

4.0	16	Gives gray 3-D look for Windows 95 and WinNT 3.51

3.1	32	Gives white background with a non 3-D look for Windows 32s or WinNT 3.1

4.0	32	Gives gray 3-D look for Windows 95 and WinNT 3.51

The following switches are invalid when the -r switch is specified:

-k	Disables the contiguous preload of segments and resources in the .EXE file. Segments are kept in the order in which they appear in the .DEF file. (This option only applies to 16-bit resources.)

-t	Creates an application that runs only in protected mode (Windows Standard or 386 Enhanced mode).

Downward compatability

The following sytax and options are supported for downward compatabliity

Syntax

brc [switches] <filename>.RC [<filename>.EXE]

Command-line options

BRC accept these options:

Option	Description

-31	Builds Windows 3.1-compatible .RES files.

-w32	Builds Win32-compatible .RES files.


Resource shell examples

See also

The following statement compiles the .RC file, creates a .RES file, and adds the .RES file to the executable file:

brc32 <filename>.RC [<filename>.EXE]

BRC32 automatically seeks an .EXE file with the same name as the .RC file. You need to specify the .EXE file only if its name is different from that of the .RC file.

The following statement creates a .RES file, but not an .EXE file. If you name an .EXE file in the command line, BRC ignores it:

brc32 -r <filename>.RC

The following statement adds an existing .RES file to an executable file. The .EXE file name is required only if it differs from the .RES file name:

brc32 <filename>.RES [<filename>.EXE]

This example uses BRC32 to build a 16-bit Windows 3.1 compatible .RES file:

brc32 -16 -v3.1 -fo<filename>.RES <filename>.RC


Glossary
Resource Workshop glossary

A

accelerator

ACCELERATOR (resource script)

Airbrush tool

Animation tool

B

background color

binary resource statement

bitmap

bitmapped resource

BWCC page (Dialog editor)

C

Check Box tool

Check Box tool (BWCC)

Colors palette

Combo Box tool

Common page (Dialog editor)

controls

cursor

D

#define statement

Data Access page (Dialog editor)

Data Aware page (Dialog editor)

device driver files

DIALOG (resource script)

dialog box

Dialog editor

dialog files

dialog units

directives

DLL file

E

Edit window

Ellipse tool

executable file

F

Filled Ellipse tool

Filled Rectangle tool

Filled Rounded Rectangle tool

foreground color

G

Graphics editor

grid

Group Box tool

Group Box tool (BWCC)

H

Hand tool

Header tool

Horizontal Line tool (BWCC)

Horizontal Scroll Bar tool

Hot Key tool

I

icon

Icon window

identifier files

identifiers

inverted area

K

keyboard accelerator mnemonic

L

Line tool

List Box tool

List View tool

M

menu

MENU (resource script)

menu mnemonic

Menu editor

multiple-line statement

O

octal values

P

Paintbrush tool

Paint Can tool

Pen tool

Pick Rectangle tool

pixel coordinates

Progress Bar tool

project

Push Button tool

Push Button tool (BWCC)

R

Radio Button tool

Radio Button tool (BWCC)

RCDATA

Rectangle tool

resource

resource editor

resource file

resource file type

resource ID

resource project file

Resource Project window

resource script

Rich Text tool

Rounded Rectangle tool

S

Scissors tool

Standard page (Dialog editor)

Static Frame tool

Static Line tool

Static Picture tool

Static Rectangle tool

Static Text tool

Static Text tool (BWCC)

Status Bar tool

string table

T

Tab Control tool

Text editor

Text Edit tool

Text tool

Tool Bar tool

Tool palette (Dialog editor)

Tools palette (Graphics editor)

Track Bar tool

transparent area

Tree View tool

U

Up-Down tool

user-defined resource

V

VBX page (Dialog editor)

Vertical Line tool (BWCC)

Vertical Scroll Bar tool

W

window pane

Z

Zoom tool


cursor: Small bitmaps -- 32*32 pixels in size -- that represent the position of the mouse on the screen. Windows programs use customized cursors to indicate what type of task the user is currently performing.


bitmap: A binary representation of a graphic image in a program. Each bit, or group of bits, in the bitmap represents one pixel of the image.


bitmapped resource: A bitmapped resource is any resource that is a graphic image, stored in binary format, and can be edited using the Graphics editor.

The types of bitmapped resources you can edit with Resource Workshop are bitmaps, cursors, and icons.


icon: Icons are small bitmapped images, 16 x 16, 32 x 16, 32 x 32, or 64 x 64 pixels in size. Windows programs typically use customized icons to represent minimized windows.


menu: Windows programs usually include a menu bar that lists the names of individual menus. A typical menu contains one or more menu items (commands). For example, most Windows programs have a File menu with commands for creating, opening, saving, or printing files.


string table: A string table contains text (like descriptions, prompts, and error messages) that is displayed as part of a Windows program. Because these text strings are Windows resources that are separate from the program (instead of strings embedded in the program), you or others can edit and translate messages displayed by a program without having to make any changes to the program's source code.


dialog box: A window (usually a popup window) that communicates information to the user and lets the user select choices, such as files to open, colors to display, text to search for, and so on.


accelerator: Keyboard combinations (or hot keys) that a user presses to perform a task in an application. For example, a Windows program can include the accelerator Shift+Ins for the Edit|Paste command, which the user presses to paste text or images from the Clipboard into a file the program has open. Accelerators typically appear in the menu to the right of the commands to which they're linked.


user-defined resource: A resource that you define. You first create the resource type, then add resources of this type to your project.


RCDATA: A resource script statement you use to include any type of data directly in the resource compiler file.


window pane: In the Graphics editor, the way you look at two different views of the image you're creating or editing.


Graphics editor: The editor you use to create or edit any bitmapped resource, including:

icons

cursors

bitmaps


Pick Rectangle tool: The Graphics editor tool you use to select a rectangular area of a graphical image for copying, moving, or deleting.


Scissors tool: The Graphics editor tool you use to select any shaped area of a graphical image.


grid: Lines that you can display on an image in the Graphics editor. Each square of the grid represents a single pixel.


Airbrush tool: The Graphics editor tool you use to paint free-form patterns on an image.


Filled Ellipse tool: The Graphics editor tool you use to paint an ellipse-shaped filled-in frame on an image.


 Filled Rectangle tool: The Graphics editor tool you use to paint a rectangular filled-in frame on an image.


Filled Rounded Rectangle tool: The Graphics editor tool you use to paint a filled-in frame, in the shape of a rounded rectangle, on an image.


Paintbrush tool: The Graphics editor tool you use to paint free-form patterns on an image.


Zoom tool: The Graphics editor tool you use to zoom an entire image or a part of it.


Eraser tool: The Graphics editor tool you use to erase an entire image or a part of it.


Pen tool: The Graphics editor tool you use to paint free-form lines and shapes on an image.


Paint Can tool: The Graphics editor tool you use to fill an area of your image with the currently selected color.


Line tool: The Graphics editor tool you use to paint straight lines on an image.


Text tool: The Graphics editor tool you use to add text to an image.


Ellipse tool: The Graphics editor tool you use to paint an ellipse-shaped empty frame in an image.


Rectangle tool: The Graphics editor tool you use to paint a rectangular empty frame in an image.


Rounded Rectangle tool: The Graphics editor tool you use to paint an empty frame, shaped like a rounded rectangle, in an image.


Colors palette: The Graphics editor palette you use to select the colors in your image. You can work with a Colors palette even if your image is black and white.


foreground color: The color in the foreground of your image. It's typically one of the colors you use to create the features of your resource.


background color: The color that appears to underlie your image. It's also the color that's left behind when you select an area and delete or move it.


resource script: A resource script (.RC) file is a text file that contains definitions of one or more resources. The file can contain resources defined in script form and references to files containing other resources.


Text editor: Any editor that generates an ASCII file. This editor is used to edit the resource script.


#define statement: A C program statement you use to assign symbolic definitions to constant values.


identifiers: The statements you use to assign symbolic definitions to constant values.


resource ID: A unique integer value that identifies a resource.


identifier files: Files in which you store your program's identifiers. These are .H, .RH, .PAS, or .INC files.


Resource Project window: The window you see when you open a new or existing resource project. If the resource project is new, the window is empty. For existing resource projects, the window displays:

a complete list of files in the project

types of resources contained in each file

identifiers associated with resources


executable or dynamic-link library file: An executable (.EXE) or dynamic-link library (DLL) file is the ultimate destination for all resources you define with Resource Workshop. Usually, you compile an .RC file into a .RES file, then use your compiler to bind the .RES file to the executable or DLL file.


transparent and inverted areas: Attributes assigned to a cursor or icon. At run time, a transparent area allows the desktop color behind the icon or cursor to show through. An inverted area reverses the desktop color.


Hand tool: The Graphics editor tool you use to move an image around. The Hand tool is not on the Tools Palette; you can change any tool into a hand by holding down the Ctrl key.


Icon window: The window that lists all icon images in the selected resource. Multiple images represent different color formats of the same icon, such as a 2-color and a 16-color format.


resource project file: A file that contains one or more resources, or refers to files containing resources, or both. Typically, this file is a resource compiler (.RC) file.


resource file: A file that contains one or more compiled resources. The file extension is .RES. Typically, you compile all resources for an application into a single .RES file and then bind the .RES file to the executable file.


resource file type: The type of file that contains your resources. You can create the following types of resource files:

Bitmap (.BMP)

Cursor (.CUR)

Dialog (.DLG)

Icon (.ICO)

Resource script (.RC)

Resource (.RES)


project: A collection of one or more resources. A project is stored in a file that contains one or more resources, or refers to files contains resources, or both. Typically, this file is a resource compiler (.RC) file.


resource: Data that define the visible portions of your Windows program. Resources provide a consistent user interface that makes it easy for users to switch from one Windows program to another.


Dialog editor: The editor you use to create dialog boxes and dialog box controls.


controls: The buttons, combo boxes, text, list boxes, and scroll bars on a dialog box. Controls let users interact with dialog box data.


Standard page: The Dialog editor palette you use to place standard Windows controls in your dialog box.


Common page: The Dialog editor palette you use to place common Windows controls in your dialog box.


BWCC page: The Dialog editor palette you use to place Borland-style controls in your dialog box.


Tool palette: The Dialog editor palette you use to select tools that align dialog box controls.


binary resource statement: A resource script statement that identifies a resource and the filename where it is contained.


multiple-line statement: Multiple resource script statements that specify the contents of a resource.


directives: Resource script statements that affect how the resource script file is compiled.


DIALOG: A multiple-line resource script statement that specifies a dialog window.


MENU: A multiple-line resource script statement that defines a menu resource and specifies which menu items appear on the menu.


ACCELERATOR: A multiple-line statement resource script statement that defines keyboard shortcuts for menu items and other program control actions.


Menu editor: The tool you use to create and customize menu commands and menu items.


Edit window: The Menu editor pane that shows you the outline of the menu in pseudo code.


octal values: Use 0o (a zero followed by the letter o) or just 0 (zero) as the leading characters for octal notation.


Resource editor: A Resource Workshop editor. Editors are provided for dialog boxes, menus, icons, bitmaps, and cursors.


dialog units: Dialog units represent the units used to specify a dialog window or dialog box control.

Horizontal dialog units are 1/4 the width of a character in the dialog's font. Vertical dialog units are 1/8 the height of a character in the dialog's font. They are calculated from the height and width of the dialog's font.


Static Frame tool: The Dialog editor tool you use to put a rectangular empty frame in your dialog box. The frame is the color of the current window frame.


Static Rectangle tool: The Dialog editor tool you use to put a rectangle in your dialog box that's the same color as the current window frame.


Check Box tool: The Dialog editor tool you use to put a rectangular button in your dialog box with text to the left or right.


Combo Box tool: The Dialog editor tool you use to put a box in your dialog box that's a combination of a list box and a static control or an edit text control.


Text Edit tool: The Dialog editor tool you use to put a rectangle in your dialog box. The user can enter text from the keyboard into this box.


Group Box tool: The Dialog editor tool you use to put a rectangular box around a group of controls in your dialog box. It is used to visually group controls together. You can include a caption in the upper left corner of the group box.


Horizontal Scroll Bar tool: The Dialog editor tool you use to put a horizontal rectangle in your dialog box with a direction arrow on each end.


List Box tool: The Dialog editor tool you use to put a rectangle in your dialog box. The rectangle usually includes a list of strings. It can also contain a visual representation of the list.


Push Button tool: The Dialog editor tool you use to put a rectangular button in your dialog box. The user "presses" the button to select an action. Push buttons always contain text, so you need to specify a caption for each one.


Radio Button tool: The Dialog editor tool you use to put a circular button in your dialog box with text to the left or right. When the button is turned on, a solid dot fills the circle. Radio buttons are used in groups to represent related but mutually exclusive options.


Static Text tool: The Dialog editor tool you use to put text in your dialog box.


Vertical Scroll Bar tool: The Dialog editor tool you use to put a vertical rectangle in your dialog box with a direction arrow on each end.


Check Box tool (BWCC): The Dialog editor tool you use to put a Borland-style check box in your dialog box. A Borland-style check box is raised and displays a check mark, rather than an "X."


Group Box tool (BWCC): The Dialog editor tool you use to put a Borland-style shaded rectangular box in your dialog box. The box groups other controls visually. It can appear recessed into the dialog box or raised above its surface.


Horizontal Line tool (BWCC): The Dialog editor tool you use to put a Borland-style horizontal dividing line in your dialog box. The line gives the impression of being etched into the surface of the dialog box.


Push Button tool (BWCC): The Dialog editor tool you use to put a Borland-style push button in your dialog box. A Borland-style is larger than most standard Windows push buttons and can contain symbols.


Radio Button tool (BWCC): The Dialog editor tool you use to put a Borland-style radio button in your dialog box. The radio button is diamond-shaped and appears raised from the surface of the dialog box.


Static Text tool (BWCC): The Dialog editor tool you use to put a fixed text string in your dialog box. You use the string principally for labeling parts of the dialog box.


Vertical Line tool (BWCC): The Dialog editor tool you use to put a Borland-style vertical dividing line in your dialog box. The line gives the impression of being etched into the surface of the dialog box.


device driver files: A Windows device driver (.DRV) file is a special form of a dynamic link library (.DLL) file. You can edit the resources in one of these files just as you can in any .DLL file.


dialog files: A dialog (.DLG) file is a resource script file that contains a description of one or more dialog boxes. There is no requirement that these resources be dialogs; they can be any resource found in an .RC file.


Pixel coordinates: Pixel coordinates are in horizontal (x) and vertical (y) units. The upper left pixel of the cursor image is x=0 and y=0. The lower right pixel for a 32 x 32 cursor is x=31 and y=31; for a 32 x 16 cursor its x=31 and y=16.


keyboard accelerator mnemonic: To specify a keyboard accelerator mnemonic, place an ampersand (&) before the letter which is to serve as the mnemonic.

This key is underlined by Windows when displayed, and the keyboard focus is assigned to the control when the user presses the mnemonic key with the Alt modifier key held down. To include an ampersand in the displayed text, use two ampersands (&&).


menu mnemonic: A menu mnemonic is used to activate the command using the keyboard.

Place the ampersand (&) character in front of the character in the item text which is to serve as the mnemonic. To include the & character in the actual item text, use &&. To include the single quote character in the item text, use two single quote characters.


Tools palette: The Graphics editor palette you use to select the Graphics editor tool you want to work with.


Static Line tool: The Dialog editor tool you use to put a line in your dialog box.


Static Picture tool: The Dialog editor tool you use to put a static picture in your dialog box.


VBX page: The Dialog editor palette you use to user-defined or third-party VBX conrtrols in your dialog box.


Data Access page: The Dialog editor palette you use to place the Visual Database Tools data access controls in your dialog box.


Data Aware page: The Dialog editor palette you use to place the Visual Database Tools data aware controls in your dialog box.


Animation tool: The Dialog editor tool you use to put an animation control in your dialog. An animation control is a window that displays an Audio Video Interleaved (AVI) clip, a series of bitmap frames. The clip is displayed without sound.


Tab Control tool: The Dialog editor tool you use to create a control that looks like a notebook divider at the top of the dialog. The tabs define multiple pages for the same area of a dialog box.


Tree View tool: The Dialog editor tool you use to put a window in your dialog that displays a group of items in a hierarchy. Plus and minus icons expand and collapse the hierarchy.


List View tool: The Dialog editor tool you use to put a window in your dialog that lists items in a group.


Hot Key tool: The Dialog editor tool you use to put an edit box in your dialog that lets a user enter a combination of keystrokes to be used as a short cut key.


Progress Bar tool: The Dialog editor tool you use to put a progress bar window in your dialog. A progress bar, using a range and current position, shows an operation's percentage of completion.


Up-Down tool: The Dialog editor tool you use to put a control in your dialog that consists of an up and down arrow. You usually use an up-down control in conjunction with a companion control to increment and decrement values in the companion control.


Track Bar tool: The Dialog editor tool you use to put a bar in your dialog box that allows a user to change a value within a set range.


Header tool: The Dialog editor tool you use to put a header item in a window, usually in a list view window.


Rich Text tool: The Dialog editor tool you use to put an input box into your dialog box. A user can enter and edit text in the box, assigning character and paragraph formatting attributes to the text, and can include embedded OLE objects.


Status Bar tool: The Dialog editor tool you use to put a horizontal window at the bottom of a dialog.


Tool Bar tool: The Dialog editor tool you use to put a bar containing one or more buttons. When a button is selected, it sends a command message to the parent window.


Bitmap, Cursor, and Icon menus (Graphics editor)

See also

The menu named for the current resource is displayed when you use the Graphics editor. If you are editing a bitmap, the Bitmap menu is displayed, and so on.

Use this menu to choose options for the Graphics editor. This menu is only displayed when you are working with a resource project.

Here are the common Graphic editor menu commands:

Align

Size

Pattern

Brush Shape

Airbrush Shape

Pen Style

Text Attributes

Editor Options

Size and Attributes

Zoom In

Zoom Out

Actual Size

Split | Horizontal

Split | Vertical

Show | Toolbox

Show | Palette

Other commands

Set Hot Spot	(Cursor menu)

Test Cursor	(Cursor menu)

Set Transparent Color	(Cursor and Icon menu)

Set Inverted Color	(Cursor and Icon menu)

Test Icon	(Icon menu)

New Image	(Cursor and Icon menu)

Edit Image	(Cursor and Icon menu)


Bitmap, Cursor, or Icon|Align
Align Selection dialog box (Bitmap, Cursor, and Icon | Align)

See also

The Bitmap, Cursor, and Icon|Align command displays the Align Selection dialog box. Use this dialog to align a selection in your image. This command is only available once you have selected an area of the image with the Pick Rectangle tool or the Scissors tool.

Dialog box options

Horizontal

The Horizontal radio buttons align the image horizontally.

Vertical

The Vertical radio buttons align the image vertically.

Before you align the image, you may want to zoom the image and display a grid on the zoomed image. Using a grid makes it easy to align the selected area. The grid represents screen pixel coordinates.


Vertical radio buttons

The Vertical radio buttons align the selected area vertically within the image. After you have changed the area's alignment, it will be in the same column of the grid as its current location; only its row alignment will change.

No Change

Does not change the selected area's vertical alignment. This is the default.

Top

Moves the selected area to the top of the image.

Center

Moves the selected area to the center of the image.

Bottom

Moves the selected area to the bottom of the image.


Horizontal radio buttons

The Horizontal radio buttons align the selected area horizontally within the image. After you have changed the area's horizontal alignment, it will be in the same row of the grid as its current location; only its column alignment will change.

No Change

Does not change the selected area's horizontal alignment. This is the default.

Left Side

Moves the selected area to the left side of the image.

Center

Moves the selected area to the center of the image.

Right Side

Moves the selected area to the right side of the image.


Bitmap, Cursor, or Icon|Size
Stretch Selection dialog box (Bitmap, Cursor, and Icon | Size)

See also

The Bitmap, Cursor, and Icon|Size command displays the Stretch Selection dialog box. Use this dialog to stretch a selected area in your image. This command is only available once you have selected part of the image with the Pick Rectangle tool or the Scissors tool.

Dialog box options

Old Position/Size

Displays the current position (Top, Left) and size (Width, Height) of the selected area.

New Position/Size

The New Position/Size input boxes are where you enter the new position and size of the selected area.

Before you resize the image, you may want to zoom the image and display a grid on the zoomed image. Using a grid makes it easy to resize the selected area.


New Position/Size input boxes

The New Position/Size input boxes are where you enter the new position and size of the selected area. The values represent pixel coordinates of the grid displayed on the zoomed image.

First position the image by entering pixel coordinates in the Left and Top input boxes. Then, size the image with the Width and Height input boxes.

To shrink your image, enter smaller values in the width and height fields than the original values. Areas left empty after shrinking the selected area are filled using the background color.

For example, a value of 10 in the Left input box places the selected area in column 10 (the 10th column from the left side of the image). A value of 5 in the Top input box positions the selected area in Row 5 (the 5th row down from the top of the image).


Left input box

In the Left input box, enter the number of the column in which you want to position the left side of the selected area. This value does not stretch the area, but simply places it in the new column.


Top input box

In the Top input box, enter the number of the row in which you want to position the top of the selected area. This value does not stretch the area, but simply places it in the new row.


Width input box

Enter the new value for the width of the selected area in the Width input box. This is the number of the column in which you want to place the right side of the area. By entering a value that is greater than the selected area's width, you can stretch the area. By entering a value that is less than the selected area's width, you can shrink the area. Areas left empty by shrinking are filled using the background color.


Height input box

Enter the new value for the height of the selected area in the Height input box. This is the number of the row where you want to place the bottom of the area. By entering a value that is greater than the selected area's height, you can stretch the area. By entering a value that is less than the selected area's width, you can shrink the area. Areas left empty by shrinking are filled using the background color.


Bitmap, Cursor, and Icon|Pattern
Set Pattern Type dialog box (Bitmap, Cursor, and Icon | Pattern)

See also

The Bitmap, Cursor, and Icon|Pattern command displays the Set Pattern Type dialog box, where you choose a pattern for all tools that paint a pattern on your image. The tools that paint a pattern are:

Airbrush

Filled Ellipse

Filled Rectangle

Filled Rounded Rectangle

Paintbrush

The current pattern is always shown on the Tool palette.

You can also display this dialog box with the Pattern tool on the Tool Palette.

To choose a pattern in the dialog box, click on the pattern you want, then click OK.

The next time you use a tool capable of filling with a pattern, Resource Workshop uses the pattern you specify. This pattern stays the same until you specify a new one.


Bitmap, Cursor, and Icon|Brush Shape
Set Brush Tip dialog box (Bitmap, Cursor, and Icon | Brush Shape)

See also

The Bitmap, Cursor, and Icon|Brush Shape command displays the Set Brush Tip dialog box, where you choose a shape for the Paintbrush tool. You can also display this dialog box with the Paint Brush Shape tool on the Tool palette.

The current shape is always displayed on the Tool palette.

To choose a new shape in the dialog box, click the shape you want, then click OK.

The next time you use the Paintbrush tool, Resource Workshop uses the shape you specify. This shape stays the same until you specify a new one.


Bitmap, Cursor, and Icon|Airbrush Shape
Set Brush Tip dialog box (Bitmap, Cursor, and Icon | Airbrush Shape)

See also

The Bitmap, Cursor, and Icon|Airbrush Shape command displays the Set Brush Tip dialog box, where you choose a shape for the Airbrush tool. You can also display this dialog box with the Airbrush Shape tool on the Tool palette.

The current shape is always displayed on the Tool palette.

To choose a new shape in the dialog box, click the shape you want and click OK.

The next time you use the Airbrush tool, Resource Workshop uses the shape you specify. This shape stays the same until you specify a new one.


Bitmap, Cursor, and Icon|Pen Style
Set Pen Style and Width dialog box (Bitmap, Cursor, and Icon | Pen Style)

See also

The Bitmap, Cursor, and Icon|Pen Style command display the Set Pen Style dialog box, where you choose the pen style for tools that draw a line. The tools that draw lines are:

Ellipse

Line

Pen

Arc

Rectangle

Rounded Rectangle

You can also click the Pen Style tool on the Tool palette to display this dialog box.

The current pen style is always displayed on the Tool palette

To choose a new style in the dialog box, click the style you want and click OK.

Notice the null choice for a pen style. You can use null when you want to paint filled-in frames that do not have a border.

The next time you use a tool that draws a line, Resource Workshop uses the style you specify. This style stays the same until you specify a new one.


Bitmap, Cursor, and Icon|Text Attributes
Font dialog box (Bitmap, Cursor, and Icon | Text Attributes)

See also

The Bitmap, Cursor and Icon|Text Attributes command displays the Font dialog box, where you set text attributes for text added to a bitmapped resource. As you make your selections in the dialog box, the Sample window displays the results.

Dialog box options

Font

Select a font from the drop down list. The list contains the fonts currently installed on your system. When you select a font, you must make sure that is available on the system where the resource will be used, otherwise another font will be substituted.

Font Style

Select an available font style from the list.The available styles vary depending on the font selected. Typically the choices are Regular, Bold, Italic, and Italic Bold.

Size

Select a size from the list, or type in a value.

Effects

Click the Strikeout or Underline checkboxes to select an effect. These effects can be combined.

Alignment

Choose Left, Center, or Right. Text alignment is based on where you click on the image after selecting the Text tool.


Bitmap, Cursor, and Icon|Editor Options
Set Graphics Editor Options dialog box (Bitmap, Cursor, and Icon | Editor Options)

See also

The Bitmap, Cursor, and Icon|Editor Options command displays the Set Graphics Editor Options dialog box, where you customize the Graphics editor.

Dialog box options

Draw On Both Images

The Draw On Both Images check box updates the image in both window panes.

Grid On Zoomed Windows

The Grid On Zoomed Windows check box displays a grid on a zoomed window.

Save With Default Device Colors

The Save With Default Device Colors check box saves the default Colors palette.


Draw On Both Images check box

Turn on the Draw On Both Images check box if you want the Graphics editor to update the image in both window panes as you draw.

If you turn this check box off, the Graphics editor updates the other image only after you finish drawing an element.

Turn this option off if you find that performance is sluggish while you are drawing.


Grid On Zoomed Windows check box

See Also

Turn on the Grid On Zoomed Windows check box if you want to display a grid on a zoomed image. The grid shows you how the image is painted on a pixel-by-pixel basis.

The grid makes it easy to use the Align and Size commands to align and size the selected area of the image.


Save With Default Device Colors check box

Turn the Save With Default Device Colors check box off if you want to save a custom Colors palette you have created. When this check box is on, any colors you have customized in the color palette will revert to the default color when you close the Graphics editor. This option applies only to a 256-color palette.


Bitmap, Cursor, and Icon | Size and Attributes

See also

Use the Bitmap, Cursor, and Icon |Size and Attributes command to display the Image Attributes dialog box, where you change a graphic's size and attributes.

For bitmaps, this is the Bitmap Image Attributes dialog box.

For cursors, this is the Cursor Image Attributes dialog box.

For icons, this is the Icon Image Attributes dialog box.


Bitmap Image Attributes dialog box
Bitmap Image Attributes dialog box (Bitmap | Attributes)

See also

Use the Bitmap Image Attributes dialog box to choose the bitmap's size, compression, color, and format.

Dialog box options

Size

The Size options control the bitmap's size.

Compression

The Compression option compresses the bitmap.

Colors

The Colors option determine the number of colors in the image.


Size options
Size

The Size options control the bitmap's size. The maximum size you can work with is limited by the amount of available memory on your computer. Even though you could type 9999 for the width or height of your image, the maximum size for graphics on your computer is probably far less.

Width in Pixels

The width of the total image. Enter the value in pixels.

Height in Pixels

The height of the total image. Enter the value in pixels.

Stretch Current Bitmap

Resizes your bitmap image. Turn this check box on if you want an image that is already drawn to stretch or shrink when you resize your graphic.


Compression options
Compression

The Compression options compress the bitmap. You may want to experiment with both compressed and non-compressed color images because if the original image is complex, the compressed image may take up more space than the uncompressed image.

None

Does not compress the bitmap. This is the default setting.

RLE4

Compresses a 16-color bitmap.

RLE8

Compresses a 256-color bitmap. RLE stands for "run length encoded."


Colors options
Colors

The Colors option determine the number of colors in the image.

2 Color

Creates a black and white image.

16 Color

Creates a 16-color image.

256 Color

Creates a 256-color image. This button is available only if your display hardware supports 256 colors. Your program must supply its own support for 256 colors.


Cursor Image Attributes dialog box
Cursor Image Attributes dialog box (Cursor | Attributes)

See also

Use the Cursor Image Attributes dialog box to choose the number of colors the current image will use.

Dialog box options

Colors

The number of colors in the image.

2 color

Creates a black and white image.

16 color

Creates a 16 color image.

256 color

Creates a 256 color image. This button is only available if your display hardware supports 256 colors. Your program must supply its own support for 256 colors.


Icon Image Attributes dialog box
Icon Image Attributes dialog box (Icon | Attributes)

See also

Use the Icon Image Attributes dialog box to choose the icon's color and size.

Dialog box options

Colors

The Colors options determine the number of colors in the image.

Size

The Size options choose the image size.


Colors option
Colors

The Colors options determine the number of colors in the image.

2 Color

Creates a black and white image.

16 Color

Creates a 16-color image.

256 Color

Creates a 256-color image. This button is available only if your display hardware supports 256 colors. Your program must supply its own support for 256 colors.


Size option
Size

The Size options choose the image size.

16 x 16

Creates the icon in a 16 x 16 pixel format.

32 x 32

Creates the icon in a 32 x 32 pixel format.

32 x 16

Creates the icon in a 48 x 48 pixel format.

64 x 64

Creates the icon in a 64 x 64 pixel format.

Custom Size

Lets you create a custom size for the icon. Enter the pixel format in the input boxes.

Normally, you create 16 x 16 and 32 x32 pixel images using 16 colors. Images that are 48x 48 pixel format look better using 256 colors.


Cursor or Icon|Set Transparent Color

See also

The Set Transparent Color command displays the Color dialog box, where you can change the color of the cursor or icon's transparent areas.


Cursor or Icon|Set Inverted Color

See also

The Set Inverted Color command displays the Color dialog box, where you can change the color of the cursor or icon's inverted areas.


Color dialog box

See also

Use the Color dialog box to change the foreground, background, transparent, and inverted colors. You can also use it to customize colors on the color palette.

When you use this dialog box to modify a 256 Color palette, you need to turn off the Save With Default Device Colors checkbox in the Graphics Editor Options dialog box. This change allows Resource Workshop to save your customized palette.

To change a color on the color palette, double-click the color you want to change.

Dialog box options

Color

The color box displays standard colors and hues. Select a color by clicking it. The Color|Solid, Hue, Saturation, and other values are automatically updated as you make your selection.

Luminescence slide bar

The Luminescence slide bar allows you to customize the setting selected in the Color box. As you move the slide bar, the values are automatically updated.

Color|Solid

This box displays the color you requested and the closest solid color it represents. The solid color is based on the Luminescence setting.

Hue, Sat (Saturation), Lum (Lumiescence), Red, Green, and Blue fields are used to enter new values for custom colors. Resource Workshop displays the closest matching color to the values you enter. The result is dependent on the limits of your graphic display device.


Cursor|Set Hot Spot
KSet Cursor Hot Spot (Cursor | Set Hot Spot)

See also

The Cursor|Set Hot Spot command displays the Set Cursor Hot Spot dialog, where you identify the cursor's active area. You enter the pixel coordinates of the cursor's hot spot (active area).

Dialog box options

Horizontal

The horizontal coordinate of the cursor's hot spot.

Vertical

The vertical coordinate of the cursor's hot spot.


Cursor | Test Cursor

See also

Use the Cursor|Test Cursor command to move your cursor around and see how it looks on different color backgrounds.

Here's how you test the cursor's hot spot,

1.	Use Cursor|Zoom In to zoom in on the cursor image.

2.	Display a grid on the zoomed image, by choosing Cursor|Editor Options.

3.	Select the Paint Can tool.

4.	Choose Cursor|Test Cursor.

5.	Move the hot spot to a particular pixel on the zoomed image and click the mouse. The test cursor disappears and is replaced by the Paint Can tool. If you correctly set the hot spot, the paint tool points to the same pixel your test cursor pointed to.


Icon | Test Icon

See also

Use the Icon|Test Icon command to move your icon around and test its transparent and inverted areas against various backgrounds.


Zoom In

See also

The Zoom In command zooms the entire image in the currently selected window. Resource Workshop increases magnification to the next level: 400%, 800%, or 1600%.

The Graphics editor uses the center of the image as a reference when zooming the entire image.


Zoom Out

See also

The Zoom Out command zooms out the entire image in the currently selected window. Resource Workshop decreases magnification to the next level: 800%, 400%, or 100%.

The Graphics editor uses the center of the image as a reference when zooming the entire image.


Actual Size

See also

The Actual Size command returns a zoomed image to its actual size.


Bitmap, Cursor, and Icon | Show Color Palette

See also

Use the Bitmap, Cursor, and Icon |Show Color Palette command to display the Color Palette. It displays by default but can be closed by closing that window.


Bitmap, Cursor, and Icon | Show Toolbox

See also

Use the Bitmap, Cursor, and Icon |Show Toolbox command to display the Toolbox. It displays by default but can be closed by closing that window.


Bitmap, Cursor, and Icon | Split Horizontal

See also

Use the Bitmap, Cursor, and Icon |Split Horizontal command to split the editor window horizontally. Use this command if you have resized one half of the window to use the entire screen.


Bitmap, Cursor, and Icon | Split Vertical

See also

Use the Bitmap, Cursor, and Icon |Split Vertical command to split the editor window vertically. Use this command if you have resized one half of the window to use the entire screen.


Images|New Image
Icon or Cursor | New Image

See also

Icon or Cursor|New Image displays the New Icon Image dialog box, or the New Cursor Image dialog box where you specify the size and color of a new icon image, or the colors of a new cursor image.


Images|Edit Image
Icon or Cursor | Edit Image

See also

The Icon or Cursor|Edit Image command puts you in the Graphics editor where you can edit the selected icon or cursor image.


Window panes

See also

The Graphics editor lets you look at two different views of the image you are creating or editing. You can split the window vertically to show the two views side-by-side, or you can split the window horizontally to show one view above the other.

To display a single image, move the line that divides the windows off the screen. To change the size of the window panes, move the line.

If you have dragged the line to create a single view, use Bitmap, Cursor, or Icon|Split|Horizontal or Split|Vertical to split it again.

One or both views can be zoomed.


Status line and bar

See also

The status line at the bottom of the Graphics editor displays the screen x- and y-coordinates. It also displays color information including the Red Green Blue values in the Palette index and whether the color is inverted or transparent.


Cursor resource project window

See also

The Cursor resource project window lists all of the current cursor images for the cursor resource you are creating.

If there is more than one cursor image in the selected resource, all the images are listed in the Cursor resource project window. Typically, multiple images represent different color formats of the same cursor, such as a 16-color and a 256-color format.

To select an image,

1.	Find the cursor image you want to edit.

2.	Double-click it, or select it and choose Images|Edit Image.

Resource Workshop displays the cursor in the Graphics editor.


Icon resource project window

See also

If there is more than one icon image in the selected resource, all the images are listed in the Icon resource project window. Typically, multiple images represent different color formats of the same icon, such as a 16-color and a 256-color format.

To select an image,

1.	Find the icon image you want to edit.

2.	Double-click it, or select it and choose Images|Edit Image.

Resource Workshop displays the icon in the Graphics editor.


Bitmap, Cursor, and Icon SpeedMenus

See also

The SpeedMenu is displayed when you right-click in the Graphics editor outside of the image you are working on.

This SpeedMenu is only displayed when you are working with a resource project.

Here are the common SpeedMenu commands:

Zoom In

Zoom Out

Actual Size

Split Horizontal

Split Vertical

Show Tool Palette

Show Color Palette


Resource menu (overview)
Resource menu

See also

You use the Resource menu to create, edit, save, and view resources; define a resource's memory options; and add, edit, and delete identifiers.

The Resource menu is only displayed when you are working with a resource project.

Here are the Resource menu commands:

New

Edit

Edit As Text

View

Save Resource As

Resource Attributes

Identifiers


Resource|New
New Resource dialog box (Resource | New)

See also

Use the Resource|New command to specify the type of resource to create. Resource|New displays the New Resource dialog box.

You can create a new resource with this command when you are in a .RC, .RES, bitmap, cursor, or icon project window; when you are editing a dialog, menu, bitmap, cursor, or icon; or when you are editing a resource as text. This command also displays on the SpeedMenu (as New) in the .RC or .RES project window when a resource type is selected.

Dialog box options

Resource Type

The Resource Type list displays the type of resource you can create.

New Type button

Displays the New Resource Type dialog box where you can create your own resource type.

Options

Displays the New Resource Options dialog box, where you choose creation options for the selected resource type.


Resource Type List

The Resource Type List displays the type of resource you can create.

Resource Type	Description

Accelerator	A key combination a user presses to perform a task in an application. It substitutes for a menu command. Use the Text editor to create accelerators.

Bitmap	A graphic image. Use the Graphics editor to create bitmaps.

Cursor	Bitmapped images 32 x 32 pixels in size that represent the mouse pointer's current location on the screen. Use the Graphics editor to create cursors.

Dialog	A dialog box. Use the Dialog editor to create dialog boxes.

DialogEx	A dialog box with Windows 95 extensions. Use the Dialog editor to create extended dialog boxes.

Icon	Small bitmapped images, 16 x 16, 32 x 32, 48 x 48, or 64 x 64 pixels in size. Use the Graphics editor to create icons.

Menu	A list of commands. Use the Menu editor to create menus.

MenuEx	A menu, with Windows 95 extensions. Use the Menu editor to create extended menus.

RCDATA	A multiple-line statement that lets you include any type of data directly in an .RC file. Use the Text editor to create RCDATA resources.

Stringtable	Error messages, prompts, or any other text strings your application needs to display. Use the Text editor to create string tables.

VersionInfo	A version stamper for Windows .EXE files. Use the Text editor to create VersionInfo resources.


New Resource Type dialog box

See also

Use the New Resource Type dialog box to create a new resource type. Display this dialog box with the New Type button on the New Resource dialog box.

Dialog box options

Resource Type Name

Enter the name of the new resource type in Resource Type Name.

Identifier Value

The Identifier Value is where you enter the value of the identifier.

Place Identifier In

The Place Identifier In list displays the files to which you can add identifiers.

Current Types

The Current Types List displays the currently defined resource types.


Resource Type Name

Enter the name of the new resource type in Resource Type Name box. The name must be unique. For example, if you are creating a resource to contain a large block of text, you could name your new resource type TEXT.


Identifier Value

Enter the identifier's value in the Identifier Value box. This value is the ID that Windows and your program will associate with this identifier type. If you use a resource ID, it must be greater than 255, because Windows reserves the values 1 through 255 for standard resources.


Place Identifier In list
Place Identifier In

The Place Identifier In list displays the files to which you can add identifiers.

When you create a new project, the first thing you should do is specify a file in which to store your identifiers. Store identifiers in one or more resource header (.RH) files that use #defines to assign values to identifier names. See Creating an Identifier File for more information.


Current Types

The Current Types List displays the currently defined resource types.


New Resource Options dialog box (overview)
New Resource Options dialog box

See also

Use the New Resource Options dialog box to choose options for a new resource. Display this dialog box with the Options button on the New Resource dialog box.

The contents of this dialog box vary depending on the resource you're creating. Choose one of the following topics for more information:

Resource Type	Dialog Box

Accelerator	New Resource Options

Bitmap	New Bitmap Resource Options

Cursor	New Cursor Resource Options

Dialog	New Dialog Resource Options

Icon	New Icon Resource Options

Menu	New Menu Resource Options

MenuEx	New Menu Resource Options

RCDATA	New Resource Options

Stringtable	New Resource Options

VersionInfo	New Resource Options


New Resource Options dialog box

See also

Use the New Resource Options dialog box to choose options for accelerator, RCDATA, stringtable, and VersionInfo resources. To display this dialog box, first choose the resource type in the New Resource dialog box. Then, click the Options button.

Dialog box options

Name

Name is where you enter the name of the new resource.

New Resource To Be Placed In

Choose the name of the resource file in which the new resource will be placed from the New Resource to be Placed in list.

New Identifiers To Be Placed In

Choose the name of the file in which new identifiers will be placed from the New Identifier to be Placed In list.


Name

The name of the new resource.

By default, the name is the name of the resource type and an identifying number. The number increments, based the number of already existing resources in the resource project.


New Resource To Be Placed In

The name of the resource file in which the new resource will be placed.

If your project contains more than one .RC file and you want to put the new resource in a file that is different from the one in the combo box, select the file name from the drop-down list.


New Identifiers To Be Placed In

The name of the file in which new identifiers will be placed.

If your project contains more than one .RC file and you want to put new identifiers in a file that is different from the one in the combo box, select the file name from the drop-down list.


New Bitmap Resource Options dialog box

See also

Use the New Bitmap Resource Options dialog box to choose options for a bitmap. To display this dialog box, first choose BITMAP in the New Resource dialog box. Then, click the Options button.

Dialog box options

Name

Name is where you enter the name of the new resource.

New Resource To Be Placed In

Choose the name of the resource file in which the new resource will be placed from the New Resource to be Placed in list.

New Identifiers To Be Placed In

Choose the name of the file in which new identifiers will be placed from the New Identifier to be Placed In list.

Format

The Format options choose how the image is formatted.

Colors

The Colors options determine the number of colors in the image.

Size

The Size options choose the image size.


Format options
Format

The Format options choose how the image is formatted.

Source

Creates an image resource in the resource script file. By default, this option is on. This option "embeds" the resource in the current project. The resource does not exist as a separate file and cannot be used in any other project.

If you leave this option unchecked, the image is stored in a separate file that is linked to the current project. Choose this option to share the resource across several projects.

File Name

The file name of the image file. Creates an image resource as an individual file separate from the resource script. This field is available only if you clear the Source Form option.

Browse

Displays an open dialog box where you can choose the name and location of the image file. This button is only available when the Source Form option is clear.


Colors options
Colors

The Colors options determine the number of colors in the image. This option is only available when you are creating a bitmap, cursor, or icon.

2

Displays the image in black and white.

16

Displays the image as a 16-color image.

256

Displays the image as a 256-color image. This button is available only if your display hardware supports 256 colors. Your program must supply its own support for 256 colors.


Size options
Size

The Size options choose the image size. The maximum size you can work with is limited by the amount of available memory on your computer. Even though you could enter 9999 for the width or height of your image, the maximum size for bitmaps on your computer is probably far less.

Width in Pixels

Enter the width, in pixels, of the bitmap image.

Height in Pixels

Enter the height, in pixels, of the bitmap image.


New Cursor Resource Options dialog box

See also

Use the New Cursor Resource Options dialog box to choose options for a cursor. To display this dialog box, first choose CURSOR in the New Resource dialog box. Then, click the Options button.

Dialog box options

Name

Name is where you enter the name of the new resource.

New Resource To Be Placed In

Choose the name of the resource file in which the new resource will be placed from the New Resource to be Placed in list.

New Identifiers To Be Placed In

Choose the name of the file in which new identifiers will be placed from the New Identifier to be Placed In list.

Format

The Format options choose how the image is formatted.

Colors

The Colors options determine the number of colors in the image.


New Icon Resource Options dialog box

See also

Use the New Icon Resource Options dialog box to choose options for an icon. To display this dialog box, first choose ICON in the New Resource dialog box. Then, click the Options button.

Dialog box options

Name

Name is where you enter the name of the new resource.

New Resource To Be Placed In

Choose the name of the resource file in which the new resource will be placed from the New Resource to be Placed in list.

New Identifiers To Be Placed In

Choose the name of the file in which new identifiers will be placed from the New Identifier to be Placed In list.

Format

The Format options choose how the image is formatted.

Colors

The Colors options determine the number of colors in the image.

Size

The Size options choose the icon's size.


Size options
Size

The Size options choose the icon's size.

16 x 16

Creates the icon in a 16 x 16 pixel format.

32 x 32

Creates the icon in a 32 x 32 pixel format.

48 x 48

Creates the icon in a 48 x 48 pixel format.

64 x 64

Creates the icon in a 64 x 64 pixel format.

Custom Size

Lets you create a custom size for the icon. Enter the pixel format in the input boxes.


New Menu Resource Options dialog box

See also

Use the New Menu Resource Options dialog box to choose options for a cursor and extended menu (MenuEx) resource. To display this dialog box, first choose MENU or MENUEX in the New Resource dialog box. Then, click the Options button.

Dialog box options

Name

Name is where you enter the name of the new resource.

New Resource To Be Placed In

Choose the name of the resource file in which the new resource will be placed from the New Resource to be Placed in list.

New Identifiers To Be Placed In

Choose the name of the file in which new identifiers will be placed from the New Identifier to be Placed In list.

Menubar Styles

The Menubar Styles options create default menu commands.

Popup Menu Styles

The Popup Styles options create default Popup menu commands.


Menubar Styles options
Menubar Styles

The Menubar Styles options create default menu commands.

Simple Menubar

Creates a menubar with one menu command, called PopUp. One menu item, MenuItem, is also created.

Full Application Menubar

Creates a menubar with a File menu, Edit menu, Window menu, and Help menu. Each command contains a full range of menu items.


Popup Menu Styles options
Popup Menu Styles

The Popup Styles options create default Popup menu commands.

Simple Popup Menu

Creates a popup menu with a single menu command.

Full Popup Menu

Creates a popup menu with seven menu command, including Cut, Copy, Paste, and View Property Sheet.


New Dialog Resource Options dialog box

See also

Use the New Dialog Resource Options dialog box to choose options for a dialog resource. To display this dialog box, first choose DIALOG in the New Resource dialog box. Then, click the Options button.

Dialog box options

Name

Name is where you enter the name of the new resource.

New Resource To Be Placed In

Choose the name of the resource file in which the new resource will be placed from the New Resource to be Placed in list.

New Identifiers To Be Placed In

Choose the name of the file in which new identifiers will be placed from the New Identifier to be Placed In list.

Dialog Box Styles

The Dialog Box Styles choose the default dialog box style.


Dialog Box Styles options
Dialog Box Styles

The Dialog Box Styles choose the default dialog box style. Choose the style you want.


Resource | Edit

See also

The Resource|Edit command brings up the selected resource in the appropriate editor, ready for editing.

You can edit a resource when you are:

In a .RC, .RES, bitmap, cursor, or icon project window

Editing a dialog, menu, bitmap, cursor, or icon

Editing a resource as text

This command is also displayed on the SpeedMenu in the .RC or .RES project window when a resource or identifier file is selected.


Resource | Edit As Text

See also

The Resource|Edit As Text command brings up the selected resource in the Text editor, where you edit the resource's source script.

You can edit a resource as text when you are:

In a .RC, .RES, bitmap, cursor, or icon project window

Editing a dialog, menu, bitmap, cursor, or icon

This command is also displayed on the SpeedMenu in the .RC or .RES project window when a resource or identifier file is selected.


Resource | View

See also

Resource|View shows you what the selected resource looks like. This is a display only mode - you cannot edit the resource.

To edit the resource, choose Resource|Edit or Resource|Edit As Text.

You can view a resource when you are:

In a .RC, .RES, bitmap, cursor, or icon project window

Editing a dialog, menu, bitmap, cursor, or icon

Editing a resource as text

This command is also displayed on the SpeedMenu in the .RC or .RES project window when a resource is selected.


Resource|Save Resource As
Save Resource As dialog box (Resource | Save Resource As)

See also

The Resource|Save Resource As command puts a resource in a separate file for use with other resource projects.

You can save a resource when you are:

In a .RC, .RES, bitmap, cursor, or icon project window

Editing a dialog, menu, bitmap, cursor, or icon

Editing a resource as text

This command is also displayed on the SpeedMenu in the .RC or .RES project window when a resource is selected.

Resource|Save Resource As displays the Save Resource As dialog box where you specify the file's new name and directory.

Dialog box options

File Name

The resource's new file name. If you enter a file extension that represents a standard resource file type, Resource Workshop assigns the proper type to the file. However, if you use a nonstandard extension, be sure to pick the correct file type from the File Type list before exiting the dialog box.

List Files Of Type

The type of file in which to save the resource. The available list depends on the currently selected resource type.

Directories

The list of directories on your computer.

Drives

The currently assigned drive letters for your system.

Read Only

Marks the resource file as read only.

Network

Displays the Windows Connect Network Drive dialog box.


Resource|Resource Attributes
Resource Attributes dialog box (Resource | Resource Attributes)

See also

The Resource|Resource Attributes displays the Resource Attributes dialog box. You use this dialog to define attributes for the selected resource.

You can set attributes when you are:

In a .RC or .RES project window

Editing a dialog, menu, bitmap, cursor, or icon

Editing a resource as text

This command is also displayed on the SpeedMenu in the .RC or .RES project window when a resource is selected.

Dialog box options

Resource Name and File

The name and file of the selected resource.

Identifier Value and File

The value and file of the resource's identifier, if one is assigned.

Memory Options

The Memory Options settings specify how a resource is loaded and managed in memory. The name of the selected resource is displayed at the top of the dialog box.

Language Options

The Language options assign a language to a selected resource and all others that sequentially follow it in the resource file (and any successive includes).


Resource Name and File

The name and file of the selected resource.

Name

The name of the selected resource.

File

The name of the file the resource is currently stored in. Use this field to move a resource to another file.


Identifier Value and File

The value and file of the resource's identifier, if one is assigned.

Identifier Value

The value of the resource identifier.

File

The name of the file the identifier is currently stored in. Use this field to move an identifier to another file.


Memory Options

The Memory Options settings specify how a resource is loaded and managed in memory. The name of the selected resource is displayed at the top of the dialog box.

Note:	If you set memory options for an icon resource, those options apply to all the images in the resource.

Load On Call

Loads the resource into memory only when it is needed. Choosing this option can reduce the amount of time required to load your program.

If you clear this option, you activate Preload, which means that Windows will load the resource into memory when it first loads the program. Preload a resource only if you know Windows needs it as soon as the application begins to execute.

Moveable

Lets Windows move the resource segment in memory. If you clear this option, the resource occupies a fixed location in memory.

Discardable

Lets Windows discard the resource segment from memory when it is no longer needed. Windows can load the resource into memory again when necessary.

If you clear this option, you activate Nondiscardable, which means that Windows will not be able to remove the resource from memory while the application is running. If the Pure option is checked, you can modify the resource from within your application.

Pure

Prevents the resource segment in memory from being modified. Usually, you leave this option on.


Language Options

The Language options assign a language to a selected resource and all others that sequentially follow it in the resource file (and any successive includes). When you target an application for 32-bit platforms, you can create multiple copies of a resource and use a different language for each resource. When the application brings up the resource, Win32 automatically chooses the resource that corresponds to the language the application is running in.

Language options are only available if you:

Create resources for 32-bit platforms

Load a 32-bit .RES, .DLL, or .EXE file that is in Win32 format

Major

Chooses the primary language for the resource. The default language is Neutral.

Minor

Chooses the sublanguage, or dialect. The default language is Neutral.

Characteristics

The resource's characteristics. The value appears with the resource in the compiled .RES file and can be used by tools that read and write resource-definition files. It is not stored in the executable file and has no significance to Windows. The default value is 0.

Version

The resource's version. The value appears with the resource in the compiled .RES file and can be used by tools that read and write resource-definition files. It is not stored in the executable file and has no significance to Windows. The default value is 0.


Resource|Identifiers
Identifiers dialog box (Resource | Identifiers)

See also

Use Resource|Identifiers to add, edit, delete, and display identifiers. This command displays the Identifiers dialog box, which you can leave open while you work. To add a new identifier, right-click and choose Create Identifier from the SpeedMenu.

You can display this dialog box when you are:

In a .RC or .RES project window

Editing a dialog, menu, bitmap, cursor, or icon

Editing a resource as text

Dialog box options

Files

The File list shows the files containing identifiers.

Name

The Name list displays the name of identifier(s) in the selected file(s).

Value

The Value list displays the value of identifier(s) in the selected file(s).

Usage

The Usage list displays where the selected identifier is used.


Files list
Files

Displays files containing identifiers. Select one or all files to display identifiers. The file called <predefined> displays the predefined #defines that are included with Windows.


Name list
Name

Displays the name of identifier(s) in the selected file(s). To change the name, double-click it to display the New/Change Identifier dialog box.


Value list
Value

Displays the value of identifier(s) in the selected file(s). To change the value, double-click it to display the New/Change Identifier dialog box.


Usage

Displays where the selected identifier is used. If the selected identifier is not associated with a resource, the Usage list displays (unused). Double-click to access the editor the resource is associated with.


New/Change Identifier dialog box
Edit/Create Identifier dialog box

See also

The Edit/Create Identifier dialog box is where you:

Add a new identifier

Change an identifier's name

Change an identifier's value

Change the file an identifier is placed in

Display this dialog box by:

Right-clicking and choosing Insert when the Identifiers dialog box is displayed

Double-clicking an entry in either the Name or Value columns in the Identifiers dialog box

Dialog box options

Name

The current identifier name. If empty, enter a name. To change the existing name, type over it.

Value

The value of the identifier. If empty, enter a value. To change the existing value, type over it.

File

The file in which the identifier is placed. If empty, enter a name. To change the existing name, choose another name from the list.


Compiler Error dialog box

See also

The Compiler Error dialog box shows the compile error and where it occurred.

Dialog box options

Error

The compiler's internal error number and text of the error.

File Name and Line Number

The name of the resource project file and the line number of the error.

Resource Script

The resource script statement that contains the error. Five lines of source script are displayed.


 Preprocessor Warning dialog box

See also

The resource you are about to edit contains comments, preprocessor directives, and/or multi-field macros. If you edit the resource and save changes, the comments, preprocessor directives, and/or multi-field macros will not be saved.

Choose OK to edit the resource or Cancel to cancel the edit. Choose Resource|View to load the resource into the appropriate editor in display-only mode.


Resource SpeedMenu (overview)
Resource SpeedMenu

See also

You use the Resource SpeedMenu to create, edit, save, and view resources; add resources to and remove resources from a project; customize the Resource Project window; and cut, copy, paste, delete, and duplicate resources.

The Resource SpeedMenu is only displayed when you are working with a resource project.

Here are the Resource SpeedMenu commands:

New

Edit

Edit As Text

Add To Project

Remove From Project

Save Resource As

Resource Attributes

Show

Preview

Cut

Copy

Paste

Delete

Duplicate


Add To Project command
Add To Project dialog box (Resource SpeedMenu | Add to Project)

See also

The Add To Project command adds a resource stored in an external file to the current project. This command brings up the Add to Project dialog box where you specify the file name.

This command is displayed on the SpeedMenu in the .RC or .RES project window when an identifier file, resource type, or resource is selected.

Note:	You cannot mix 16-bit and 32-bit files in a project. If you are working with a 32-bit project, you cannot add a 16-bit file to your project. To add existing 16-bit .RES or .EXE files to a 32-bit project, first save the 16-bit files as .RC files. You can then add the .RC files to your project, since .RC files are version independent.

Dialog box options

File Name

The name of the external file.

List Files of Type

The type of file to open.

Directories

The directories on your computer.

Drives

The currently assigned drive letters for your system.

Options

Displays the Add to Project Options dialog box where you identify options for adding the file to the project.


RCINCLUDE Will Be Placed In

Displays the file in which #include, RCINCLUDE, or resource statements will be placed. The statement type placed in the file depends on the file type you select. Usually, you will choose the current project file.

If your project contains more than one .RC file, and you want to put the reference elsewhere, scroll down the list to find the name of the file in which you want to place the reference.


Remove From Project command
Remove From Project

See also

The Remove From Project command removes the selected file or resource from the current project.

This command is displayed on the SpeedMenu in the .RC or .RES project window when an identifier file, resource type, or resource is selected.


Show command
Show

See also

The Show SpeedMenu command is displayed when you open a resource project or resource editor Use this command to determine how the Resource Project window displays information.

This command is displayed on the SpeedMenu in the .RC or .RES project window when an identifier file, resource type, or resource is selected.

Here are the Resource|Show SpeedMenu commands:

Identifiers

Resources

Items

Fields

Unused Types

List By Type

List By File


Show|By Type command
Show | List By Type

See also

The Show|List By Type SpeedMenu command groups resources according to type, such as icon, menu, and dialog. Choose this command to see all resources listed in the Resource Project window according to type instead of file name. This command does not indicate if resources are in an external file.

Resources that may be listed include:

Bitmaps

Menus

MENUEX (32-bit only)

Dialogs

DIALOGEX (32-bit only)

String tables

Fonts

Accelerators

RCDATA

Cursors

Icons

VERSIONINFO

DLGINIT

User-defined resources

After the list of resources, any identifiers in the project are listed if you have turned on the Show|Identifiers SpeedMenu command.


Show|By File command
Show | List By File

See also

Use the Show|List By File SpeedMenu command to group resources according to the file they are in. This command displays all resources and file names in the Resource Project window in the order in which they appear in the source file.

Resource Workshop indicates whether resources are saved in the project file or in an external file.


Show|Identifiers command
Show | Identifiers

See also

The Show|Identifiers SpeedMenu command displays any identifiers in the project. If you do not want to see the identifiers displayed in the Resource Project window, toggle this option.


Show|Resources command
Show | Resources

See also

The Show|Resources SpeedMenu command lists the individual names of resources. Turn this command off to see just file names in the Resource Project window without an explanation of the resource types contained in those files.


Show|Items command
Show | Items

See also

The Show|Items SpeedMenu command shows another level of detail in the Resource Project window. When this command is on, you can see items within individual resources (for example, POPUPs and MENUITEMs defined in a menu resource).


Show|Fields command
Show | Fields

See also

The Show|Fields SpeedMenu command shows another level of detail in the Resource Project window. When this command is on, you can see fields within individual resources (for example, the placement, caption, and style defined for a dialog resource).


Show|Unused Types command
Show | Unused Types

See also

The Show|Unused Types SpeedMenu command displays all possible types of resources in the Resource Project window, even if some of them are not included in the project.

Turn on Show|List By Type for this option to be useful.


Preview command
Preview

See also

The Preview SpeedMenu command controls how the Preview pane in the Resource Project window is displayed. This command is displayed on the SpeedMenu in the .RC or .RES project window when an identifier file, resource type, or resource is selected.

Here are the Preview SpeedMenu commands:

Command	Description

Vertical	Displays the list of the resources in the project above the Preview pane in the Resource Project window. Choose this command to turn on the preview feature if it has been deactivated by the Hide option.

Horizontal	Displays the list of the resources in the project side-by-side with the Preview pane in the Resource Project window.

Choose this command to turn on the preview feature if it has been deactivated by the Hide option.

Hide	Deactivates the display of the Preview pane in the Resource Project window that was previously turned on by the Vertical or Horizontal options.


Cut command (Resource SpeedMenu)
Cut

See also

Use the Cut SpeedMenu command to:

Move resource scripts from one file to another

Move resources from one file to another

This command is displayed on the SpeedMenu in the .RC or .RES project window when a resource is selected.


Copy command (Resource SpeedMenu)
Copy

See also

Use the Copy SpeedMenu command to:

Copy resource scripts in one file to another

Copy a resource in one file to another

This command is displayed on the SpeedMenu in the .RC or .RES project window when a resource is selected.


Paste command (Resource SpeedMenu)
Paste

See also

Use the Paste SpeedMenu command to:

Insert a resource script into another file

Insert a resource into another file

This command is displayed on the SpeedMenu in the .RC or .RES project window when a resource is selected.


Delete command (Resource SpeedMenu)
Delete

See also

Use the Delete SpeedMenu command to delete resource scripts or resources.

This command is displayed on the SpeedMenu in the .RC or .RES project window when a resource is selected.


Duplicate command
Duplicate Resource dialog box

See also

The Duplicate command displays the Duplicate Resource dialog box, where you duplicate resources. The new resource has the same name as the existing resource but a different number.

This command is displayed on the SpeedMenu in the .RC or .RES project window when a resource is selected.

New Resource To Be Placed In

Choose the name of the resource file in which the new resource will be placed from the New Resource to be Placed in list.

New Identifiers To Be Placed In

Choose the name of the file in which new identifiers will be placed from the New Identifier to be Placed In list.


Add To Project Options dialog box
Add To Project Options dialog

See also

Use the Add To Project Options dialog box to identify:

the file in which #include, RCINCLUDE, or resource statements will be placed

the file in which the identifier will be placed

the resource type of the new resource

Note:	Options for the identifier and new resource type are only displayed when necessary.

Dialog box options

RCINCLUDE Will Be Placed In

RCINCLUDE Will Be Placed In displays the file in which #include, RCINCLUDE, or resource statements will be placed. If you are adding a RES file, this option will place all the resources from the RES file in the file you select.

Place Identifier for New Resource In

The Place Identifier For New Resource In list displays the files to which you can add identifiers.

Resource Type of New Resource

The Resource Type of New Resource list displays the type of resource you can create.

New Type button

Displays the New Resource Type dialog box where you can create your own resource type.


Compile SpeedMenu (overview)
Compile SpeedMenu

The Compile menu is displayed when you edit a resource's source script with the Text editor.

The Compile SpeedMenu command is Compile. It is only displayed when you are working with a resource project.


Compile command
Compile (Alt+F9)

See also

Use the Compile|Compile command to compile the resource script of your resource when you edit it.

If there is a compilation error, Resource Workshop displays an error message. Read the error message and click OK when you are done. Resource Workshop puts you in the IDE Text editor so you can fix the error.


Dialog menu (overview)
Dialog menu

See also

The Dialog menu lets you choose options and commands for the Dialog editor.

The Dialog menu is only displayed when you are working with a resource project.

Here are the Dialog menu commands:

Insert New Control

Test Dialog

Set Creation Order

Set Tabstops

Set Group Flags

Snap to Grid

Grid Spacing

Size

Duplicate

Align

Space

Show


Dialog|Insert New command
New Control dialog box (Dialog | Insert New Control)

See also

The Dialog|Insert New command displays the New Control dialog box, where you choose the name of the control you want to place. Standard controls, common controls, Borland controls, custom controls (including VBX controls), and Visual Database controls are listed.

You can also use the Control palette to insert new controls in a dialog box.


Dialog|Test Dialog command
Dialog | Test Dialog

See also

Use Dialog|Test Dialog to test how the controls in your dialog box operate. You can test:

How the Tab and arrow keys move you around

What happens when you press Esc or Enter

How text scrolls in an edit text control.

How accelerator keys work

Choose Dialog|Test Dialog again to leave test mode.


Dialog|Set Tabstops command
Dialog | Set Tabstops

See also

The Dialog|Set Tabstops command invokes a special mode in which you can set or clear tab stops. If a control is a tab stop, a user can press Tab to move to that control.

When you choose Dialog|Set Tabstops, the grid disappears and the controls are displayed with their captions. Resource Workshop surrounds any controls currently set as tab stops with a blue box. To set the Tab Stop attribute for a control, click inside the control.

When you finish setting tab stops, press Enter again to return to edit mode. To cancel the operation, press Esc. You can also right-click and choose End Mode to exit and save changes, or Cancel Mode to exit without saving changes.


Dialog|Set Creation Order command
Dialog | Set Creation Order

See also

The Dialog|Set Creation Order command specifies the order of controls in your dialog box. This determines the order in which the user moves from control to control when pressing Tab or the arrow keys. It also determines the order in which to display controls that overlap each other.

When you choose Dialog|Set Creation Order, the grid disappears and a special mode is invoked. Click the items you want to assign order numbers to, beginning with 1. The Dialog editor surrounds controls you have picked with a blue box. If you click a second time in a control, it reverts back to its old order number.

When you finish assigning new order numbers, press Enter to return to design mode. To cancel the operation, press Esc. You can also right-click and choose End Mode to exit and save changes, or Cancel Mode to exit without saving changes. If you select all controls, you are automatically returned to design mode and all changes are saved.


Dialog|Set Group Flags command
Dialog | Set Group Flags

See also

The Dialog|Set Group Flags command invokes a special mode that allows you to define groups of controls in which users can move using the arrow keys. You usually assign the first control in the group to a tab stop with the Dialog|Set Tabstops command.

When you finish identifying the first member in each group, press Enter to return to design mode. To cancel the operation, press Esc. You can also right-click and choose End Mode to exit and save changes, or Cancel Mode to exit without saving changes.


Dialog|Snap to Grid command
Dialog | Snap to Grid

See also

Toggle Dialog|Snap To Grip to snap controls to the alignment grid as they are inserted, moved, or resized. To display the grid, choose Dialog|Show|Grid or choose Grid from the SpeedMenu.


Dialog|Grid Spacing command
Grid Spacing dialog box (Dialog | Grid Spacing)

See also

The Grid Spacing dialog box adjusts the spacing of cells in the grid.

To display this dialog box, use the Dialog|Grid Spacing command.

Dialog box options

Width

The Width input box specifies the width of each cell in the grid.

Height

The Height input box specifies the height of each cell in the grid.


Size Controls dialog box (Dialog|Size command)
Size Controls dialog box (Dialog | Size)

See also

The Size Controls dialog box lets you resize controls. To display this dialog box, use the Dialog|Size command. Enter values as dialog units.

Dialog box options

Width

The Width options set the width of the selected control(s). Most options do not affect the Width settings unless two or more controls are selected.

Height

The Height options set the height of the selected control(s). Most options are effective only if you select two or more controls first.


Width options
Width

The Width options set the width of the selected control(s). Most options do not affect the Width settings unless two or more controls are selected.

No Change

Does not change the width of the controls.

Shrink to Smallest

Reduces the width of controls to match the width of the smallest control in the selected group.

Grow to Largest

Increases the width of controls to match the width of the largest control in the selected group.

Width

Sets the control's width.


Height options
Height

The Height options set the height of the selected control(s). Most options are effective only if you select two or more controls first.

No Change

Does not change the vertical size of the control(s).

Shrink to Smallest

Reduces the height of controls to match the height of the smallest control in the selected group.

Grow to Largest

Increases the height of controls to match the height of the largest control in the selected group.

Height

Sets the control's height.


Dialog|Duplicate and Duplicate SpeedMenu commands
Duplicate Control dialog box (Dialog | Duplicate)

See also

The Duplicate Control dialog box lets you duplicate the currently selected control. You can:

Create another control that is evenly spaced from the original control

Create multiple copies of a control that are in evenly spaced rows and columns

The duplicated control is placed to the right of and below the original control. As long as the control and its duplicates are selected, you can use the mouse or arrow keys to move the copied controls anywhere in the dialog. You can also place multiple copies of a control in rows and columns.

To display this dialog box, choose Dialog|Duplicate or Duplicate from the SpeedMenu. This command is only available when one control is selected.

Dialog box options

Rows

Spacing

Columns

Spacing


Rows option
Rows

The number of rows of controls you want to duplicate.


Columns option
Columns

The number of columns of controls you want to duplicate.


Row Spacing option
Spacing

The spacing between rows. Units are in dialog units. The recommended value is 6.


Column Spacing option
Spacing

The spacing between columns. Units are in dialog units. The recommended value is 8.


Dialog|Align command
Dialog | Align

See also

The Dialog|Align command displays another menu of commands you use to align controls. Choose one of the menu commands below for more information:

Controls

Array


Dialog|Align|Controls
Alignment dialog box (Dialog | Align | Controls)

See also

The Alignment dialog box lets you align the selected controls. Display this dialog box with Dialog|Align|Controls or Align from the SpeedMenu.

You can also use the Tool palette to align controls.

Dialog box options

Horizontal

The Horizontal options move the selected controls horizontally. Most options are effective only if you select two or more controls first.

Vertical

The Vertical options to move the selected controls vertically. Most options are effective only if you select two or more controls first.


Horizontal options
Horizontal

The Horizontal >main options move the selected controls horizontally. Most options are effective only if you select two or more controls first.

No Change

Does not move controls horizontally.

Left Sides

Aligns controls so their left sides are on the left of the rectangle formed by the external edges of the selected controls.

Centers

Aligns controls so their horizontal centers are in the center of the rectangle formed by the external edges of the selected controls.

Right Sides

Aligns controls so their right sides are on the right of the rectangle formed by the external edges of the selected controls.

Space Equally

Moves controls horizontally so they are spaced evenly within the rectangle formed by the external edges of the selected controls.

Center in Window

Moves the rectangle formed by the external edges of the selected controls to the horizontal center of the dialog box. The relative positions of the individual controls within the selection frame are unchanged.


Vertical options
Vertical

The Vertical options to move the selected controls vertically. Most options are effective only if you select two or more controls first.

No Change

Does not move the controls vertically.

Tops

Aligns the controls so their tops are at the top of the rectangle formed by the external edges of the selected controls.

Centers

Aligns the controls so their vertical centers are at the center of the rectangle formed by the external edges of the selected controls.

Bottoms

Aligns controls so their bottoms are at the bottom of the rectangle formed by the external edges of the selected controls.

Space Equally

Moves controls vertically so they are spaced evenly within the rectangle formed by the external edges of the selected controls.

Center in Window

Moves the rectangle formed by the external edges of the selected controls to the horizontal center of the dialog box. The relative positions of the individual controls within the selection frame are unchanged.


Dialog|Align|Array
Arrange Controls into an Array dialog box (Dialog | Align | Array)

See also

The Arrange Controls into an Array dialog box lets you align two or more selected controls into an array. This command also orders each control from left to right or top to bottom.

You display this dialog box with Dialog|Align|Array or Array on the SpeedMenu. These two commands are only available if you select two or more controls.

Dialog box options

Array Layout

The Array Layout options are where you arrange a group of controls.

Order

The Order radio buttons order the controls in the group.


Array Layout options
Array Layout

The Array Layout options are where you arrange a group of controls.

If a single row is specified, the related controls are top aligned and equally spaced in a row defined by the current selection rectangle.

If a single column is specified, the selected controls are left aligned and equally spaced in a column defined by the current selection rectangle.

If multiple rows and columns are specified, the controls are aligned into rows and columns and equally spaced within each.

Rows

The number of rows in which you want to arrange the controls.

Columns

The number of columns in which you want to arrange the controls.


Order options
Order

The Order radio buttons order the controls in the group.

Left to Right

Orders the controls from left to right.

Top to Bottom

Orders the controls from top to bottom.


Dialog|Space command
Dialog | Space

See also

Dialog|Space displays a menu of commands used for spacing controls. This command is available only if you select two or more controls.

Here are the Dialog|Space commands:

Menu command	Description

Horizontally Equal	Places the selected controls horizontally equidistant

Vertically Equal	Places the selected controls vertically equidistant


Dialog|Show command
Dialog | Show

See also

Dialog|Show displays a menu of commands used for hiding or showing components of the Dialog Editor. The following Dialog|Show commands are available:

Menu command	Description

Control Palette	Toggles the display of the Control Palette

Tool Palette	Toggles the display of the Tool Palette.

Property Inspector	Toggles the display of the modeless Property Inspector. In the modeless Property Inspector, changes take effect immediately.

Grid	Toggles display of the grid.


Dialog SpeedMenu (overview)
Dialog SpeedMenu

See also

The Dialog SpeedMenu lets you choose options for the dialog box you are creating and for its controls. To display a SpeedMenu, right-click an area. The SpeedMenu displayed depends on the area you right-clicked. The available SpeedMenu commands are described below.

The Dialog SpeedMenu is only displayed when you are working with a resource project.

When you right-click in an empty area of the dialog box, the following menu items are displayed:

Select All

Set Creation Order

Set Tabstops

Set Group Flags

Paste

Properties

When you choose one or more controls, these additional menu items are displayed:

Align to Grid

Bring to Front

Send to Back

Align

Size

Duplicate

Array

Cut

Copy

Delete

When you right-click outside the dialog box, the following menu items are displayed:

Control Palette

Tool Palette

Property Inspector

Grid

When you right-click the modeless Property Inspector, the following menu items are displayed:

Sorted List

Unsorted List

Property Pages

Generic Page

When you right-click while working inside a Dialog editor special mode (creation order, tabstops, or group flags), the following menu items are displayed:

End Mode

Cancel Mode


Select All command (Dialog SpeedMenu)
Select All

See also

Use the Select All command to select all controls in the dialog box. If there are no controls in the dialog, this option is disabled. Once all controls are selected, you can set the common properties, align and size the controls, or delete them.


Cut command (Dialog SpeedMenu)
Cut

See also

The Cut command places the selected control(s) into the Windows Clipboard and removes it from the dialog. You can then choose the Paste command to paste the control(s) somewhere else in the same dialog or in another dialog.


Copy command (Dialog SpeedMenu)
Copy

See also

The Copy command copies the selected control(s) to the Windows Clipboard. To paste the copied control(s) somewhere else in the same dialog or in another dialog, choose the Paste command.


Paste command (Dialog SpeedMenu)
Paste

See also

The Paste command inserts the previously cut or copied control(s) from the Clipboard onto the dialog. This command is active only if you have previously cut or copied a control to the Clipboard.


Delete command (Dialog SpeedMenu)
Delete

See also

Delete deletes the selected control or group of controls. You can reverse the deletion with Edit|Undo. This command does not effect the contents of the Clipboard.


Align to Grid command (Dialog SpeedMenu)
Align to Grid

See also

Align to Grid snaps the selected control(s) to the placement grid. To display the grid, choose Dialog|Show|Grid or Grid from the SpeedMenu. (The Grid command is available when you right-click outside the dialog box.)


Bring to Front command (Dialog SpeedMenu)
Bring to Front

See also

Bring to Front moves the selected control(s) to the top of other controls.


Send to Back command (Dialog SpeedMenu)
Send to Back

See also

Send to Back moves the selected control(s) to the bottom of other controls.


Properties command (Dialog SpeedMenu)
Properties

See also

The Properties command displays the modal Property Inspector which you use to view and edit properties of the currently selected control or dialog box.

The Property Inspector pages displayed depend on the current selection. If a single control is selected, that control’s entire properties are available. If multiple controls are selected, only those properties that are common to all selected controls are displayed. If the dialog box is selected, all dialog property pages are displayed.

The modal Property Inspector does not apply any changes on the current page until you do one of three actions:

Press Apply to accept changes without closing the Property Inspector

Press OK to accept changes and close the Property Inspector

Select a different page of the Property Inspector. This automatically accepts changes on the current page.

This differs from the modeless Property Inspector in the modeless Property Inspector changes are immediate.


Generic Page command (Dialog SpeedMenu)
Generic Page

See also

The Generic Page command displays a generic, or summary, property page for the dialog box or selected control. The displayed page is similar to the General property page, but also includes the Style and ExStyle. These values are hexadecimal values resulting from the settings on the other property pages. Only change these values if you are an advanced user.

Note:	 You can also press the Control key and double-click the dialog box or control to display this page.


Control Palette command (Dialog SpeedMenu)
Control Palette

See also

The Control Palette command toggles the display of the Control Palette.


Tool Palette command (Dialog SpeedMenu)
Tool Palette

See also

The Tool Palette command toggles the display of the Tool Palette.


Property Inspector command (Dialog SpeedMenu)
Property Inspector

See also

The Property Inspector command toggles the displays of the modeless Property Inspector which you use to view and edit properties of the currently selected control or dialog box. Changes made using the modeless Property Inspector are immediate. This differs from the modal Property Inspector in that you must select OK or Apply for the changes to take effect.


Grid command (Dialog SpeedMenu)
Grid

See also

The Grid command toggles the display of the alignment grid.


Sorted List command (Dialog SpeedMenu)
Sorted List

See also

The Sorted List command displays the modeless Property Inspector as an alphabetically sorted list. Property names are displayed on the left side of the Inspector, values are displayed on the right.

This command is only available when the Property Inspector is modeless, that is, when the Property Inspector was displayed with Dialog|Show|Property Inspector or the Property Inspector command on the SpeedMenu.


Unsorted List command (Dialog SpeedMenu)
Unsorted List

See also

The Unsorted List command displays the modeless Property Inspector as an unsorted list; that is, properties are displayed in their natural order. Property names are displayed on the left side of the Inspector, values are displayed on the right.

This command is only available when the Property Inspector is modeless, that is, when the Property Inspector was displayed with Dialog|Show|Property Inspector or the Property Inspector command on the SpeedMenu.


Property Pages command (Dialog SpeedMenu)
Property Pages

See also

The Property Pages command displays the modeless Property Inspector as property pages. Individual pages are delineated by tabs at the top of the Inspector. The object being inspected is displayed in the drop-down list below the tab controls.

This command is only available when the Property Inspector is modeless, that is, when the Property Inspector was displayed with Dialog|Show|Property Inspector or the Property Inspector command on the SpeedMenu.


End Mode command (Dialog SpeedMenu)
End Mode

See also

The End Mode command exits one of the Dialog editor special modes, applying any changes. The special modes are invoked when you use one of the following commands:

Dialog|Set Creation Order

Dialog|Set Tabstops

Dialog|Set Group Flags

End Mode saves any changes you made while working in the special mode.


Cancel Mode command (Dialog SpeedMenu)
Cancel Mode

See also

The Cancel Mode command exits one of the Dialog editor special modes, without applying any changes. The special modes are invoked when you use one of the following commands:

Dialog|Set Creation Order

Dialog|Set Tabstops

Dialog|Set Group Flags

Cancel Mode does not save any changes you made while working in the special mode.


File|New|Resource Project command
New Resource Project dialog box (File|New|Resource Project)

See also

Use File|New|Resource Project to create a new resource project such as a resource script, compiled resource, bitmap, cursor, or icon.

This command displays the New Resource Project dialog box.

Dialog box options

Project File Type

The Project File Type list displays the type of file on which to base your project.

Options

The Options button displays a dialog box with creation options.


Project File Type

Displays the type of file on which to base your project.

Resource script (*.RC)

Bases your project on a resource script file. Use this option to add in any type of resource. This type of file is the default.

Compiled resource (*.RES)

Bases your project on a binary resource file. It contains one or more compiled resources.

Cursor image (*.CUR)

Bases your project on a cursor (.CUR) file. A cursor file contains one or more cursor images.

Icon image (*.ICO)

Bases your project on an icon (.ICO) file. An icon file contains one or more images of an icon.

Bitmap (*.bmp,*.RLE)

Bases your project on a bitmap (.bmp) file. A bitmap file contains a single bitmap image.


Options Button
Options

Displays a dialog box with creation options. The dialog box displayed depends on the project file type you choose.

Resource Type	Dialog Box

Compiled resource	No options available

Resource script	A File Open dialog where you choose the name of a new or existing resource header file.

Bitmap	New Bitmap Project Options dialog

Cursor	New Cursor Project Options dialog

Icon	New Icon Project Options dialog


New Bitmap Project Options dialog box

Use the New Bitmap Project Options dialog box to choose options for a new bitmap resource project.

Dialog box options

Colors

The Colors options determine the number of colors in the image.

Size

The Size options choose the image size.


Colors options
Colors

The Colors options determine the number of colors in the image.

2

Displays the image in black and white.

16

Displays the image as a 16-color image.

256

Displays the image as a 256-color image. This options is available only if your display hardware supports 256 colors. Your program must supply its own support for 256 colors.


Size options
Size

Determines the image size. The maximum size you can work with is limited by the amount of available memory on your computer. Even though you could enter 9999 for the width or height of your image, the maximum size for bitmaps on your computer is probably far less.

Width in Pixels

Enter the width, in pixels, of the bitmap image.

Height in Pixels

Enter the height, in pixels, of the bitmap image.


New Cursor Project Options dialog box

Use the New Cursor Project Options dialog box to choose options for a new cursor resource project.

Dialog box options

Colors

The Colors options determine the number of colors in the image.


New Icon Project Options dialog box

Use the New Icon Project Options dialog box to choose options for a new icon resource project.

Dialog box options

Colors

The Colors options determine the number of colors in the image.

Size

The Size options choose the image size.


Size options
Size

Determines the image size.

16 x 16

Creates the icon in a 16 x 16 pixel format.

32 x 32

Creates the icon in a 32 x 32 pixel format.

48 x 48

Creates the icon in a 48 x 48 pixel format.

64 x 64

Creates the icon in a 64 x 64 pixel format.

Custom Size

Lets you create a custom size for the icon. Enter the pixel format in the input boxes.


Resource Editor settings (Options|Environment)
Resource Editors options (Options|Environment|Resource Editors)

Resource Editor options let you customize the display and operation of Resource Workshop and some of its editors.

The subtopics are:

Dialog

Control Libraries

Images

Identifiers

The options are:

Resource Editor SpeedSettings


Resource Editor SpeedSettings (Options|Environment|Resource Editors)

See also

The Resource Editor SpeedSettings control how backups are made, how identifiers are generated, and the number of times you can undo actions.

Make Backups When Saving Files

Make Backups When Saving Files creates a set of backup files each time you save a resource project.

Generate Identifiers Automatically

Generate Identifiers Automatically determines whether new identifiers are automatically created.

Undo Limit

The Undo Limit tracks the number of changes you want to trace when you undo or redo actions with the Edit|Undo or Edit|Redo commands.


Make Backups When Saving Files

Creates a set of backup files each time you save a resource project. Backup files have a tilde as the first character in the file extension, for example, .~RC.


Generate Identifiers Automatically

Determines whether new identifiers are automatically created whenever you create a new resource or control in your project.


Undo Limit

The number of changes you want to trace when you undo or redo actions with the Edit|Undo or Edit|Redo commands. Depending on the amount of memory in your computer, you can undo or redo up to 99 actions. The default number is 10.


Dialog Editor settings (Options|Environment|Resource Editors)
Dialog (Options|Environment|Resource Editors)

See also

The Dialog options affect the behavior of the Dialog editor.

Coordinate Units

The Coordinate Units options determines the unit of measurement the status line uses to display information. You can display measurements using screen units, but the Dialog editor always uses dialog unit measurements.

Grid Attributes

The Grid Attributes options help align controls.

Tool Palette Display Options

The Tool Palette Display controls which of the Dialog editor Tool palettes are displayed each time the Dialog editor is opened.

Generate CONTROL Statements Only

Generate Control Statements Only generates CONTROL statements instead of specialized dialog control statements, to define a control.

Display with CTL3D Look

Display with CTL3D Look displays controls in Test mode with a 3-D look.


Coordinate Units

Determines the unit of measurement the status line uses to display information. You can display measurements using screen units, but the Dialog editor always uses dialog unit measurements.

Dialog

Displays coordinate units in dialog units.

Screen

Displays coordinate units in pixels.


Grid Attributes

Align controls.

Width

Specifies the width of each cell in the grid.

Height

Specifies the height of each cell in the grid.

Show Grid

The Show Grid check box toggles on and off the display of the grid.

Snap to Grid

Snaps controls to the nearest grid line. If this option is cleared, control are moved in increments equal to the current Width and Height values.


Tool Palette Display Options

Control which of the Dialog editor Tool palettes are displayed each time the Dialog editor is opened.

Show Control Palette

Toggles the display of the Control palette.

Show Tool Palette

Toggles the display of the Tool palette.

Show Property Inspector

Toggles the display of the modeless Property Inspector.


Generate CONTROL Statements Only

Generates CONTROL statements instead of specialized dialog control statements, to define a control. For example, if you are adding a list box to your dialog box and you choose this option, Resource Workshop generates a CONTROL statement instead of a LISTBOX statement.


Display with CTL3D Look

This option applies to users who have Program Manager loaded as their shell. If this option is set the dialog and its controls are displayed with a 3-dimensional look when you choose Dialog|Test Dialog.


Control Libraries settings (Options|Environment|Resource Editors)
Control Libraries (Options|Environment|Resource Editors)

See also

The Control Libraries option allows you to install custom controls, such as VBXs.

Installed Controls

Displays the currently installed custom control libraries.

Add

Displays a File Open dialog box where you choose the name of the control library file to open.

Remove

Removes the selected control library file from the list.


Graphics settings (Options|Environment|Resource Editors)
Images (Options|Environment|Resource Editors)

See also

The Graphics options affect the behavior of the Graphics editor when you are working with bitmaps, cursors, and icons.

Palette Options

The Palette Options control which of the Graphics editor palettes are displayed each time the Graphics editor is opened.

Editor Options

The Editor Options control user preferences for the Graphics editor. You may also set these on a session-by-session basis using Editor Options on the Bitmap, Cursor, or Icon menu.


Palette Options

Control which of the Graphics editor palettes are displayed each time the Graphics editor is opened.

Show Color Palette

Toggles the display of the Color palette.

Show Tool Palette

Toggles the display of the Tool palette.


Editor Options

Control user preferences for the Graphics editor. You may also set these on a session-by-session basis using Editor Options on the Bitmap, Cursor, or Icon menu.

Draw On Both Images

Forces the Graphics editor to update the image in both window panes as you draw.

If you turn this check box off, the Graphics editor updates the other image only after you finish drawing an element. Turn this option off if you find that performance is sluggish while you are drawing.

Show Grid

Displays a grid on the Graphics editor window when it is zoomed.. The grid shows you how the image is painted on a pixel-by-pixel basis.

The grid makes it easy to use the Align and Size commands to align and size the selected area of the image.

Save With Default Device Colors

Saves a custom Colors palette you have created. When this check box is on, any colors you have customized in the color palette will revert to the default color when you close the Graphics editor. This option applies only to a 256-color palette.


Identifiers settings (Options|Environment|Resource Editors)
Identifiers (Options|Environment|Resource Editors)

See also

The Identifiers options allow you to set the default identifier prefix for each of the resources listed below. These prefixes are used any time an identifier is automatically created. The option to create identifiers automatically is set in the Resource Editor SpeedSettings.

Resource	Item	Identifier Prefix

Accelerator	IDA_

Virtual Key	CM_KEY

Menu	IDM_

Menu Item	CM_

Popup Menu Item	CM_

Dialog	IDD_

Dialog Controls	IDC_

Bitmap	IDB_

Icon	IDI_

Cursor	IDC_

StringTable	String	IDS_STRING

VersionInfo	IDV_

RCDATA	IDR_

DLGINIT	IDD_


Menu menu (overview)
Menu menu

See also

The Menu menu is displayed when you edit a menu resource. You use the Menu menu to add pop-up commands, menu items, and menu separators to your menus. You can also set accelerator keys and test your menu for duplicate IDs.

The Menu menu is only displayed when you are working with a resource project.

Here are the commands:

New Popup

New Menuitem

New Separator

Set Mnemonic

Check Duplicates

View as Popup

Show Property Inspector

Test Menu


Menu | New Popup

See also

The Menu|New Popup command inserts a new pop-up menu above the item that is currently selected in the Edit window.

By default, this pop-up menu item is named Popup and a new menu item named Item is created under it.

You can change the text by selecting it in the Edit window and typing new text.


Menu | New Menuitem

See also

The Menu|New Menuitem command inserts a new menu item above the item that is currently selected in the Edit window.

By default, this item is named Item. You can change the text by selecting it in the Edit window and typing new text.


Menu | New Separator

See also

The Menu|New Separator command inserts a new separator above the item that is currently selected in the Edit window.


Menu | Set Mnemonic

See also

Use the Menu|Set Mnemonic command to assign a keyboard mnemonic key to the currently selected item in the menu resource you are editing. An ampersand (&) is inserted in front of a character.

In the Edit window, position the cursor before the character you choose and choose Menu|Set Mnemonic. The character is now displayed with an underline and users can select the item by typing that character.

When a new mnemonic is selected, the old one is removed automatically.


Menu | Check Duplicates

See also

Use the Menu|Check Duplicates command to check for duplicate identifiers.

If there are duplicates, the Menu editor displays a message box with the message "Duplicate command value found." When you close this box, the Menu editor selects the statement in the Edit window that contains the duplicate value. You can type a new value in the ID input box on the General page of the Menu editor Property Inspector.

You may also select Resource|Identifiers to change the value.


Menu | View as Popup

See also

Use View As Popup to toggle the display of menus as pop-up menus. This allows you to work with your menu as if they were pop-up menus. When you select Menu|Test Menu the menus are displayed as pop-up menus as well.

This option is automatically checked when you create a new menu resource as a Popup menu style.


Menu | Show Property Inspector

See also

Use Menu|Show Property Inspector to toggle the display of the Menu editor Property Inspector. You can use the Property Inspector to set general properties such as the text of a menu item or the ID, the accelerator used for that menu, and properties for extended menus.


Menu | Test Mode

See also

Use the Menu|Test Menu command to toggle between the Edit window and the Test view.


Menu SpeedMenu (overview)
Menu SpeedMenu

See also

The Menu SpeedMenu is displayed when you right-click in the Menu editor. The Menu SpeedMenu is only displayed when you are working with a resource project.

Here are the SpeedMenu commands:

New Popup

New Menuitem

New Separator

Cut

Copy

Paste

Set Mnemonic

Show Property Inspector


Cut command (Menu SpeedMenu)
Cut

Cut on the Menu SpeedMenu removes a menu statement from its current location and copies it to the Windows Clipboard. You can then use Paste to paste the statement in a new location.

If you cut a popup menu, the entire structure is removed from the current menu resource and copied to the Windows Clipboard.

This command is equivalent to the Edit|Cut menu command. You can use Edit|Undo and Edit|Redo if you need to undo changes.


Copy command (Menu SpeedMenu)
Copy

Copy on the Menu SpeedMenu copies a menu statement to the Windows Clipboard. You can then use Paste  to paste the statement in a new location.

If you select a popup menu, the entire structure is copied to the Windows Clipboard. This command is equivalent to the Edit|Copy menu command. You can use Edit|Undo and Edit|Redo if you need to undo changes.


Paste command (Menu SpeedMenu)
Paste

Paste on the Menu SpeedMenu places a menu statement that is in the Windows Clipboard at the current cursor position. To place a menu statement in the Clipboard, use Cut or Copy.

This command is equivalent to the Edit|Paste menu command. You can use Edit|Undo and Edit|Redo if you need to undo changes.


Identifiers SpeedMenu (overview)
Identifiers SpeedMenu

See also

You use the Identifiers SpeedMenu to add and edit identifiers. The Identifiers SpeedMenu is only available when the Identifiers dialog box is displayed.

Here are the Identifiers SpeedMenu commands:

Edit Identifier

Create Identifier

Delete Identifier


Edit Identifier

See also

The Edit Identifer command displays the Edit Identifier dialog box where you edit the identifier's name, its value, or file the it is stored it.


Create Identifier

See also

The Create Identifier command displays the New Identifier dialog box where you create a new identifier, assign it a value, and choose a file to place it in.


Delete Identifier

See also

The Delete Identifier command removes the selected identifier.