home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / d / d015 / 1.ddi / READWRT.TXT < prev    next >
Encoding:
Text File  |  1990-11-16  |  16.9 KB  |  422 lines

  1. 11-21-90
  2. The Whitewater Group
  3.  
  4. *****************************************************
  5. Notes for the Whitewater Resource Toolkit version 3.0
  6. *****************************************************
  7.  
  8. This file contains changes to the documentation and
  9. additional information since the manual went to press.
  10.  
  11. CAUTION
  12.  
  13.    Do not modify (save) the resources of a running
  14.    application. Saving a resource usually changes the
  15.    locations of the resources within the file (assuming the
  16.    size of the resource has changed).
  17.  
  18.    Windows may not be able to run if it tries to load any
  19.    resource it can't find.
  20.  
  21.  
  22. GENERAL INFORMATION
  23.  
  24.  
  25.    On-line Help
  26.    -----------
  27.  
  28.    On-line help is available for the Resource Toolkit.  To
  29.    access help from the Resource Manager, click its Help
  30.    button; from within an editor, use the editor's Help
  31.    menu.  Both methods open the Help window.  To see
  32.    instructions for using help, open the Help window, then
  33.    choose Using Help from the Help window's Help menu.
  34.  
  35.  
  36.    Dynamic Link Libraries
  37.    ----------------------
  38.  
  39.    As stated in the manual, all the resource editors can
  40.    modify resources from resource (RES) files and executable
  41.    (EXE) files.  In addition to these files, each editor can
  42.    modify resources from a dynamic link library (DLL).  This
  43.    is not stated in the manual.
  44.  
  45.    A dynamic link library (DLL) is an executable module
  46.    containing resources plus functions that can be called by
  47.    Windows applications.  A DLL is similar to a run-time
  48.    library, except that it's linked to a program at run time
  49.    rather than when conventional application files are
  50.    linked.  The library is activated when another module
  51.    calls one of its functions, thus allowing it to be used
  52.    by multiple applications or programs.  This means common
  53.    routines can be consolidated into a single module rather
  54.    than duplicated in each program that uses them.
  55.  
  56.    Routines in a DLL can be modified without relinking the
  57.    DLL to the programs that use it.  This contrasts with
  58.    normal object libraries, which have to be relinked
  59.    whenever their routines are modified.
  60.  
  61.    To save a new or modified resource into an existing DLL,
  62.    choose Save Into from the File menu.
  63.  
  64.  
  65.    Opening and Saving Files
  66.    ------------------------
  67.  
  68.    The dialog boxes used throughout the Resource Toolkit for
  69.    opening or saving files have been modified since the
  70.    manual went to print.  The radio buttons that were
  71.    formerly grouped together as File Extension radio buttons
  72.    are now organized as File Type radio buttons.  The File
  73.    Type radio buttons slightly modify the dialog's
  74.    functionality in order to simplify file selection.
  75.  
  76.    The principal change is that the File Type radio buttons
  77.    limit the files that are displayed in the dialog's Files
  78.    box, whereas the File Extension radio buttons didn't
  79.    limit the file display.  For example, to open an existing
  80.    RES file, choose the RES button in the File Type field,
  81.    and only RES files will be displayed in the Files box. 
  82.    To change the file display to EXE files, simply choose
  83.    the EXE button from the File Type field.  To save a new
  84.    or modified resource into, say, an existing DLL file,
  85.    choose the DLL button from the File Type field, then
  86.    select an existing file.  Thus, once the open or save
  87.    dialog is on your screen, the first step is always to
  88.    choose a radio button from the File Type field, unless,
  89.    of course, the button you want is the dialog's default
  90.    choice.
  91.  
  92.    The following summarizes the saving options available
  93.    from the File menu in the Resource Toolkit's editors:
  94.   
  95.    Save saves the current resource under its original name. 
  96.    Thus, choosing Save from the File menu doesn't open a
  97.    dialog unless the current resource is a new resource that
  98.    wasn't opened from an existing file.  For new resources,
  99.    Save functions the same as Save As.
  100.  
  101.    Save As saves the current resource under a different
  102.    name.  Generally, use Save As to create a new file.  The
  103.    types of files you can create are BMP (Bitmap Editor),
  104.    CUR (Cursor Editor), DLG (Dialog Editor), ICO (Icon
  105.    Editor), RC (Accelerator, Menu, and String editors), and
  106.    RES files (all editors).  When saving a resource into a
  107.    RES file, Save As lets you save the resource into a new
  108.    or existing RES file.  If you save the resource into an
  109.    existing RES file, Save As functions the same as Save
  110.    Into.
  111.  
  112.    Save Into saves the current resource into an existing
  113.    RES, EXE, or DLL file.  In addition, in the Bitmap
  114.    Editor, Save Into can save the bitmap into an existing
  115.    BMP file; in the Cursor Editor it can save a cursor into
  116.    an existing CUR file; and in the Icon Editor it can save
  117.    an icon into an existing ICO file.
  118.  
  119.    In BMP, CUR, or ICO files, Save Into writes over the
  120.    existing resource stored in the file, replacing it with
  121.    the current resource.
  122.  
  123.    RES, EXE, and DLL files, however, store multiple
  124.    resources.  Thus, you must assign a name to each
  125.    resource you save into one of these file types.  If you
  126.    assign the resource a unique name, the new resource is
  127.    added to the file.  If you assign a name already used by
  128.    another resource in the file, Save Into gives you the
  129.    option of either replacing the existing resource, or
  130.    preserving the existing resource by assigning a different
  131.    name to the current resource.
  132.  
  133.    Save Into cannot be used to save a resource into a new
  134.    file.
  135.  
  136.    NOTE.  Adding a new resource to EXE and DLL files doesn't
  137.    enable the resource.  You must define functionality for
  138.    the resource in the source code.
  139.  
  140.  
  141.    Checking Free Memory
  142.    --------------------
  143.    Page 14 of the manual tells you how to check the amount
  144.    of memory available to the Resource Toolkit and to
  145.    Windows.  It states that you can check free memory in
  146.    either of two ways:  open the Toolkit's About Box or
  147.    press Ctrl+O.  It should also mention that the About Box
  148.    can be opened only from the Resource Manager, and that
  149.    Ctrl+O works only from within one of the editors.
  150.    Ctrl+O doesn't work from the Resource Manager.
  151.  
  152.  
  153.    OS/2 Format Bitmaps
  154.    -------------------
  155.  
  156.    Occasionally, a Windows program might contain a bitmap
  157.    that was created in OS/2 format.  In those instances, you
  158.    should be able to edit the bitmap using the Resource
  159.    Toolkit.  However, OS/2 format bitmaps are not supported
  160.    by the Resource Toolkit 3.0.  Thus, you cannot create
  161.    OS/2 format bitmaps, and though you should be able to
  162.    edit existing OS/2 format bitmaps, the Resource Toolkit's
  163.    capacity for editing them has not been fully tested and
  164.    is not officially supported.
  165.  
  166.  
  167. ADDITIONS OR CHANGES TO THE EDITORS
  168.  
  169.  
  170.    Dialog Editor
  171.    -------------
  172.  
  173.    a) Pages 76-77 tell you how to create an owner-draw  
  174.       button.  The information is correct; however, a new
  175.       tool has been added to the Resource Toolkit to
  176.       simplify the process.  To create an owner-draw button,
  177.       select the Owner Draw tool.  Owner Draw is one of the
  178.       tool styles available under the Button tool.
  179.  
  180.    b) Pages 76 and 78 both say that to define a logical
  181.       group you use the Set Group item on the Dialog menu. 
  182.       This is a typing error.  The correct item to use is
  183.       Start Group on the Controls menu.
  184.   
  185.    c) Dialogs with menus don't display menus in the editor. 
  186.       The client area of the dialog will appear to be larger
  187.       in the y direction than it really is due to the space
  188.       reserved for the non-displaying menu.
  189.  
  190.    d) Group boxes don't need the group bit set.  They
  191.       exhibit the grouping behavior without setting the
  192.       group bit.  For this reason, Start Group in the
  193.       Controls menu is always shown as checked and disabled
  194.       for group boxes.  The Group check box in the group
  195.       box's Style dialog has no affect.
  196.  
  197.    e) The size of a control is determined by the values set
  198.       in the (cx,cy) fields in its Attributes box.  These
  199.       values are set automatically if you size the control
  200.       with the mouse; you can set them yourself by opening
  201.       the control's Attributes box (double-click the
  202.       control, or select it and choose Attributes from the
  203.       Control menu) and entering values in the (cx,cy)
  204.       fields.
  205.  
  206.       If a control's (cx,cy) values are set to (0,0), the
  207.       control seemingly disappears from the dialog (except
  208.       for an icon control, which still displays because
  209.       Windows ignores the size information for icons). 
  210.       However, though the icon isn't visible on your screen,
  211.       it is still in the dialog resource and will be defined
  212.       in any file you save the resource into.
  213.  
  214.       To fix a control whose (cx,cy) fields are (0,0):
  215.   
  216.       > Choose Select All from the Edit menu.  This selects
  217.         all the dialog's controls -- including the
  218.         "invisible" control.
  219.  
  220.       > De-select all visible controls by pressing the Shift
  221.         key and clicking each control with the mouse
  222.         pointer.  Now the only control still selected is the
  223.         "invisible" control.
  224.  
  225.       > Choose Attributes from the Controls menu, then enter
  226.         positive integer values in the (cx,cy) fields.  This
  227.         gives the "invisible" control dimensions that allow
  228.         the Dialog Editor to display it.
  229.  
  230.  
  231.    Bitmap Editor
  232.    -------------
  233.  
  234.    Page 99 of the manual states that the values you can
  235.    specify for both height and width of a bitmap range from
  236.    1 to 200 pixels.  This is no longer true.  The values you
  237.    can specify for both height and width are limited only by
  238.    available memory.
  239.    
  240.    Page 94 of the manual states that two-color bitmaps in
  241.    the Bitmap Editor are always black and white.  This isn't
  242.    true.  You can edit the text and background colors for
  243.    two-color bitmaps.
  244.  
  245.    To edit the text or background color for a two-color
  246.    bitmap:
  247.  
  248.    >  Choose either Text Color or Background Color from the
  249.       Options menu.  This opens a dialog that lets you
  250.       change the color's RGB color number.
  251.  
  252.    >  If you know the RGB color number you want, type it
  253.       into the editing fields.  Otherwise, use the scroll
  254.       bars to scroll a color blend.  The color box to the
  255.       right of the scrolls shows the current blend of red,
  256.       green, and blue.
  257.  
  258.    >  Click Accept or Cancel:
  259.  
  260.       -  Accept replaces the original color in the palette
  261.          with the color you specified.
  262.   
  263.       -  Cancel cancels the editing operation and restores
  264.          the original color to the palette.
  265.  
  266.    NOTE.  For a two-color bitmap, you can't save the
  267.    modified palette as you can with a 16-color bitmap. 
  268.    However, saving the bitmap into a file also saves its
  269.    color values.  When you later open the bitmap file, the
  270.    palette contains the edited rather than the default text
  271.    and background colors.
  272.  
  273.  
  274.    Bitmap, Cursor, and Icon Editors
  275.    --------------------------------
  276.  
  277.    When pasting into the Bitmap, Cursor, or Icon editors, if
  278.    the area you define for pasting isn't the same size as
  279.    the contents of the Clipboard, a dialog now opens so you
  280.    can choose one of two options:
  281.  
  282.    - Shrink/stretch the contents of the Clipboard so it fits
  283.      within the area you've selected for pasting.
  284.  
  285.    - Clip contents of the Clipboard.  Paste then copies
  286.      whatever fits within the bounded area, measuring from
  287.      the upper left corner of both the Clipboard and the
  288.      selected area.
  289.  
  290.  
  291.    Accelerator Editor
  292.    ------------------
  293.  
  294.    An Alt column has been added to the Accelerator Editor. 
  295.    The Alt column lets you include the Alt key as part of
  296.    the accelerator definition.
  297.  
  298.    Generally, you can define any virtual key or any
  299.    character key as an accelerator in your application. 
  300.    However, you should avoid conflicts with Windows's use of
  301.    accelerators. For example, you shouldn't define F10 as an
  302.    accelerator in your application because it conflicts with
  303.    Windows's use of F10 to activate a menu bar.  In
  304.    addition, you should observe the standards accepted by
  305.    most Windows applications.  For example, if your
  306.    application has an Edit menu, you should define Del as
  307.    the accelerator for Cut, Shift+Del as the accelerator for
  308.    Paste, and so on.
  309.  
  310.    For detailed guidelines to the conventions observed by
  311.    Windows programs, consult the following IBM publication:
  312.  
  313.      "Systems Application Architecture:
  314.         Common User Access
  315.         Advanced Interface Design Guide"
  316.      International Business Machines Corp., 1989
  317.  
  318.  
  319.    Header Editor
  320.    -------------
  321.  
  322.    Page 154 in the manual states that Put can place a new
  323.    symbol into the currently selected row.  That isn't true. 
  324.    Put can change the value of the currently selected
  325.    symbol, without changing the symbol's position in the
  326.    header file.  If you type a unique symbol into the Symbol
  327.    field and click on Put, Put functions the same as To End.
  328.  
  329.    CAUTION:  If you click the Save button in the Header
  330.    Editor, only #define statements are saved in the file. 
  331.    Any comments, structure definitions, conditional pre-
  332.    processor commands, nested includes, etc., are stripped
  333.    from the header file.  If your header file contains
  334.    anything other than #define statements, you can use the
  335.    Header Editor to view defined symbols in the file. 
  336.    However, you may not want to use the Header Editor to
  337.    save new or modified symbol definitions into that file.
  338.  
  339.  
  340. KNOWN ERRORS
  341.  
  342.    a) Text strings containing literal escape values
  343.       shouldn't be written to RC or DLG files.  This is
  344.       because the escape values are written in hex format,
  345.       which is incompatible with RC file format.  The work
  346.       around is to save resources containing literal escape
  347.       value text strings directly into RES or EXE files.
  348.  
  349.    b) If you try to open or save a file when you don't have
  350.       enough memory to do so, the Resource Toolkit displays
  351.       an error box stating that dynamic memory is too low to
  352.       implement your request.  However, the Cursor and Icon
  353.       editors sometimes display the wrong message.  If
  354.       either of these editors opens a dialog that says "WRT
  355.       System Error #1 Name:height" or "WRT System Error #1
  356.       Name:killDisplayBrush", the problem is that there
  357.       isn't enough dynamic memory available to implement
  358.       your request.  To increase available dynamic memory,
  359.       you can close some of the Toolkit editors that are
  360.       currently open.  Chapter 2 of the user's manual tells
  361.       you how to increase available dynamic memory.
  362.  
  363.    c) The Dialog Editor lets you select the font and point
  364.       size for all text displayed within the dialog. 
  365.       However, if you request a font/point size combination
  366.       that isn't available or isn't installed on your
  367.       system, the Dialog Editor accepts the request, but
  368.       then reverts without warning to the default System
  369.       font in 10 points.
  370.  
  371.       For example, assume the dialog is currently using
  372.       Helvetica font in 24 point size.  If you edit the font
  373.       selection to Courier without changing the point size
  374.       (Courier doesn't have 24 point type), the Dialog
  375.       Editor accepts your request; however, without issuing
  376.       a warning, it reverts all text in the dialog to the
  377.       default System font in 10 points.
  378.  
  379.    e) The File Open, File Save As, and File Save Into
  380.       dialogs let you use DOS conventions for changing the
  381.       current directory.  For example, to see a file display
  382.       from the directory above the current directory, you
  383.       can type .. into the Filename field and press Enter or
  384.       click OK.  However, these dialogs raise an error box
  385.       if you type a request like the following into the
  386.       Filename field:
  387.  
  388.          ..\TEST
  389.  
  390.       Correct behavior for the dialog would be to go to the
  391.       parent directory, then if a TEST subdirectory exists,
  392.       go down to that subdirectory.  If no TEST subdirectory
  393.       exists, select a file named TEST and append the file
  394.       extension indicated in the File Type field.
  395.  
  396.       The work around depends on what you're trying to do:
  397.  
  398.       - To get to the TEST subdirectory, first go to the
  399.         parent directory using the .. convention, then
  400.         from there, go to the TEST directory.
  401.  
  402.       - To request a file in the parent directory, eliminate
  403.         ambiguity from your request by including a file
  404.         extension with the file name.  For example, type
  405.  
  406.             ..\TEST.RES
  407.  
  408.         to request file TEST.RES in the parent directory.
  409.  
  410.    f) In the Menu Editor, \t in the Item Text field inserts
  411.       a tab in the menu text and \a assigns the help
  412.       attribute to the item.  These are the only instances
  413.       where the character \ can be used in the Menu Item
  414.       field.  If you attempt to use the character \ as part
  415.       of the item text, the \ isn't saved properly.
  416.  
  417.  
  418. *****
  419. Thank you for purchasing the Whitewater Resource Toolkit 3.0.
  420.  
  421. The Whitewater Group
  422.