Silverfrost Logo About Us | Contact Us
 

Notes

  1. An important characteristic of dialog boxes is that their appearance and size depends on the user's desktop display properties. In particular, the end user can select "Small Fonts", "Large Fonts" or "Other" in the Advanced settings of the Display Properties. When a resource editor is used to design a dialog, the positioning of text and controls can be expected to be consistent whatever size of font is used except when the width and height of a component is fixed. Bitmaps, icons and toolbars are examples of components that have fixed dimensions.
  2. The requirement to specify a designated component type for each format code (in the table for resource components ) might be regarded as being unnecessary in the sense that, if a component has a unique id, then this is sufficient to link it to a format code in the program. However, this limitation is often required so that additional relevant styles and extended styles can be imported from the resource.
  3. Some format codes are not easy to use with the Microsoft dialog editor. More specifically, if a component has a fixed size which is not known to the dialog editor (e.g. a jpeg image), then some iteration is required to get the positioning correct. If you have access to a Spy utility then you can run your program and leave it running, using the Spy utility to get the required size and adjust the component in the design viewer accordingly. A similar problem arises if the font size of Static text is changed from the default size.
  4. Although the dialog resource editor displays a large number of style options for the dialog and its controls, in practise only a small number are relevant and useful. Be careful not to experiment by selecting a number of options at random without compiling and running the program after each change. It is possible to obtain a state where the dialog will not load, then back-tracking to a safe state might prove difficult.
  5. The introduction of the %di format has opened up a very large number of options to the ClearWin+ programmer, only a relatively small number of which can be tested before release. Please report any outcomes that are clearly wrong. In addition, some limitations have been imposed in the initial design of %di which can easily be removed if there is a demand. For example, it has been assumed that %di will not be used with a pivot (%pv). Otherwise %ww options like 'maximise' would become useful.
  6. With the introduction of %di, the property sheet format %ps has also been extended. In its new form it can take options which cause the Microsoft tab control to be used instead of the ClearWin+ property sheet control.
    The simplest of these options is %ps[ms_style] and this becomes the default when %ps is used with %di. If you want to use %di with the ClearWin+ control then you must put %ps[alt_style] in the program and the size of the control will be set by ClearWin+ rather than by the size in the resource. When using %di you simply set the styles in the editor and use only %ps (without any options) in the program. When not using %di, the following options are currently available:

    ms_style

    uses the Microsoft tab control

    bottom

    implies ms_style and puts the tabs at the bottom

    hot_track

    implies ms_style and the tab text changes colour when touched by the mouse

  7. Similarly two new options have been added for %br.

    smooth

    gives a smooth progress bar and is the default when %di is not used

    not_smooth

    gives a broken progress bar and is the default when %di is used,
    not_smooth has no effect when [percentage] is used.

  8. The "Date Time Picker" format %dt can only be used with %di.
    As well as an integer argument for the identifier, %dt takes an argument which is an integer array with 8 items (see Samples\s11date). This array contains the system time as follows:

    item 1

    year

    item 2

    month (January=1)

    item 3

    day of the week (Sunday=0)

    item 4

    day of the month

    item 5

    hour

    item 6

    minute

    item 7

    second

    item 8

    millisecond

    The array is automatically filled with the current date and time when the window is opened and the user can select a new date and time. %dt takes no options and can be used with the usual ? and ^ modifiers. Styles can be set using the resource editor.

  9. The "Month Calendar" format %mc takes exactly the same form as %dt.
    Styles can be selected using the resource editor but the "Day states" style can only be implemented by interacting directly with the control whilst the "Multi-select" style is explicitly excluded from ClearWin+. Programmers who have the time and interest can use the advanced features of the Month Calendar control by sending the messages described in the Microsoft MSDN documentation available from the Microsoft website.

  10. The tool help format %th has been extended (see Samples\s12tips) and includes options to select Microsoft styles:

    ms_style

    use the Microsoft tooltip (implies at_cursor and no_callback_hide)

    always_tip

    ms_style with tooltips activated even when the control does not have the focus

    no_prefix

    ms_style with ampersands (&) not stripped from the text

    no_animate

    ms_style without initial sliding (when sliding can be disabled)

    no_fade

    ms_style without fading (when fading is available)

    balloon

    ms_style with balloon effect (when balloon effect is available)

    centre_tip

    ms_style with tooltips centred on each control rather than below right of the mouse cursor


    The delay feature in %th also works when using ms_style.
    If these new styles are used, it is necessary to call window_update@ if and when the on/off variable associated with %th is changed.

    The following subroutine can be used to change the toolip text dynamically:

    SUBROUTINE set_tooltip_text@(hwnd,text)
    INTEGER hwnd
    CHARACTER*(*) text

    hwnd is the handle of the control (from %lc) whose tooltip is to be changed to text.

 

 

Copyright © 1999-2017 Silverfrost Limited