Table Of Content2.0
BORLAND
Bor/ana C ++
Version 2.0
Whitewater Resource Toolkit
BORlAND INTERNATIONAL, INC. 1800 GREEN HILLS ROAD
P.O. BOX 66(001, scons VALLEY, CA 95067-CXXH
Copyright © 1991 by Borland International. All rights reserved. All
Borland products are trademarks or registered trademarks of
Borland International, Inc. Other brand and product names are
trademarks or registered trademarks of their respective holders.
Windows, as used in this manual, refers to Microsoft's implementa
tion of a windows system.
PRINTED IN THE USA.
Rl 10 9 8 7 6 5 4 3 2
c o s
N T E N T
Introduction 1 Files you can edit or save ............. 15
Features ............................. 1 Executable files .................... 17
The main pieces of the toolkit . . . . . . . . . .. 2 Resource files . . . . . . . . . . . . . . . . . . . . .. 17
The Resource Manager .............. 2 Dynamic link libraries .............. 18
Dialog Box editor ................... 2 Resource and dialog box script files .. 18
Bitmap, Cursor, and Icon editors ...... 2 Bitmap, cursor, and icon files ........ 19
Menu editor . . . . . . . . . . . . . . . . . . . . . . .. 3 Header files ....................... 19
Other editors ....................... 3
Chapter 3 The Resource Manager 21
File formats you can work with ......... 3
Starting an editor .................... 23
What you should know . . . . . . . . . . . . . . .. 4
Creating a new resource .............. 23
Hardware and software requirements ... 4
Accessing existing resources . . . . . . . . . .. 23
Installation. . . . . . . . . . . . . . . . . . . . . . . .. 5
Choosing resource types to display . .. 24
About this manual .................... 5
Opening an existing file . . . . . . . . . . . .. 24
Where to now? ..................... 6
Editing a resource . . . . . . . . . . . . . . . . .. 26
Chapter 1 Getting started 7 Deleting a resource . . . . . . . . . . . . . . . .. 26
Starting from DOS .................. 7 Copying a resource. . . . . . . . . . . . . . . .. 27
Starting within Windows ............ 8 Renaming resources . . . . . . . . . . . . .. 28
Starting from the Program Manager . 8 Backup files ....................... 28
Starting from the File Manager or MS Creating a new file ................... 28
DOS executive . . . . . . . . . . . . . . . . . . .. 8 Closing a file ........................ 30
Adding the icon to the Program
Chapter 4 The Accelerator editor 31
Manager ........................... 8
Creating accelerators ................. 31
Exiting from the Resource Toolkit ..... 9
Navigating the editor ............... 31
Chapter 2 About resources and files 11 Editing text ....................... 32
What is a resource? ................... 11 The accelerator table ............... 32
Editable resources . . . . . . . . . . . . . . . . . . .. 12 Type ........................... 32
Accelerators ....................... 12 Key ............................ 32
Bitmaps .......................... 13 Code ........................... 33
Cursors ........................... 13 Shift ............................ 33
Icons ............................. 13 Ctrl ............................ 33
Dialog boxes ...................... 14 Value .......................... 34
Menus ............................ 14 Invert .......................... 34
Strings ........................... 14 Symbol ......................... 34
Header files ......................... 34
Chapter 5 The Bitmap, Cursor, and Chapter 6 The Dialog Box editor 51
Icon editors 35 Files ................................ 51
Files ................................ 36 Header files ....................... 51
Bitmap files ....................... 36 An overview of the editor . . . . . . . . . . . .. 52
OS/2 format bitmaps . . . . . . . . . . . .. 36 Dialog Boxes and controls . . . . . . . . . . . .. 52
Cursor and icon files . . . . . . . . . . . . . . .. 36 Dialog boxes with menus ........... 53
Setting resolution .................. 37 Creating a dialog box or control. . . . .. 53
Cursor and icon editors ............... 38 Selecting a dialog box or control ..... 54
Bitmap editor ....................... 38 Selecting multiple controls ........ 54
Using a graphics editor ............... 39 De-selecting a dialog box or control . 54
Using color. . . . . . . . . . . . . . . . . . . . . . . . .. 40 Moving a dialog box or control ...... 55
Color palettes ..................... 41 Changing the size of a dialog box or con-
Choosing color for cursor and icon trol ............................... 55
images ........................... 41 Restricting mouse movement . . . . . . .. 56
Color ........................... 42 Setting attributes for a dialog box or con-
Screen ......................... . 42 trol ............................... 56
Inverse ........................ . 42 Assigning text . . . . . . . . . . . . . . . . . .. 57
Customizing color palettes ......... . 42 Assigning fonts to text . . . . . . . . . . .. 57
16-color bitmaps ................ . 42 Changing coordinates ............ 58
2-color bitmaps ................. . 43 Changing control ID numbers ..... 58
Saving a customized color palette .. 44 Defining styles .................. 59
Retrieving a customized color Setting tab order for controls ........ 59
palette .......................... 44 Defining logical groups for controls .. 59
Drawing and editing graphics ......... 44 Tools palette ........................ 59
Using the graphic tools ............. 44 Pointer tool ....................... 60
Toggling inverse colors ........... 45 Dialog Box tool .................... 60
Choosing a line width ............ 46 Standard dialog box . . . . . . . . . . . . .. 61
Magnifying the editing area ....... 46 Captioned dialog box. . . . . . . . . . . .. 61
Viewing a graphic. . . . . . . . . . . . .. 46 Control tools ...................... 61
Free-form lines and shapes ........ 47 Multi-style tools ................. 61
Straight lines .................... 47 Push buttons .................... 62
Constrained lines ................ 47 Standard push button .......... 62
Rectangles ...................... 47 Default push button . . . . . . . . . . .. 62
Ellipses . . . . . . . . . . . . . . . . . . . . . . . .. 48 Check boxes. . . . . . . . . . . . . . . . . . . .. 62
Polygons. . . . . . . . . . . . . . . . . . . . . . .. 48 Radio buttons ................... 62
Dragging tool ................... 48 Customizing buttons ............. 63
Selecting a graphic region . . . . . . . .. 48 Edit controls .................... 63
The Hot Spot tool ................ 48 Static text ....................... 63
Filling large areas ................ 49 Group box ...................... 63
Menus .............................. 49 List boxes . . . . . . . . . . . . . . . . . . . . . .. 64
Image menu. . . . . . . . . . . . . . . . . . . . . .. 49 Customizing list boxes . . . . . . . . .. 64
Options menu ..................... 50 Combo boxes . . . . . . . . . . . . . . . . . . .. 64
Tools Menu ....................... 50 Simple combo box ............. 65
Drop-down combo box ......... 65
ii
Drop-down list combo box ...... 66 Symbol field . . . . . . . . . . . . . . . . . . . .. 87
Customizing combo boxes ...... 66 String sizes and values. . . . . . . . . . .. 87
Scroll bars. . . . . . . . . . . . . . . . . . . . . .. 66 Navigating the editor ............... 88
Standard scroll bar ............. 67 Editing text ....................... 88
Variable-width scroll bar ........ 67 Header files ......................... 88
Icons ........................... 67
Chapter 9 The Header editor 89
Custom controls ................. 67
Header files ......................... 89
Alignment palette . . . . . . . . . . . . . . . . . . .. 67
Starting the editor .................... 90
Alignment tools ................... 68
Creating new header files ........... 90
Menus .............................. 70
Opening existing header files ........ 91
Dialog menu ...................... 70
Using the editor ..................... 91
Controls menu .................... 71
ID numbers ....................... 91
Tools menu ....................... 72
Editing a symbol . . . . . . . . . . . . . . . . . .. 92
Alignment menu. . . . . . . . . . . . . . . . . .. 72
In the Header editor . . . . . . . . . . . . .. 92
Chapter 7 The Menu editor 73 In the Accelerator, String, and Menu
Files ................................ 73 editors .......................... 93
Using the editor ..................... 74 In the Dialog Box editor . . . . . . . . . .. 94
Menu table ...................... 74 Deleting a symbol . . . . . . . . . . . . . . . . .. 94
Movement buttons ............... 75 Moving a symbol .................. 95
Style and attribute fields .......... 75 Saving the header file. . . . . . . . . . . . . .. 95
Test window .................... 75
Chapter 10 Common keys and
Defining menu text. . . . . . . . . . . . . . . . . .. 75
menus 97
Navigating the editor ............... 75
Editing a table . . . . . . . . . . . . . . . . . . . . . .. 97
Editing text ....................... 76
Navigating a table ................. 98
Defining menu levels ............... 77
Typing in an edit field .............. 99
Changing the position of menu items . 78
Selecting options in a selection field .. 99
Setting an activation key ............ 79
Using menus ........................ 99
Defining an activation key ........ 80
The File menu .................... 100
Inserting tabs in menu text .......... 80
New .......................... 100
Defining menu styles and attributes .... 81
Open .......................... 100
Adding separator lines to pop-up
Save ........................... 101
menus ............................ 81
Save As ........................ 101
Using a checkmark ................. 82
Save Into ...................... 102
Defining style for menu items ....... 82
NewHeader ................... 103
Aligning menu items in columns . . . .. 83
Open Header . . . . . . . . . . . . . . . . . .. 103
Assigning the help attribute ......... 84
Resource Attributes ............. 103
Testing menus . . . . . . . . . . . . . . . . . . . . . .. 84
Edit menu ....................... 104
Chapter 8 The String editor 85 Undo .......................... 105
Defining strings ..................... 85 Cut .....•..................... 105
Field and row indicators ............ 86 Cut Row ....................... 105
The string table .................... 86 Copy ........................' .. 105
String text field .................. 87 Copy Row ..................... 105
iii
Paste .......................... 105 Controlling memory allocation ..... 110
Paste Row ..................... 106 Static and dynamic memory
Clear .......................... 106 settings . . . . . . . . . . . . . . . . . . . . . . .. 110
Clear Row ..................... 106 Checking free memory .......... 111
Clear All . . . . . . . . . . . . . . . . . . . . . .. 106 Windows and memory .......... 111
Select All ...................... 106 Using WIN.IN! to control memory
Header menu. . . . . . . . . . . . . . . . . . . .. 106 allocation ........................ 112
Hide .......................... 107 Disk space ....................... 113
Show .......................... 107 Palette appearance .................. 113
Switching editors ................... 114
Appendix A Troubleshooting and error
Recovering disk space ............... 114
messages 109
Error messages ..................... 109 Index 117
Memory configuration. . . . . . . . . . . . . .. 110
iv
s
T A B L E
2.1: Files that can be edited in the Resource 2.2: Files that can be generated by the Re-
Toolkit ........................... 15 source Toolkit ..................... 16
6.1: Alignment tools ................... 68
v
u s
F G R E
2.1: Building Windows applications in the 7.1: The Menu editor ................... 74
Resource Toolkit ................... 17 7.2: Defining menu levels .............. 78
3.1: The Resource Manager ............. 22 7.3: Using breaks ...................... 83
5.1: The graphic tools .................. 44 8.1: The string table .................... 86
6.1: Tools palette ...................... 60 10.1: String table in the String editor ..... 98
6.2: The Alignment palette ............. 68
vi
o u c o
N T R D T N
Using the Resource Toolkit, The Resource Toolkit provides the tools you need to build and
you can see your resources modify resources used in applications designed to work under
as you edit them, instead of
Microsoft's Windows 3.0. Those tools include editors for accelera
having to edit a script file
that gets compiled later. tors, bitmaps, cursors, icons, dialog boxes, menus, and strings;
with them, you can create and edit resources. The Resource Tool
kit also includes an organizing and efficiency tool called the
Resource Manager. The Resource Manager is the central control
for accessing the resource editors, and lets you accomplish other
tasks besides, such as copying resources from one file into
another, and so on.
With the Resource Toolkit editors, you can create and manage the
user interfaces of your Windows applications while staying in
Windows. This ability to work interactively saves you valuable
time as you develop resources. Moreover, the Resource Toolkit
can save resources in binary format. This eliminates the edit
compile-link cycle typical of resource development.
Features
The resources you can create, edit, and save with the Resource
Toolkit are
• keyboard accelerators
• bitmaps
• cursors
• icons
• dialog boxes
• menus
• strings
In most languages, you can create these elements directly in the
source code. However, by defining them as independent
Introduction