home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Programmierung / SOURCE.mdf / programm / windows / c / mobjm260 / sfx200.tx_ / sfx200.tx
Encoding:
Text File  |  1994-09-06  |  164.1 KB  |  4,799 lines

  1. Microworks ObjectMate 2.6
  2. Windows Interface Development Kit.
  3. Copyright ⌐ 1992-1994 Microworks
  4. Sydney, Australia.
  5. CompuServe 100026,1134
  6. Release date: 6-9-94.
  7.  
  8.                    Welcome to ObjectMate 2.6
  9.                    --------------------------
  10.  
  11. This text file contains a detailed description of each object 
  12. in the ObjectMate Interface Library including the custom 
  13. controls, dialogs, common dialogs, windows, exported functions 
  14. and private messages. At some stage you should read this 
  15. entire file.
  16.  
  17.  
  18.  
  19. -----------------
  20. TABLE OF CONTENTS
  21. -----------------
  22.  
  23. 1   Buttons.
  24. 2   Splash Bitmaps
  25. 3   Static controls.
  26. 4   Shade controls.
  27. 5   Dividers.
  28. 6   Check boxes.
  29. 7   Radio buttons.
  30. 8   Scroll bars.
  31. 9   Edit controls.
  32. 10  List boxes.
  33. 11  Combo boxes.
  34. 12  Toolbars.
  35. 13  Percent gauges.
  36. 14  MDI Clients.
  37. 15. Dialog Boxes.
  38. 16. Common Dialog Boxes.
  39. 17. Windows.
  40. 18. 3D Menus.
  41. 19. Message Boxes and Input Boxes.
  42. 20. Functions.
  43. 21. Private Messages
  44.  
  45.  
  46.  
  47. -------------
  48. 1.  BUTTONS.
  49. -------------
  50.  
  51. GLOBAL CLASS NAME:  SFXBUTTON
  52.  
  53. FUNCTION:
  54.  
  55.  - Borland-style bitmap buttons, Resizeable bitmap buttons, 
  56.    Icon buttons, Text buttons and Splash Panels.
  57.  
  58.  
  59. NEW FEATURES:
  60.  
  61.  - Changed the Single-Bitmap button style to the Bitmap-Button 
  62.    style and enhanced it so that it can display one, two or three 
  63.    bitmaps. 
  64.  
  65.  - Flicker free painting of the Text and Bitmap button styles.
  66.  
  67.  - The Bitmap-Button style (MBS_BITMAPBUTTON) now displays 
  68.    resizeable Borland-style buttons. 
  69.  
  70.  - Added an Icon Button style that displays an icon on a button 
  71.    at run time.
  72.  
  73.  
  74. FLAGS: 
  75.  
  76.  - The SFXButton class has no BS_DEFPUSHBUTTON style. The MBS_XXX 
  77.    button flags are used by SFX buttons, check boxes and radio 
  78.    buttons. The MBS_FLUSH flag and the MBS_RAISED flag are the 
  79.    same. MBS_FLUSH specifies a flush button and MBS_RAISED 
  80.    specifies a raised check box or radio button. The MBS_LEFTTEXT 
  81.    flag is used by SFX check boxes and radio buttons to display 
  82.    left aligned text. The MBS_XXX color flags are used by SFX 
  83.    buttons to set the button text color and by SFX check boxes and 
  84.    radio buttons to set the check mark color (eg MBS_RED). The 
  85.    MBS_BITMAP flag specifies a non pushable splash bitmap and the 
  86.    MBS_DEFFONT flag draws the button text using a fine font. The 
  87.    button flags are:
  88.  
  89.       MBS_PUSHBUTTON      same as BS_PUSHBUTTON
  90.       MBS_CHECKBOX        same as BS_CHECKBOX
  91.       MBS_AUTOCHECKBOX    same as BS_AUTOCHECKBOX
  92.       MBS_RADIOBUTTON     same as BS_RADIOBUTTON
  93.       MBS_3STATE          same as BS_3STATE
  94.       MBS_AUTO3STATE      same as BS_AUTO3STATE
  95.       MBS_AUTORADIOBUTTON same as BS_AUTORADIOBUTTON
  96.       MBS_ICONBUTTON      displays an icon on a button at run time
  97.       MBS_DEFFONT         draws the button, check box and radio
  98.                           button text using a fine font.
  99.       MBS_LEFTTEXT        aligns check box and radio button text
  100.                           flush left.
  101.       MBS_RAISEDTEXT      draws button, check box and radio
  102.                           button text so that it appears raised.
  103.       MBS_RECESSEDTEXT      draws button, check box and radio
  104.                           button text so that it appears recessed.
  105.       MBS_RED             The MBS_RED to MBS_YELLOW flags draw
  106.       MBS_LIME            button text and check box and 
  107.       MBS_BLUE            radio button check marks in the corresponding
  108.       MBS_MAGENTA         color.
  109.       MBS_MAROON            
  110.       MBS_GREEN            
  111.       MBS_NAVY            
  112.       MBS_PURPLE           
  113.       MBS_YELLOW          
  114.       MBS_FLUSH          draws a flush border around a push button
  115.       MBS_RAISED          draws a raised check box or radio button
  116.       MBS_BITMAP          splash bitmap
  117.       MBS_BITMAPBUTTON    resizeable bitmap button
  118.       MBS_TEXTBUTTON      resizeable text button
  119.  
  120.  
  121. RESOURCE IDENTIFIERS:
  122.  
  123.  - Bitmap ID's for the bitmap buttons should follow the Borland 
  124.    numbering system:
  125.  
  126.       1000 + button ID  (up bitmap)
  127.       3000 + button ID  (down bitmap)
  128.       5000 + button ID  (focussed bitmap)
  129.    
  130.    CGA and EGA bitmaps are not supported.
  131.  
  132.  
  133. BUTTON ID'S:
  134.  
  135.  - Button ID's should be between 100 and 999. Numbers 0 to 99 are 
  136.    reserved for use by SFX200.DLL. The help button ID is 8 not 
  137.    998. The previous conflict that occurred with Borland's help 
  138.    button ID in RC files has been fixed in the new version of 
  139.    SFX200.H. ID's 1 to 11 display one of the standard bitmap 
  140.    buttons in SFX200.DLL.
  141.  
  142.  
  143. BUTTON STYLES:
  144.  
  145.  - Default button
  146.  - Bitmap button
  147.  - Icon Button
  148.  - Text button
  149.  - Splash bitmap
  150.  
  151.  
  152. DEFAULT BUTTON STYLE:
  153.  
  154.  - The default button style is a Borland-style bitmap button. 
  155.    There is no flag for this style. Its standard size is 74 by 48 
  156.    pixels and it requires 3 bitmaps to display correctly (up, down 
  157.    and focussed). Each bitmap should include the button borders. 
  158.    If no bitmaps are specified for a given button ID, that button 
  159.    uses the default blank bitmaps and displays text. This button 
  160.    style is not resizeable.
  161.  
  162.  
  163. BITMAP BUTTON STYLE:
  164.  
  165.  - This button style is specified using the MBS_BITMAPBUTTON flag. 
  166.    It can be used to create buttons that display one, two or three 
  167.    bitmaps. Each bitmap should be drawn flat as this button 
  168.    paints its own borders. If only one bitmap is specified in 
  169.    the resource file, that bitmap is used in all three button views 
  170.    (up, down and focussed) and is offset in the down view. If 
  171.    a down bitmap is specified the down bitmap is not offset so any 
  172.    movement of the bitmap has to be drawn by you. If no focussed 
  173.    bitmap is specified the up bitmap is used in the focussed view. 
  174.    This button style is resizeable. Specifying one of the standard 
  175.    button ID's (1 to 11) with this style creates a resizeable 
  176.    Borland-style bitmap button (see Object Viewer). The minimum 
  177.    size of a resizeable standard bitmap button (ie id's 1 to 11) is 
  178.    74 by 48 pixels.
  179.  
  180.  
  181. ICON BUTTON STYLE:
  182.  
  183.  - This style displays an icon on a button at run time. You must 
  184.    load and delete the icon yourself, SFX200.DLL just displays it. 
  185.    To specify an icon button set the MBS_ICONBUTTON flag or check 
  186.    the Icon Button check box in the button style dialog in RW. An 
  187.    icon button in RW appears blank because an icon can only be 
  188.    displayed at run time. To display an icon send the icon 
  189.    button a WM_SETBITMAP message: wParam is the icon handle and 
  190.    lParam is zero. A 'SetIcon' member function has been added to 
  191.    TSFXButton that sends this message for you. All you have to do 
  192.    is add the following code to somewhere like your SetupWindow 
  193.    method:
  194.  
  195.    eg. C++
  196.  
  197.       But1->SetIcon(newIcon);   // newIcon must be a valid icon handle.
  198.  
  199.    eg. Pascal
  200.  
  201.       But1^.SetIcon(newIcon);   // newIcon must be a valid icon handle.
  202.  
  203.  - When you want to update an icon don't forget: your responsible 
  204.    for deleting the current icon. Do not combine MBS_ICONBUTTON 
  205.    with MBS_BITMAPBUTTON, MBS_TEXTBUTTON, MBS_BITMAP or any of the 
  206.    standard BS_XXX button flags. These flags are mutually exclusive.
  207.  
  208.  
  209. RESIZEABLE TEXT BUTTONS:
  210.  
  211.  - Resizeable text buttons are created by specifying the MBS_TEXTBUTTON 
  212.    flag. This style can display normal, recessed, raised or 
  213.    colored button text. 
  214.  
  215.  
  216. SPLASH BITMAPS:
  217.  
  218.  - A non-pushable splash bitmap is displayed by ID when you 
  219.    specify the MBS_BITMAP flag. Splash bitmaps can also be 
  220.    displayed by name using an SFXStatic control.
  221.  
  222. BITMAP BUTTON MNEMONICS:
  223.  
  224.  - A mnemonic is the underlined text character that activates 
  225.    a button when the corresponding key is pressed on the 
  226.    keyboard. To ensure that a mnemonic character works for a bitmap 
  227.    button, set the button's text, including underlined character to 
  228.    correspond to the text displayed on the bitmap. This is done 
  229.    automatically for the 11 standard bitmap buttons. 
  230.  
  231.  
  232. PRIVATE MESSAGES:
  233.  
  234.  - You can use the any of the following messages (defined in 
  235.    SFX200.PAS and SFX200.H) with an SFXButton control:
  236.       
  237.      -  WM_SETBITMAP
  238.      -  WM_SETBRUSH
  239.      -  WM_SFXCTLCOLOR
  240.  
  241.  
  242. WM_SETBITMAP:
  243.  
  244.  - If the button is not an Icon button this message is used to 
  245.    change the button ID. wParam is the new ID and lParam is zero. 
  246.    If the button is a bitmap button (or splash bitmap) with 
  247.    predefined bitmaps in the resource file, the bitmaps are also 
  248.    changed.
  249.  
  250.  - If the button is an Icon button this message is used to change 
  251.    the icon a button displays. wParam is a valid icon handle and 
  252.    lParam is zero. SFX200.DLL does not delete icon handles, that's 
  253.    your responsibility.
  254.  
  255.  
  256. WM_SETBRUSH:
  257.  
  258.  - Sets the brush that's used to paint a text button's face. 
  259.    The default brush is light gray. This should be sent in 
  260.    response to a WM_SFXCTLCOLOR message. wParam is a handle to the 
  261.    new brush and lParam is zero. SFX200.DLL does not delete the brush 
  262.    handle. That's your responsibility. 
  263.  
  264.  
  265. WM_SFXCTLCOLOR:
  266.  
  267.  - This message is sent to its parent when an SFX control is about 
  268.    to be painted. It is analogous to the WM_CTLCOLOR message. 
  269.    wParam contains the button's display context, the LOWORD of 
  270.    lParam contains the button's handle and the HIWORD of lParam 
  271.    specifies a button control (SFXCTLCOLOR_BUTTON).
  272.  
  273.       Pascal Example:
  274.          
  275.          procedure TMyWindow.WMSFXCtlColor (var Msg: TMessage);
  276.          begin
  277.            case Msg.lParamHi of
  278.              SFXCtlColor_Button:
  279.              begin
  280.                SetBkMode(Msg.wParam, Transparent);
  281.                SendMessage(Msg.lParamLo, wm_SetBrush, 
  282.                            GetSFXObject(Red_Brush), 0);
  283.              end;
  284.            end;
  285.          end;
  286.  
  287.       C++ 4.0 Example:
  288.  
  289.          LRESULT 
  290.          TMyWindow::EvSFXCtlColor(WPARAM wParam, LPARAM lParam)
  291.          {
  292.            if (HIWORD(lParam) == SFXCTLCOLOR_BUTTON)
  293.            {
  294.               ::SetBkMode((HDC)wParam, TRANSPARENT);
  295.               ::SendMessage((HWND)LOWORD(lParam), WM_SETBRUSH, 
  296.                             (UINT)GetSFXObject(RED_BRUSH), 0);
  297.            }
  298.          }
  299.  
  300.  
  301. OBJECTWINDOWS CLASS:   TSFXButton. 
  302.  
  303. ANCESTOR CLASS:   TButton.
  304.  
  305. CONSTRUCTORS:
  306.  
  307.    Pascal:
  308.  
  309.       Init (AParent: PWindowsObject; AnID: Integer; AText: PChar;
  310.             X, Y, W, H: Integer);
  311.  
  312.       InitResource (AParent: PWindowsObject; ResourceID: Word);
  313.  
  314.  
  315.    C++ 4.0: 
  316.  
  317.       TSFXButton(TWindow* parent, int id, const char far* text,
  318.          int x, int y, int w = 0, int h = 0, TModule* module = 0);
  319.  
  320.       TSFXButton(TWindow* parent, int resourceId, TModule* module = 0);
  321.  
  322.  - When a Borland-style bitmap button is created it's automatically 
  323.    resized to 74 by 48 pixels, so the width and height arguments can 
  324.    be set to zero.
  325.  
  326.  
  327. PASCAL METHODS:
  328.  
  329.    function  GetClassName: PChar; virtual;
  330.       - returns the SFX button class name 'SFXBUTTON'.
  331.  
  332.    procedure SetButton (NewID: Integer);
  333.       - changes a buttons ID and associated bitmaps, if any. NewID 
  334.         is the new button identifier.
  335.  
  336.    procedure SetIcon (NewIcon: HIcon);
  337.       - changes the icon displayed on an icon button to 
  338.         NewIcon.
  339.  
  340.    procedure SetText (ATextString: PChar);
  341.       - sets the text displayed on a text button to 
  342.         ATextString.
  343.  
  344.  
  345. C++ 4.0 MEMBER FUNCTIONS:
  346.  
  347.    char far* GetClassName();
  348.       - returns the SFX button class name "SFXBUTTON".
  349.  
  350.    void SetButton(int newId);
  351.       - changes a buttons Id and associated bitmaps, if any. 
  352.         newId is the new button identifier.
  353.  
  354.    void SetIcon(HICON newIcon);
  355.       - changes the icon displayed on an icon button to 
  356.         newIcon.
  357.  
  358.    void SetText(const char far* str);
  359.       - sets the text displayed on a text button to str.
  360.  
  361.  
  362.  
  363. ---------------------
  364. 2.  SPLASH BITMAPS.
  365. ---------------------
  366.  
  367. GLOBAL CLASS NAME:   SFXButton
  368.  
  369. FUNCTION:   Splash Bitmaps 
  370.  
  371. FLAGS:   Uses the MBS_BITMAP button flag to specify a splash bitmap
  372.  
  373. OBJECTWINDOWS CLASS:   TSFXBitmap.
  374.  
  375. ANCESTOR CLASS:   TControl
  376.  
  377. CONSTRUCTORS:
  378.  
  379.    Pascal:
  380.  
  381.       Init (AParent: PWindowsObject; AnID: Integer; X, Y: Integer);
  382.  
  383.       InitResource (AParent: PWindowsObject; ResourceID: Word);
  384.  
  385.    C++ 4.0:
  386.  
  387.       TSFXBitmap(TWindow* parent, int id, int x, int y, TModule* module = 0);
  388.  
  389.       TSFXBitmap(TWindow* parent, int resourceId, TModule* module = 0);
  390.  
  391.  
  392. PASCAL METHODS:
  393.  
  394.    function  GetClassName: PChar; virtual;
  395.       - returns the SFX button class name 'SFXBUTTON'.
  396.  
  397.  
  398. C++ 4.0 MEMBER FUNCTIONS:
  399.  
  400.    char far*  GetClassName();
  401.       - returns the SFX button class name "SFXBUTTON".
  402.  
  403.  
  404.  
  405. ---------------------
  406. 3.  Static controls.
  407. ---------------------
  408.  
  409. GLOBAL CLASS NAME:   SFXStatic
  410.  
  411. FUNCTION:   Static text, Splash Bitmaps
  412.  
  413. NEW FEATURES:
  414.  
  415.  - Added a new flag (MSS_SFXPAINT) to provide smooth flicker-free 
  416.    painting for moving text. An example of this is used in the 
  417.    Object Viewer toolbar/status bar. 
  418.  
  419.  
  420. FLAGS: 
  421.  
  422.  - The default flags for an SFX static control are MSS_TEXT, MSS_TOP and 
  423.    MSS_LEFT. They specify normal, top-left aligned text. 
  424.  
  425.       MSS_TEXT            default.
  426.       MSS_TOP             default.
  427.       MSS_LEFT            default.
  428.       MSS_RECESSEDTEXT      recessed text.
  429.       MSS_RAISEDTEXT      raised text.
  430.       MSS_SHADOWTEXT      shadowed text.
  431.       MSS_BITMAP          splash bitmap.
  432.       MSS_BITMAPWINDOW    splash bitmap in a window (eg Object 
  433.                           viewer splash panel.
  434.       MSS_HCENTER         centers text/bitmap horizontally. 
  435.       MSS_RIGHT           aligns text/bitmap flush right.
  436.       MSS_BOTTOM          aligns text/bitmap flush bottom.
  437.       MSS_VCENTER         centers text/bitmap vertically.
  438.       MSS_RECESSED        draws recessed border.
  439.       MSS_RAISED          draws raised border.
  440.       MSS_FRAME           draws a recessed or raised frame when
  441.                           combined with the MSS_RECESSED or 
  442.                           MSS_RAISED styles.
  443.       MSS_WORDWRAP        wraps text extending beyond the right border. 
  444.       MSS_SINGLELINE      specifies a single line of text.
  445.       MSS_NOPREFIX        no prefix characters (same value as MSS_SFXPAINT)
  446.       MSS_SFXPAINT        forces control to use an alternative flicker free
  447.                           paint function. Intended for moving text.
  448.       MSS_EXPANDTABS      expands tab characters.
  449.       MSS_DEFFONT         displays text using a fine font
  450.       MSS_CENTER          MSS_VCENTER + MSS_HCENTER
  451.       MSS_CENTERBITMAP    MSS_BITMAPWINDOW + MSS_CENTER
  452.       MSS_RAISEDFRAME     MSS_RAISED + MSS_FRAME
  453.       MSS_RECESSEDFRAME   MSS_RECESSED + MSS_FRAME
  454.  
  455.  - Adding flicker free painting for moving text required an extra 
  456.    flag, but there wasn't one, so the MSS_SFXPAINT flag was 
  457.    doubled with the MSS_NOPREFIX flag. Specifying either flag 
  458.    causes the static control to use the alternate flicker-free 
  459.    paint method. While no performance penalty is incurred for a 
  460.    few static controls, a dialog box filled with static controls 
  461.    with either of these flags set tends to slow down repainting. 
  462.    The MSS_SFXPAINT flag should only be used for moving text as 
  463.    flicker is not a problem with static text.
  464.  
  465.  
  466. STATIC STYLES:
  467.  
  468.  - Normal Text (default)
  469.  - Recessed Text
  470.  - Raised Text
  471.  - Shadowed Text (looks best in color because the shadow is dark gray)
  472.  - Splash Bitmap
  473.  - Splash Bitmap in a window (this style was used for the Object 
  474.                               Viewer splash panel)
  475.  
  476. PRIVATE MESSAGES:
  477.  
  478.  - You can use the any of the following messages (defined in 
  479.    SFX200.PAS and SFX200.H) with an SFX static control:
  480.       
  481.       - WM_SETBITMAP
  482.       - WM_SETBRUSH
  483.       - WM_SFXCTLCOLOR
  484.  
  485.  
  486. WM_SETBITMAP:
  487.  
  488.  - This message is used to change a splash bitmap. wParam is zero
  489.    and lParam points to a null terminated string that is the 
  490.    name of the new bitmap (ie character resource identifier) 
  491.  
  492.  
  493. WM_SETBRUSH:
  494.  
  495.  - There weren't enough flags left to include any for background 
  496.    color. So, to change a static control's background color you 
  497.    must send a WM_SETBRUSH message in response to a WM_SFXCTLCOLOR 
  498.    message. wParam is a handle to the background brush and lParam 
  499.    is zero. SFX200.DLL does not delete this brush handle. That's 
  500.    your responsibility. 
  501.  
  502.  
  503. WM_SFXCTLCOLOR:
  504.  
  505.  - This message is sent to its parent when an SFX control is about 
  506.    to be painted. It is analogous to the WM_CTLCOLOR message. 
  507.    wParam contains the static control's display context, the 
  508.    LOWORD of lParam contains the static control's handle and the 
  509.    HIWORD of lParam specifies a static control (SFXCTLCOLOR_STATIC).
  510.  
  511.       Pascal Example:
  512.          
  513.          procedure TMyWindow.WMSFXCtlColor (var Msg: TMessage);
  514.          begin
  515.            case Msg.lParamHi of
  516.              SFXCtlColor_Static:
  517.              begin
  518.                SetBkMode(Msg.wParam, Transparent);
  519.                SendMessage(Msg.lParamLo, wm_SetBrush, 
  520.                            GetSFXObject(Green_Brush), 0);
  521.              end;
  522.            end;
  523.          end;
  524.  
  525.       C++ 4.0 Example:
  526.  
  527.          LRESULT 
  528.          TMyWindow::EvSFXCtlColor(WPARAM wParam, LPARAM lParam)
  529.          {
  530.            if (HIWORD(lParam) == SFXCTLCOLOR_STATIC)
  531.            {
  532.               ::SetBkMode((HDC)wParam, TRANSPARENT);
  533.               ::SendMessage((HWND)LOWORD(lParam), WM_SETBRUSH, 
  534.                             (UINT)GetSFXObject(GREEN_BRUSH), 0);
  535.            }
  536.          }
  537.  
  538.  
  539. OBJECTWINDOWS CLASS:   TSFXStatic. 
  540.  
  541. ANCESTOR CLASS:   TStatic.
  542.  
  543. CONSTRUCTORS:
  544.  
  545.    Pascal:
  546.  
  547.       Init(AParent: PWindowsObject; AnID: Integer; ATitle: 
  548.            PChar; X, Y, W, H: Integer; ATextLen: Word);
  549.  
  550.       InitResource(AParent: PWindowsObject; ResourceID, 
  551.                    ATextLen: Word);
  552.  
  553.    C++ 4.0:
  554.  
  555.       TSFXStatic(TWindow* parent, int id, const char far* title,
  556.          int x, int y, int w, int h, UINT textLen,
  557.              TModule* module = 0);
  558.  
  559.       TSFXStatic(TWindow* parent, int resourceId, UINT textLen,
  560.                  TModule* module = 0);
  561.  
  562. PASCAL METHODS:
  563.  
  564.    function  GetClassName: PChar; virtual;
  565.       - returns the SFX static class name 'SFXSTATIC'.
  566.  
  567.  
  568. C++ 4.0 MEMBER FUNCTIONS:
  569.  
  570.    char far*  GetClassName();
  571.       - returns the SFX static class name "SFXSTATIC".
  572.  
  573.  
  574.  
  575. -------------------
  576. 4.  SHADE CONTROLS.
  577. -------------------
  578.  
  579. GLOBAL CLASS NAME:   SFXShade
  580.  
  581. FUNCTION:   Group Shades, Colored Panels and Dividers
  582.  
  583. NEW FEATURES:
  584.  
  585.  - Changed the MSH_NOCAPTION flag to the MSH_DEFFONT flag so 
  586.    that shade controls can display text in a fine font like
  587.    the other SFX controls: buttons, check boxes, radio buttons 
  588.    and static controls.
  589.  
  590.  
  591. FLAGS: 
  592.  
  593.  - The default flags for an SFX shade control are MSH_LEFT, MSH_LTGRAY and 
  594.    MSH_RECT. They specify a flat light gray colored rectangle. 
  595.  
  596.       MSH_LEFT            default.
  597.       MSH_LTGRAY          default.
  598.       MSH_RECT            default.
  599.       MSH_FRAME           specifies a frame.  
  600.       MSH_VLINE           specifies a vertical line. 
  601.       MSH_HLINE           specifies a horizontal line. 
  602.       MSH_RECESSED        draws a recessed rectangle or frame
  603.       MSH_RAISED          draws a raised rectangle or frame
  604.       MSH_BORSTYLE        draws the control in the Borland 
  605.                           3-dimensional style 
  606.       MSH_CENTER          centers the caption
  607.       MSH_RIGHT           aligns caption flush right
  608.       MSH_RECESSEDTEXT      draws the caption using recessed text
  609.       MSH_RAISEDTEXT      draws the caption using raised text
  610.       MSH_DEFFONT         displays text using a fine font
  611.       MSH_NOPREFIX        no prefix characters in caption
  612.       MSH_STEEL           The following flags specify the 
  613.       MSH_GLAZE           background color.
  614.       MSH_RED             
  615.       MSH_LIME            
  616.       MSH_BLUE            
  617.       MSH_MAGENTA         
  618.       MSH_MAROON          
  619.       MSH_GREEN           
  620.       MSH_NAVY            
  621.       MSH_PURPLE          
  622.       MSH_BLACK           
  623.       MSH_WINCOLOR        The background color is the color specified
  624.                           by COLOR_WINDOW.
  625.       MSH_TRANSPARENT     The background is transparent
  626.       MSH_VHUMP           MSH_VLINE + MSH_RAISED
  627.       MSH_VDIP            MSH_VLINE + MSH_RECESSED
  628.       MSH_HHUMP           MSH_HLINE + MSH_RAISED
  629.       MSH_HDIP            MSH_HLINE + MSH_RECESSED
  630.       MSH_RAISEDFRAME     MSH_RAISED + MSH_FRAME
  631.       MSH_RECESSEDFRAME   MSH_RECESSED + MSH_FRAME
  632.  
  633.  - Do not set the BS_GROUPBOX flag, TSFXShade doesn't use it.
  634.  
  635.  
  636. SHADE STYLES:
  637.  
  638.  - Rectangle
  639.  - Frame
  640.  - Vertical Line
  641.  - Horizontal Line
  642.  
  643.    The above styles has no effect unless the MSH_RAISED or 
  644.    MSH_RECESSED flag is also specified.     
  645.  
  646.  
  647. PRIVATE MESSAGES:
  648.  
  649.  - You can use the any of the following messages (defined in 
  650.    SFX200.PAS and SFX200.H) with an SFXShade control:
  651.       
  652.       - WM_SETBRUSH
  653.       - WM_SFXCTLCOLOR
  654.  
  655.  
  656. WM_SETBRUSH:
  657.  
  658.  - This message is sent in response to a WM_SFXCTLCOLOR message to 
  659.    change the shade control's background color. wParam is a handle 
  660.    to a new brush and lParam is zero. SFX200.DLL does not delete 
  661.    this brush handle. That's your responsibility! 
  662.  
  663.  
  664. WM_SFXCTLCOLOR:
  665.  
  666.  - This message is sent to a parent when an SFX control is about 
  667.    to be painted. It is analogous to the WM_CTLCOLOR message. 
  668.    wParam contains the shade control's display context, the 
  669.    LOWORD of lParam contains the shade control's handle and the 
  670.    HIWORD of lParam specifies a shade control (SFXCTLCOLOR_SHADE).
  671.  
  672.  
  673. OBJECTWINDOWS CLASS:   TSFXShade. 
  674.  
  675. ANCESTOR CLASS:   TGroupBox.
  676.  
  677. CONSTRUCTORS:
  678.  
  679.    Pascal:
  680.  
  681.       Init(AParent: PWindowsObject; AnID: Integer; AText: PChar; 
  682.            X, Y, W, H: Integer);
  683.       
  684.       InitResource (AParent: PWindowsObject; ResourceID: Word);
  685.  
  686.    C++ 4.0:
  687.  
  688.       TSFXShade(TWindow* parent, int id, const char far* text,
  689.               int X, int Y, int W, int H, TModule* module = 0);
  690.  
  691.       TSFXShade(TWindow* parent, int resourceId, TModule* module = 0);
  692.  
  693.  
  694. PASCAL METHODS:
  695.  
  696.    function  GetClassName: PChar; virtual;
  697.       - returns the SFX group box class name 'SFXSHADE'.
  698.  
  699.  
  700. C++ 4.0 MEMBER FUNCTIONS:
  701.  
  702.    char far*  GetClassName();
  703.       - returns the SFX group box class name "SFXSHADE".
  704.  
  705.  
  706.  
  707. ---------------------
  708. 5.  DIVIDERS.
  709. ---------------------
  710.  
  711. GLOBAL CLASS NAME:   SFXShade
  712.  
  713. FUNCTION:   Vertical and horizontal dividers. 
  714.  
  715. FLAGS: 
  716.  
  717.  - Uses the MSH_VHUMP, MSH_VDIP, MSH_HHUMP, MSH_HDIP and 
  718.    MSH_BORSTYLE shade flags to specify either a vertical or
  719.    horizontal divider.
  720.  
  721. OBJECTWINDOWS CLASS:   TSFXDivider.
  722.  
  723. ANCESTOR CLASS:   TControl
  724.  
  725. CONSTRUCTORS:
  726.  
  727.    Pascal:
  728.  
  729.       Init (AParent: PWindowsObject; AnID, X, Y, Length: Integer; 
  730.             IsVertical, IsHump, Borstyle: Boolean);
  731.  
  732.       InitResource (AParent: PWindowsObject; ResourceID: Word);
  733.  
  734.    C++ 4.0:
  735.  
  736.       TSFXDivider(TWindow* parent, int id, int x, int y, int length,
  737.                   BOOL isVertical, BOOL isHump, BOOL borStyle, 
  738.                   TModule* module = 0);
  739.  
  740.       TSFXDivider(TWindow* parent, int resourceId, TModule* module = 0);
  741.  
  742.  
  743. PASCAL METHODS:
  744.  
  745.    function  GetClassName: PChar; virtual;
  746.       - returns the SFX shade class name 'SFXSHADE'.
  747.  
  748.  
  749. C++ 4.0 MEMBER FUNCTIONS:
  750.  
  751.    char far*  GetClassName();
  752.       - returns the SFX shade class name "SFXSHADE".
  753.  
  754.  
  755.  
  756. -----------------
  757. 6.  CHECK BOXES.
  758. -----------------
  759.  
  760. GLOBAL CLASS NAME:   SFXCheck
  761.  
  762. FUNCTION:   Raised and recessed check boxes.
  763.  
  764. NEW FEATURES:
  765.  
  766.  - Flicker free painting  
  767.  
  768. FLAGS: 
  769.  
  770.  - SFX check boxes use the MBS_XXX button flags. The default style 
  771.    is MBS_AUTOCHECKBOX. Other styles are MBS_CHECKBOX, MBS_3STATE 
  772.    and MBS_AUTO3STATE. The MBS_LEFTTEXT flag aligns the check box 
  773.    text flush left and the check box flush right. The MBS_RAISED 
  774.    flag specifies a raised check box. The check mark in a recessed 
  775.    check box is a cross and in a raised check box its a tick. The 
  776.    MBS_XXX color flags (eg MBS_BLUE) set the check mark color. The 
  777.    default color is black. The MBS_DEFFONT flag draws the check box 
  778.    text using a fine font.
  779.  
  780.  
  781. CHECK BOX STYLES:
  782.  
  783.  - Check box
  784.  - Auto check box
  785.  - 3 State
  786.  - Auto 3 State
  787.  
  788.  
  789. PRIVATE MESSAGES:
  790.  
  791.  - You can use the any of the following messages (defined in 
  792.    SFX200.PAS and SFX200.H) with an SFXCheck control:
  793.       
  794.       - WM_SETPEN
  795.       - WM_SFXCTLCOLOR
  796.  
  797.  
  798. WM_SETPEN:
  799.  
  800.  - You can change the check mark color by sending a check 
  801.    box this message in response to a WM_SFXCTLCOLOR message. 
  802.    wParam is a handle to a new pen and lParam is zero. 
  803.    SFX200.DLL does not delete this pen handle, that's your 
  804.    responsibility! 
  805.  
  806.  
  807. WM_SFXCTLCOLOR:
  808.  
  809.  - This message is sent to a parent when an SFX control is about 
  810.    to be painted. It is analogous to the WM_CTLCOLOR message. 
  811.    wParam contains the check box's display context, the 
  812.    LOWORD of lParam contains its window handle and the 
  813.    HIWORD of lParam specifies a check box control 
  814.    (SFXCTLCOLOR_CHECK). 
  815.  
  816.       Pascal Example:
  817.          
  818.          procedure TMyWindow.WMSFXCtlColor (var Msg: TMessage);
  819.          begin
  820.            case Msg.lParamHi of
  821.              SFXCtlColor_Check:
  822.              begin
  823.                SetBkMode(Msg.wParam, Transparent);
  824.                SetTextColor(Msg.wParam, RGB(0,0,128));
  825.                SendMessage(Msg.lParamLo, wm_SetPen, 
  826.                            GetSFXObject(Green_Pen), 0);
  827.              end;
  828.            end;
  829.          end;
  830.  
  831.       C++ 4.0 Example:
  832.  
  833.          LRESULT 
  834.          TMyWindow::EvSFXCtlColor(WPARAM wParam, LPARAM lParam)
  835.          {
  836.            if (HIWORD(lParam) == SFXCTLCOLOR_CHECK)
  837.            {
  838.               ::SetBkMode((HDC)wParam, TRANSPARENT);
  839.               ::SetTextColor((HDC)wParam, TColor(0, 0, 128));
  840.               ::SendMessage((HWND)LOWORD(lParam), WM_SETPEN, 
  841.                             (UINT)GetSFXObject(GREEN_PEN), 0);
  842.            }
  843.          }
  844.  
  845.  
  846. OBJECTWINDOWS CLASS:   TSFXCheckBox. 
  847.  
  848. ANCESTOR CLASS:   TCheckBox.
  849.  
  850. CONSTRUCTORS:
  851.  
  852.    Pascal:
  853.  
  854.       Init(AParent: PWindowsObject; AnID: Integer; ATitle: PChar; 
  855.            X, Y, W, H: Integer; AGroup: PGroupBox);
  856.       
  857.       InitResource (AParent: PWindowsObject; ResourceID: Word);
  858.  
  859.    C++ 4.0:
  860.  
  861.       TSFXCheckBox(TWindow* parent, int id, const char far* title,
  862.            int x, int y, int w, int h, TGroupBox* group,
  863.                    TModule* module = 0);
  864.  
  865.       TSFXCheckBox(TWindow* parent, int resourceId, TGroupBox* group,
  866.                    TModule* module = 0);
  867.  
  868. PASCAL METHODS:
  869.  
  870.    function  GetClassName: PChar; virtual;
  871.       - returns the SFX check box class name 'SFXCHECK'.
  872.  
  873.  
  874. C++ 4.0 MEMBER FUNCTIONS:
  875.  
  876.    char far*  GetClassName();
  877.       - returns the SFX check box class name "SFXCHECK".
  878.  
  879.  
  880.  
  881. -----------------
  882. 7.  RADIOBUTTONS.
  883. -----------------
  884.  
  885. GLOBAL CLASS NAME:   SFXRadio
  886.  
  887. FUNCTION:   Radio buttons
  888.  
  889. NEW FEATURES:
  890.  
  891.  - Flicker free painting
  892.  
  893.  - Changed the radio buttons so that the check mark 
  894.    appears on the left mouse button down message not the left 
  895.    button up message. This makes SFX radio buttons work 
  896.    better.
  897.  
  898.  
  899. FLAGS: 
  900.  
  901.  - SFX radio buttons use the MBS_XXX button flags. The default 
  902.    style is MBS_AUTORADIOBUTTON. The MBS_LEFTTEXT flag aligns the 
  903.    radio button text flush left and the radio button flush right. 
  904.    The MBS_RAISED flag specifies a raised radio button. The 
  905.    MBS_XXX color flags (eg MBS_YELLOW) set the check mark color. 
  906.    The default color is black. The MBS_DEFFONT flag draws the radio
  907.    button text using a fine font
  908.  
  909. RADIOBUTTON STYLES:
  910.  
  911.  - Radiobutton
  912.  - Auto Radiobutton
  913.  
  914.  
  915. PRIVATE MESSAGES:
  916.  
  917.  - You can use the any of the following messages (defined in 
  918.    SFX200.PAS and SFX200.H) with an SFXRadio control:
  919.       
  920.       - WM_SETBRUSH
  921.       - WM_SFXCTLCOLOR
  922.  
  923.  
  924. WM_SETBRUSH:
  925.  
  926.  - You can change the check mark color by sending a 
  927.    radio button this message in response to a WM_SFXCTLCOLOR 
  928.    message. wParam is a handle to a new brush and lParam is
  929.    zero. SFX200.DLL does not delete this brush handle. That's
  930.    your responsibility! 
  931.  
  932.  
  933. WM_SFXCTLCOLOR:
  934.  
  935.  - This message is sent to a parent when an SFX control is about 
  936.    to be painted. It is analogous to the WM_CTLCOLOR message. 
  937.    wParam contains the radio button's display context, the 
  938.    LOWORD of lParam contains its window handle and the 
  939.    HIWORD of lParam specifies the a radio button control 
  940.    (SFXCTLCOLOR_RADIO). 
  941.  
  942.       Pascal Example:
  943.          
  944.          procedure TMyWindow.WMSFXCtlColor (var Msg: TMessage);
  945.          begin
  946.            case Msg.lParamHi of
  947.              SFXCtlColor_Radio:
  948.              begin
  949.                SetBkMode(Msg.wParam, Transparent);
  950.                SetTextColor(Msg.wParam, RGB(255,0, 0));
  951.                SendMessage(Msg.lParamLo, wm_SetBrush, 
  952.                            GetSFXObject(Yellow_Brush), 0);
  953.              end;
  954.            end;
  955.          end;
  956.  
  957.       C++ 4.0 Example:
  958.  
  959.          LRESULT
  960.          TMyWindow::EvSFXCtlColor(WPARAM wParam, LPARAM lParam)
  961.          {
  962.            if (HIWORD(lParam) == SFXCTLCOLOR_RADIO)
  963.            {
  964.               ::SetBkMode((HDC)wParam, TRANSPARENT);
  965.               ::SetTextColor((HDC)wParam, TColor(255, 0, 0));
  966.               ::SendMessage((HWND)LOWORD(lParam), WM_SETBRUSH, 
  967.                             (UINT)GetSFXObject(YELLOW_BRUSH), 0);
  968.            }
  969.          }
  970.  
  971.  
  972. OBJECTWINDOWS CLASS:   TSFXRadioButton.
  973.  
  974. ANCESTOR CLASS:   TRadioButton
  975.  
  976. CONSTRUCTORS:
  977.  
  978.    Pascal:
  979.  
  980.       Init(AParent: PWindowsObject; AnID: Integer; ATitle: PChar; 
  981.            X, Y, W, H: Integer; AGroup: PGroupBox);
  982.       
  983.       InitResource (AParent: PWindowsObject; ResourceID: Word);
  984.  
  985.    C++ 4.0:
  986.  
  987.       TSFXRadioButton(TWindow* parent, int id, const char far* title,
  988.               int x, int y, int w, int h, TGroupBox* group,
  989.                       TModule* module = 0);
  990.  
  991.       TSFXRadioButton(TWindow* parent, int resourceId, TGroupBox* group,
  992.                       TModule* module = 0);
  993.  
  994. PASCAL METHODS:
  995.  
  996.    function  GetClassName: PChar; virtual;
  997.       - returns the SFX radio button class name 'SFXRADIO'.
  998.  
  999.  
  1000. C++ 4.0 MEMBER FUNCTIONS:
  1001.  
  1002.    char far*  GetClassName();
  1003.       - returns the SFX radio button class name "SFXRADIO".
  1004.  
  1005.  
  1006.  
  1007. -----------------
  1008. 8.  SCROLL BARS.  
  1009. -----------------
  1010.  
  1011. GLOBAL CLASS NAME:   SFXScrollBar
  1012.  
  1013. FUNCTION:   3-Dimensional Scroll Bars 
  1014.  
  1015. FLAGS: 
  1016.  
  1017.  - The SFX scroll bar flags MSB_HORZ, MSB_VERT, MSB_TOPLEFT and 
  1018.    MSB_BOTTOMRIGHT have the same value and meaning as the 
  1019.    corresponding standard Windows' scroll bar flags.
  1020.  
  1021.  
  1022. SCROLLBAR STYLES:
  1023.  
  1024.  - An SFX scroll bar is a subclass of the standard Windows scroll 
  1025.    bar. It implements all the standard scroll bar behaviour and 
  1026.    draws a 3D border around the edge of the scroll bar, on the 
  1027.    parent display context. An SFX scroll bar is used in exactly 
  1028.    the way as the standard Windows scroll bar.
  1029.  
  1030.  
  1031. NOTE:
  1032.  
  1033.  - Because the 3D border is drawn on the parent's display context 
  1034.    the border may not draw properly inside an SFXShade control.
  1035.    If you experience problems either set the shade's background color 
  1036.    to TRANSPARENT or use a standard Windows scroll bar (+/- inside 
  1037.    another SFX shade control).
  1038.  
  1039.  
  1040. OBJECTWINDOWS CLASS:   TSFXScrollBar.
  1041.  
  1042. ANCESTOR CLASS:   TScrollBar
  1043.  
  1044. CONSTRUCTORS:
  1045.  
  1046.    Pascal:
  1047.  
  1048.       Init(AParent: PWindowsObject; AnID: Integer; X, Y, W, H: Integer; 
  1049.            IsHScrollBar: Boolean);
  1050.       
  1051.       InitResource (AParent: PWindowsObject; ResourceID: Word);
  1052.  
  1053.    C++ 4.0:
  1054.  
  1055.       TSFXScrollBar(TWindow* parent, int id, int x, int y, int w, int h,
  1056.                 BOOL isHScrollBar, TModule* module = 0);
  1057.  
  1058.       TSFXScrollBar(TWindow* parent, int resourceId, TModule*   module = 0);
  1059.  
  1060.  
  1061. PASCAL METHODS:
  1062.  
  1063.    function  GetClassName: PChar; virtual;
  1064.       - returns the SFX scroll bar class name 'SFXSCROLLBAR'.
  1065.  
  1066.  
  1067. C++ 4.0 MEMBER FUNCTIONS:
  1068.  
  1069.    char far*  GetClassName();
  1070.       - returns the SFX scroll bar class name "SFXSCROLLBAR".
  1071.  
  1072.  
  1073. -------------------
  1074. 9.  EDIT CONTROLS.  
  1075. -------------------
  1076.  
  1077. GLOBAL CLASS NAME:   SFXEdit
  1078.  
  1079. FUNCTION:   3-Dimensional Edit Controls 
  1080.  
  1081. FLAGS: 
  1082.  
  1083.  - An SFX edit control uses the same flags as the standard Windows 
  1084.    edit control. 
  1085.  
  1086.  
  1087. SCROLLBAR STYLES:
  1088.  
  1089.  - An SFX edit control is a subclass of the standard Windows edit 
  1090.    control. It implements all the standard edit control behaviour 
  1091.    and draws a 3D border around the edge of the edit control, on 
  1092.    the parent display context. An SFX edit control is used in 
  1093.    exactly the same way as the standard Windows edit control.
  1094.  
  1095.  
  1096. NOTE:
  1097.  
  1098.  - Because the 3D border is drawn on the parent's display context 
  1099.    the border may not draw properly inside an SFXShade control.
  1100.    If you experience problems either set the shade's background color 
  1101.    to TRANSPARENT or use a standard Windows edit control (+/- inside 
  1102.    another SFX shade control).
  1103.  
  1104.  
  1105. OBJECTWINDOWS CLASS:   TSFXEdit.
  1106.  
  1107. ANCESTOR CLASS:   TEdit
  1108.  
  1109. CONSTRUCTORS:
  1110.  
  1111.    Pascal:
  1112.  
  1113.       Init(AParent: PWindowsObject; AnID: Integer; ATitle: PChar; 
  1114.            X, Y, W, H: Integer; ATextLen: Integer; Multiline: Boolean);
  1115.       
  1116.       InitResource (AParent: PWindowsObject; ResourceID: Word;
  1117.                     ATextLen: Word);
  1118.  
  1119.    C++ 4.0:
  1120.  
  1121.       TSFXEdit(TWindow* parent, int id, const char far* text,
  1122.            int x, int y, int w, int h, UINT textLen = 0,
  1123.            BOOL multiline = FALSE, TModule* module = 0);
  1124.  
  1125.       TSFXEdit(TWindow* parent, int  resourceId, UINT textLen = 0,
  1126.                TModule* module = 0);
  1127.  
  1128. PASCAL METHODS:
  1129.  
  1130.    function  GetClassName: PChar; virtual;
  1131.       - returns the SFX edit control class name 'SFXEDIT'.
  1132.  
  1133.  
  1134. C++ 4.0 MEMBER FUNCTIONS:
  1135.  
  1136.    char far*  GetClassName();
  1137.       - returns the SFX edit control class name "SFXEDIT".
  1138.  
  1139.  
  1140.  
  1141. ----------------
  1142. 10.  LIST BOXES.  
  1143. ----------------
  1144.  
  1145. GLOBAL CLASS NAME:   SFXListBox
  1146.  
  1147. FUNCTION:   3-Dimensional list boxes, right mouse button only 
  1148.             multiple selection list boxes and list edit boxes. 
  1149.  
  1150.  
  1151. NEW FEATURES:
  1152.  
  1153.  - Added the new LBS_NO3DBORDER flag.
  1154.  
  1155.  
  1156. FLAGS: 
  1157.  
  1158.  - An SFX list box uses the same flags as the standard Windows 
  1159.    list box as well as three new flags: LBS_SFXLISTEDIT, 
  1160.    LBS_SFXMULTIPLESEL, LBS_NO3DBORDER.
  1161.  
  1162.  
  1163. LIST BOX STYLES:
  1164.  
  1165.  - An SFX list box is a subclass of the standard Windows list 
  1166.    box. It implements all the standard list box  behaviour and 
  1167.    draws a 3D border around the edge of the list box, on the 
  1168.    parent display context. An SFX list box can be used in exactly 
  1169.    the way as the standard Windows list box or with one of the 
  1170.    three SFX extended styles: LBS_SFXLISTEDIT, LBS_SFXMULTIPLESEL
  1171.    and LBS_NO3DBORDER.
  1172.  
  1173.  
  1174. LBS_SFXLISTEDIT:
  1175.  
  1176.  - This style of list box lets the user edit list box items in a 
  1177.    popup edit control. It supports multiple column list boxes but 
  1178.    not multiple selection list boxes.
  1179.  
  1180.  - The following keys are recognised by an SFX list box when 
  1181.    the LBS_SFXLISTEDIT style flag is set:
  1182.  
  1183.    Edit mode inactive (list box only):
  1184.  
  1185.       Key(s)      Function
  1186.       -------------------------------------------------------
  1187.       Backspace   Deletes previous item.
  1188.       Delete      Deletes current item.
  1189.       Insert      Inserts new (empty) item at current position and
  1190.                   enters edit mode.
  1191.       Return      Enters edit mode at currently selected position.
  1192.       Space bar   Enters edit mode at currently selected position.
  1193.  
  1194.  
  1195.    Edit mode active (popup edit control displayed):
  1196.  
  1197.       Key(s)      Function
  1198.       -------------------------------------------------------
  1199.       Backspace   If item is empty deletes item. If caret is at 
  1200.                   beginning of item it moves to end of previous 
  1201.                   item otherwise it deletes character to the left 
  1202.                   of caret.
  1203.  
  1204.       Delete      If item is empty it deletes item. Otherwise it 
  1205.                   deletes the character to the right of caret.
  1206.       Insert      Inserts new (empty) item at the current position 
  1207.                   and enters edit mode.
  1208.       Return      Exits edit mode and moves to next item.
  1209.       Left arrow  Moves caret to previous character. If caret is 
  1210.                   at beginning of item it moves to end of previous 
  1211.                   item.
  1212.       Right arrow Moves caret to next character. If caret is at end
  1213.                   of item it moves to beginning of next item.
  1214.       Up arrow    Moves to previous item, maintaining caret position.
  1215.       Down arrow  Moves to next item, maintaining caret position.
  1216.       Page up     Moves to top item, maintaining caret position.
  1217.       Page down   Moves to bottom item, maintaining caret position.
  1218.  
  1219.  
  1220.  - The following mouse messages are recognised by an SFX list 
  1221.    box when the LBS_SFXLISTEDIT style flag is set:
  1222.  
  1223.  
  1224.    Edit mode inactive (list box only):
  1225.  
  1226.       Message           Function
  1227.       --------------------------------------------------------
  1228.       WM_LBUTTONDBLCLK  Enters edit mode at selected position.
  1229.    
  1230.  
  1231.    Edit mode active (popup edit control displayed):
  1232.  
  1233.       Message           Function
  1234.       --------------------------------------------------------
  1235.       WM_LBUTTONDOWN    If cursor is outside current item edit 
  1236.                         mode moves to selected item
  1237.       WM_LBUTTONDBLCLK  Exits edit mode.
  1238.  
  1239.  
  1240. LBS_SFXMULTIPLESEL:
  1241.  
  1242.  - This style of list box lets the user select multiple items with 
  1243.    the right mouse button but only single items with the left mouse 
  1244.    key. The right mouse button up and down messages are not 
  1245.    passed on so you can't trap them. These messages and WM_MOUSEMOVE 
  1246.    are used to provide right mouse button multiple selection.
  1247.  
  1248.  
  1249. LBS_NO3DBORDER:
  1250.  
  1251.  - This style lets you use an extended SFX list box style 
  1252.    without a 3D border. 
  1253.  
  1254.  
  1255. NOTE:
  1256.  
  1257.  - Because the 3D border is drawn on the parent display context 
  1258.    the border may not draw properly inside an SFXShade control.
  1259.    If you experience problems either set the shade's background color 
  1260.    to TRANSPARENT or specify the new LBS_NO3DBORDER style.
  1261.  
  1262.  
  1263. PRIVATE MESSAGES:
  1264.  
  1265.  - There are two private messages used to turn edit mode on and 
  1266.    off in an list edit box. It is not recommended that you use 
  1267.    these messages.
  1268.  
  1269.     - LB_LISTEDITON: wParam should be zero and lParam should be
  1270.       the same as lParam in the EM_SETSEL message. This message 
  1271.       is used to display the edit control.
  1272.  
  1273.     - LB_LISTEDITOFF: wParam and lParam should be zero.
  1274.  
  1275.  
  1276. OBJECTWINDOWS CLASS:   TSFXListBox.
  1277.  
  1278. ANCESTOR CLASS:   TListBox
  1279.  
  1280. CONSTRUCTORS:
  1281.  
  1282.    Pascal:
  1283.  
  1284.       Init(AParent: PWindowsObject; AnID: Integer; X, Y, W, H: Integer);
  1285.       
  1286.       InitResource (AParent: PWindowsObject; ResourceID: Word);
  1287.  
  1288.    C++ 4.0:
  1289.  
  1290.       TSFXListBox(TWindow* parent, int id, int x, int y, int w, int h,
  1291.                   TModule* module = 0);
  1292.  
  1293.       TSFXListBox(TWindow* parent, int resourceId, TModule*   module = 0);
  1294.  
  1295. PASCAL METHODS:
  1296.  
  1297.    function  GetClassName: PChar; virtual;
  1298.       - returns the SFX list box class name 'SFXLISTBOX'.
  1299.  
  1300. C++ 4.0 MEMBER FUNCTIONS:
  1301.  
  1302.    char far*  GetClassName();
  1303.       - returns the SFX list box class name "SFXLISTBOX".
  1304.  
  1305.  
  1306.  
  1307. -----------------
  1308. 11.  COMBO BOXES.
  1309. -----------------
  1310.  
  1311. GLOBAL CLASS NAME:   SFXComboBox
  1312.  
  1313. FUNCTION:   3-Dimensional Combo Boxes 
  1314.  
  1315. FLAGS: 
  1316.  
  1317.  - An SFX combo box uses the same flags as the standard Windows 
  1318.    combo box as well as one new flag: CBS_NO3DBORDER. 
  1319.  
  1320.  
  1321. COMBO BOX STYLES:
  1322.  
  1323.  - An SFX combo box is a subclass of the standard Windows combo 
  1324.    box. It implements all the standard combo box behaviour and 
  1325.    a 3D border around the edge of the combo box, on the parent 
  1326.    display context. An SFX combo box can be used in exactly the 
  1327.    way as the standard Windows combo box.
  1328.  
  1329.  
  1330. NOTE:
  1331.  
  1332.  - Because the 3D border is drawn on the parent display context 
  1333.    the border may not draw properly inside an SFXShade control.
  1334.    If you experience problems either set the shade's background color 
  1335.    to TRANSPARENT or specify the new CBS_NO3DBORDER style.
  1336.  
  1337.  
  1338. WM_CTLCOLOR:
  1339.  
  1340.  - A new CTLCOLOR_XXX constant (CTLCOLOR_COMBOBOX) has been added to 
  1341.    SFX200.DLL and is defined in SFX200.PAS and SFX200.H. You can 
  1342.    trap this message and use the return value to set the color of 
  1343.    the edit control and list box. 
  1344.  
  1345.       Pascal Example:
  1346.          
  1347.          procedure TMyWindow.WMCtlColor (var Msg: TMessage);
  1348.          begin
  1349.            case Msg.lParamHi of
  1350.              CtlColor_Combo:
  1351.              begin
  1352.                SetBkMode(Msg.wParam, Transparent);
  1353.                Msg.Result := GetSFXObject(PokerDot_Brush);
  1354.              end;
  1355.            end;
  1356.          end;
  1357.  
  1358.       C++ 4.0 Example:
  1359.  
  1360.          HBRUSH
  1361.          TMyWindow::EvCtlColor(HDC hDC, HWND hWndChild, UINT ctlType)
  1362.          {
  1363.            switch (ctlType) 
  1364.            {
  1365.               case CTLCOLOR_COMBO:
  1366.                 SetBkMode(hDC, TRANSPARENT);
  1367.                 return (HBRUSH)GetSFXObject(POKERDOT_BRUSH);
  1368.                
  1369.               default:
  1370.                 return TDialog::EvCtlColor(hDC, hWndChild, ctlType);
  1371.            }
  1372.          }
  1373.  
  1374.  
  1375. PRIVATE MESSAGES:
  1376.  
  1377.  - You can use the any of the following messages (defined in 
  1378.    SFX200.PAS and SFX200.H) with an SFXComboBox control:
  1379.       
  1380.       - WM_SETBRUSH
  1381.       - WM_SFXCTLCOLOR
  1382.  
  1383.  
  1384. WM_SETBRUSH:
  1385.  
  1386.  - This message is used for a special purpose. Otherwise it has no 
  1387.    effect. When you display a drop down combo box in a window or 
  1388.    dialog box there's an unsightly gap between the right-hand end 
  1389.    of the combo box's edit control and the button that displays 
  1390.    the drop down list. You can use WM_SETBRUSH to fill in the gap 
  1391.    with the window or dialog box background brush. wParam is a
  1392.    handle to the background brush and lParam is zero. The default 
  1393.    brush is light gray.
  1394.  
  1395.  
  1396. WM_SFXCTLCOLOR:
  1397.  
  1398.  - This message is sent to a parent when an SFX control is about 
  1399.    to be painted. It is analogous to the WM_CTLCOLOR message. 
  1400.    wParam contains the combo box's display context, the 
  1401.    LOWORD of lParam contains its window handle and the 
  1402.    HIWORD of lParam specifies the a combo box control 
  1403.    (SFXCTLCOLOR_COMBO). 
  1404.  
  1405.       Pascal Example:
  1406.          
  1407.          procedure TMyWindow.WMSFXCtlColor (var Msg: TMessage);
  1408.          begin
  1409.            case Msg.lParamHi of
  1410.              SFXCtlColor_Combo:
  1411.              begin
  1412.                SetBkMode(Msg.wParam, Transparent);
  1413.                SendMessage(Msg.lParamLo, wm_SetBrush, 
  1414.                            GetSFXObject(Steel_Brush), 0);
  1415.              end;
  1416.            end;
  1417.          end;
  1418.  
  1419.       C++ 4.0 Example:
  1420.  
  1421.          LRESULT
  1422.          TMyWindow::EvSFXCtlColor(WPARAM wParam, LPARAM lParam)
  1423.          {
  1424.            if (HIWORD(lParam) == SFXCTLCOLOR_COMBO)
  1425.            {
  1426.               ::SetBkMode((HDC)wParam, TRANSPARENT);
  1427.               ::SendMessage((HWND)LOWORD(lParam), WM_SETBRUSH, 
  1428.                             (UINT)GetSFXObject(STEEL_BRUSH), 0);
  1429.            }
  1430.          }
  1431.  
  1432.  
  1433. OBJECTWINDOWS CLASS:   TSFXComboBox.
  1434.  
  1435. ANCESTOR CLASS:   TComboBox
  1436.  
  1437. CONSTRUCTORS:
  1438.  
  1439.    Pascal:
  1440.  
  1441.       Init(AParent: PWindowsObject; AnID: Integer; X, Y, W, H: Integer
  1442.            AStyle, ATextLen: Word);
  1443.       
  1444.       InitResource (AParent: PWindowsObject; ResourceID: Word; 
  1445.                     ATextLen: Word);
  1446.  
  1447.    C++ 4.0:
  1448.  
  1449.       TSFXComboBox(TWindow* parent, int id, int x, int y, int w, int h,
  1450.            DWORD style, UINT textLen, TModule* module = 0);
  1451.  
  1452.       TSFXComboBox(TWindow* parent, int resourceId, UINT textLen = 0,
  1453.                    TModule* module = 0);
  1454.  
  1455. PASCAL METHODS:
  1456.  
  1457.    function  GetClassName: PChar; virtual;
  1458.       - returns the SFX combo box class name 'SFXCOMBOBOX'.
  1459.  
  1460.  
  1461. C++ 4.0 MEMBER FUNCTIONS:
  1462.  
  1463.    char far*  GetClassName();
  1464.       - returns the SFX combo box class name "SFXCOMBOBOX".
  1465.  
  1466.  
  1467.  
  1468. --------------
  1469. 12.  TOOLBARS.
  1470. --------------
  1471.  
  1472. GLOBAL CLASS NAME:   SFXToolbar
  1473.  
  1474. FUNCTION:   Child Toolbars, Popup Toolbars, Button Panels and 
  1475.             Status Bars.
  1476.  
  1477. NEW FEATURES:
  1478.  
  1479.  - Added a status bar option (MTB_STATUS).  
  1480.  
  1481.  - Added 3D frames for child toolbars. It is not necessary to 
  1482.    specify WS_THICKFRAME or WS_EX_DLGMODALFRAME as the toolbar 
  1483.    automatically sets the WS_EX_DLGMODALFRAME flag. You only 
  1484.    need to specify MTB_3DFRAME when you want your child toolbar 
  1485.    to have a 3D frame (see Object Viewer).
  1486.  
  1487.  - Confined child toolbars to their parent's client area and popup 
  1488.    toolbars to Windows' desktop. Toolbars automatically realign 
  1489.    themselves within these areas when moved outside. This 
  1490.    realignment occurs in response to a WM_WINDOWPOSCHANGING 
  1491.    message, so don't override this message, always pass it on 
  1492.    for default processing.
  1493.  
  1494.  - Changed the toolbar system menu to display two items: Move and 
  1495.    Hide. The Hide menu item ID is SC_HIDE and is defined in 
  1496.    SFX200.PAS and SFX200.H. By adding a ShowWindow function (using 
  1497.    SW_NORMAL) to your program you can use this feature to show and 
  1498.    hide popup toolbars.
  1499.  
  1500.  
  1501. DESIGN PRINCIPLE:
  1502.  
  1503.  - Understanding the design principles behind the toolbar object 
  1504.    will help you to appreciate its versatility. 
  1505.  
  1506.  - One thing SFXToolbar was not designed to do is display a lot of 
  1507.    buttons. Since each button is in fact a separate SFXButton, 
  1508.    using too many buttons can slow down toolbar painting. About 
  1509.    twenty seems to be about the best average. (If you need to 
  1510.    display more of buttons you should think about using a memory 
  1511.    bitmap and display context, and drawing the toolbar yourself.)
  1512.  
  1513.  - SFXToolbar was designed as a multi-purpose toolbar object 
  1514.    that could be used as a popup toolbar, a child toolbar or a 
  1515.    status bar. It had to optionally display standard Borland-style 
  1516.    buttons so dialog box button panels could be created (like the 
  1517.    ones used in the common dialog box templates in SFX200.DLL), 
  1518.    and it had to be a control that could be added to a 
  1519.    dialog box in Resource Workshop. The only way to create a toolbar 
  1520.    as a RW control was to pass the real toolbar title and button 
  1521.    ID's in the toolbar's window text. 
  1522.  
  1523.  
  1524. FLAGS: 
  1525.  
  1526.  - The MTB_ROWXX (MTB_ROW1 to MTB_ROW15) and MTB_COLUMNXX 
  1527.    (MTB_COLUMN1 to MTB_COLUMN15) flags specify the number of 
  1528.    vertical rows and horizontal columns of buttons. While the 
  1529.    theoretical maximum is 225 (15 x 15) the actual maximum is the 
  1530.    number of button ID's that will fit into a 256 byte window 
  1531.    text string. This works out to be about 60. The MTB_TOP, 
  1532.    MTB_LEFT, MTB_RIGHT, MTB_BOTTOM, MTB_FLOAT and MTB_STATUS flags 
  1533.    specify the toolbar orientation (or style). The MTB_3DFRAME flag 
  1534.    draws a 3D frame around the toolbar. The MTB_FLUSH flag draws a 
  1535.    flush border around the toolbar (like SFXButton). The MTB_RADIO 
  1536.    flag makes the toolbar buttons behave as a set of mutually 
  1537.    exclusive radio buttons. This style was used in the Object 
  1538.    Viewer toolbar. The default toolbar button style is the 
  1539.    Borland-style bitmap button. Specifying the MTB_BITMAPBUTTON 
  1540.    flag uses the MBS_BITMAPBUTTON style.
  1541.  
  1542.  - To set up a toolbar you must at least specify an MTB_ROWXX, an
  1543.    MTB_COLUMNXX flag and one of the style flags MTB_TOP, MTB_LEFT, 
  1544.    MTB_RIGHT, MTB_BOTTOM, MTB_FLOAT or MTB_STATUS. The other 
  1545.    flags are optional.
  1546.  
  1547.  
  1548. BITMAP RESOURCE IDENTIFIERS:
  1549.  
  1550.  - Bitmap ID's for the toolbar buttons should follow the Borland 
  1551.    numbering system:
  1552.  
  1553.       1000 + button ID  (up bitmap)
  1554.       3000 + button ID  (down bitmap)
  1555.       5000 + button ID  (focussed bitmap)
  1556.    
  1557.    CGA and EGA bitmaps are not supported.
  1558.  
  1559.  
  1560. TOOLBAR BUTTON ID'S:
  1561.  
  1562.  - Button ID's should be between 100 and 999. Numbers 0 to 99 are 
  1563.    reserved for use by SFX200.DLL. The help button ID is 8 not 
  1564.    998. The previous conflict that occurred with Borland's help 
  1565.    button ID in RC files has been fixed in the new version of 
  1566.    SFX200.H. ID's 1 to 11 display one of the standard bitmap 
  1567.    buttons in SFX200.DLL. 
  1568.  
  1569.  - The button ID's should be unique in the dialog or window.
  1570.  
  1571.  
  1572. BUTTON SIZE:
  1573.  
  1574.  - The size of the first button's bitmap is used to set the size 
  1575.    of the toolbar buttons and the toolbar. If the default Borland-
  1576.    style buttons are used the toolbar buttons are the same size as 
  1577.    the first bitmap. If the MTB_BITMAPBUTTON style is used the buttons 
  1578.    are 6 pixles bigger in width and height than the first bitmap - 
  1579.    to make room for the button border. 
  1580.  
  1581.  
  1582. THE TOOLBAR TITLE:
  1583.  
  1584.  - To set up a toolbar with 4 single-bitmap buttons using the 
  1585.    ID's 101, 102, 103 and 104 you must use 4 bitmaps with the ID's 
  1586.    1101, 1102, 1103 and 1104. You pass all the button ID's in the 
  1587.    toolbar's title, separated from the 'real' toolbar title and 
  1588.    each other by a comma. (eg Tools,101,102,103,104) 
  1589.  
  1590.  - Before a toolbar is displayed it parses the window title. 
  1591.    All the characters in the title up to the first comma are 
  1592.    displayed as the 'real' toolbar title. If the toolbar has no 
  1593.    caption you can use a '?' instead. If you use a question mark 
  1594.    with a popup toolbar the caption will be blank. 
  1595.    (eg ?,101,102,103,104)
  1596.  
  1597.  - The original window text is stored in global memory and can be 
  1598.    retrieved using the GetWindowWord function and the index 
  1599.    MTB_WNDTEXT. The global text string is updated if any of the 
  1600.    buttons ID's (and bitmaps) are changed.
  1601.  
  1602.  
  1603. TOOLBAR STYLES:
  1604.  
  1605.  - There are six toolbar styles:
  1606.  
  1607.     - a top aligned toolbar,
  1608.     - a left aligned toolbar,
  1609.     - a right aligned toolbar,
  1610.     - a bottom aligned toolbar,
  1611.     - a floating toolbar
  1612.     - and a status bar
  1613.  
  1614.  
  1615. ALIGNED TOOLBARS:
  1616.  
  1617.  - An aligned toolbar aligns itself either along the top, left 
  1618.    right or bottom edge of its parent's client area. A static 
  1619.    control is created to fill in the gap between the last button 
  1620.    and the opposite edge of the client area. The window handle of 
  1621.    the static control can be retrieved using the GetWindowWord 
  1622.    function and the index MTB_WNDSTATIC (eg to set the status bar 
  1623.    text). 
  1624.  
  1625.  - You need to send the toolbar a WM_ALIGNTOOLBAR message 
  1626.    every time its parent is resized. The ObjectWindows TSFXToolbar 
  1627.    object has an 'AlignToolbar' function that sends this message for 
  1628.    you.
  1629.  
  1630.  - In response to a WM_ALIGNTOOLBAR message a toolbar realigns 
  1631.    and redraws itself. Left and top aligned toolbars redraw only 
  1632.    that part of the toolbar that has changed. Right and bottom 
  1633.    aligned toolbars and status bars redraw the entire toolbar. 
  1634.  
  1635.  - The only way to change the alignment of a toolbar is to destroy 
  1636.    it and create a new one in the required position (this is how 
  1637.    the Object Viewer does it.)
  1638.   
  1639.  
  1640. STATUS BARS:
  1641.  
  1642.  - A status bar is just a 'reversed' bottom-aligned toolbar that  
  1643.    lets you display text on the left and some buttons on the 
  1644.    right. You will need to set the status bar font if you don't 
  1645.    want to use Windows' default system font. You can retrieve the 
  1646.    window handle of the static control using 'GetWindowWord', if 
  1647.    you want to send the static control a WM_SETFONT message. The 
  1648.    ObjectWindows TSFXToolbar object has a 'SetFont' function that 
  1649.    sends this message for you.
  1650.  
  1651.  - You can use tab characters to space out the text displayed 
  1652.    in a status bar, eg "\t" in C++ and "#9" in Pascal.
  1653.  
  1654.  
  1655. FLOATING TOOLBARS:
  1656.  
  1657.  - A floating toolbar is either a child toolbar displayed somewhere 
  1658.    inside its parent's client area or a popup toolbar. Floating 
  1659.    toolbars can have a caption and/or a 3D frame. A floating 
  1660.    toolbar will be fixed if it has no caption.
  1661.  
  1662.  
  1663. RADIOBUTTON STYLE TOOLBARS:
  1664.  
  1665.  - By specifying the MTB_RADIO flag you force the toolbar 
  1666.    buttons to operate as a mutually exclusive set of radio buttons.
  1667.  
  1668.  
  1669. KEYBOARD INTERFACE:
  1670.  
  1671.  - The following keys are recognised by an SFX toolbar when 
  1672.    it has the input focus.
  1673.  
  1674.       Key(s)      Function
  1675.       -------------------------------------------------------
  1676.       Up arrow    Moves focus to previous tool.
  1677.       Left arrow  Moves focus to previous tool.
  1678.       Right arrow Moves focus to next tool.
  1679.       Down arrow  Moves focus to next tool.
  1680.       Space bar   Selects tool that has the input focus. Same 
  1681.                   as selecting tool with left mouse button.
  1682.  
  1683.    To visually appreciate the changing focus you will need to 
  1684.    supply a focussed bitmap (5000 + button ID) for each toolbar 
  1685.    button.
  1686.  
  1687.  - A 'child toolbar with a caption' doesn't recognise the 
  1688.    WS_TABSTOP and WS_GROUP styles, so the tab key wont work. This 
  1689.    is because the WS_TABSTOP style is the same as WS_MINIMIZEBOX 
  1690.    and WS_GROUP is the same as the WS_MAXIMIZEBOX. Specifying 
  1691.    either WS_TABSTOP or WS_GROUP would cause a minimize and/or 
  1692.    maximize box to appear in the child toolbar's caption. Since 
  1693.    this is inappropriate these flags have been disabled. This 
  1694.    toolbar style was used in the Object Viewer's 'Message and 
  1695.    Input Boxes' dialog box. 
  1696.  
  1697.  
  1698. WM_COMMAND:
  1699.  
  1700.  - For convenience, the WM_COMMAND message created when a toolbar 
  1701.    button is pressed is processed by the toolbar first then passed 
  1702.    onto the toolbar's parent. You can either respond to a toolbar 
  1703.    button's BN_CLICKED notification in the toolbar's message response 
  1704.    or its parent's. wParam contains the control ID, LOWORD(lParam) 
  1705.    contains the button handle and HIWORD(lParam) contains the 
  1706.    BN_CLICKED notification code.
  1707.  
  1708.  
  1709. WM_RBUTTONDOWN and WM_MOUSEMOVE:
  1710.  
  1711.  - For convenience a toolbar button passes both its WM_RBUTTONDOWN 
  1712.    and WM_MOUSEMOVE messages to the toolbar, after its processed 
  1713.    them. The LOWORD of lParam contains the x-coordinate and the 
  1714.    HIWORD of lParam contains the y-coordinate of the cursor 
  1715.    position in 'TOOLBAR CLIENT AREA COORDINATES', not button 
  1716.    coordinates. You can use the 'ChildWindowFromPoint' function 
  1717.    to retrieve the window handle of the button in this position
  1718.  
  1719.  
  1720. PRIVATE MESSAGES:
  1721.  
  1722.  - You can use the any of the following messages (defined in 
  1723.    SFX200.PAS and SFX200.H) with an SFXToolbar object:
  1724.       
  1725.       - WM_ALIGNTOOLBAR (realigns an aligned toolbar) 
  1726.       - WM_GETCHECK     (radiobutton style toolbars only)
  1727.       - WM_SETCHECK     (radiobutton style toolbars only)
  1728.       - WM_SETBITMAP
  1729.  
  1730.    The ObjectWindows TSFXToolbar class has functions that send 
  1731.    these messages for you.
  1732.  
  1733.  
  1734. WM_GETCHECK:
  1735.  
  1736.  - This message retrieves the check state of a toolbar button. 
  1737.    wParam is the ID of the button whose check state is to be 
  1738.    retrieved. The return value is zero if the button is unchecked
  1739.    (up) and non-zero if its checked (down).
  1740.  
  1741.  
  1742. WM_SETCHECK:
  1743.  
  1744.  - This message is sent to a toolbar button to change its check state. 
  1745.    If lParam is zero the button is unchecked (up), if its non-zero 
  1746.    it's checked (down).
  1747.  
  1748.  
  1749. WM_SETBITMAP:
  1750.  
  1751.  - This message is sent to a toolbar to change the ID and 
  1752.    associated bitmap(s) of one of its buttons. wParam is the new 
  1753.    button ID and lParam is the current button ID.
  1754.  
  1755.  
  1756. HINTS:
  1757.  
  1758.  - The WS_BORDER style should only be used with raised floating 
  1759.    toolbars. If you specify this style for an aligned toolbar, 
  1760.    the aligned toolbar will have an ugly double black border. 
  1761.    Specifying WS_CAPTION implicitly specifies WS_BORDER.
  1762.  
  1763.  - The MTB_FLUSH style was added because recessed toolbars look 
  1764.    better in an MWS_SFXFRAME style window/dialog than a raised 
  1765.    toolbar (one with no flush border). An aligned toolbar in an 
  1766.    MWS_SFXFRAME window is offset by 1 pixel from the top of its
  1767.    parent's client rectangle, so it blends in with the surrounding
  1768.    window frame and doesn't interfere with the drawing of the 
  1769.    3D window caption. Personally, I don't like top align toolbars 
  1770.    in an MWS_SFXFRAME window or dialog, they just don't look right. 
  1771.    I prefer a bottom aligned toolbar, a status bar or a floating 
  1772.    button panel. 
  1773.  
  1774.  - Don't use the MTB_FLUSH style with aligned toolbars in a 
  1775.    non-MWS_SFXFRAME window or dialog. It doesn't look good. 
  1776.  
  1777.  - When adding an aligned toolbar to an MWS_3DFRAME window with a 
  1778.    raised client area, the border of the raised client area will 
  1779.    overlap the top border of the toolbar, cutting off the top button 
  1780.    edges. It looks better if you use a null client rectangle and draw 
  1781.    the raised client area yourself.
  1782.  
  1783.  - To draw the raised client area yourself fill the background with 
  1784.    a NULL_BRUSH. Place the toolbar in the window +/- a status bar. 
  1785.    In your paint function use the DrawBorder or Draw3DBorder 
  1786.    function to draw a raised border around the remaining exposed 
  1787.    client area, so that the raised border just touches the edge of 
  1788.    the toolbar (same for status bar) leaving one black line (not 
  1789.    two) between them. Then deflate the exposed client rectangle 
  1790.    by the border thickness using the InflateRect function 
  1791.    and fill in the remaining client area inside the raised border 
  1792.    (not under it). This makes the toolbar, the status bar and the 
  1793.    raised client area fit together like the blocks in a chocolate 
  1794.    bar. Filling in the exposed client rectangle first, then 
  1795.    drawing a raised border around it causes too much flicker. 
  1796.    (See WinTool Demonstration.)
  1797.  
  1798.  
  1799. OBJECTWINDOWS CLASS:   TSFXToolbar.
  1800.  
  1801. ANCESTOR CLASS:   TWindow.
  1802.  
  1803. CONSTRUCTORS:
  1804.  
  1805.    Pascal:
  1806.  
  1807.       Init (AParent: PWindowsObject; AnID: Integer; ATitle: PChar; 
  1808.             X, Y: Integer; IsChild: Boolean);
  1809.    
  1810.       InitResource (AParent: PWindowsObject; ResourceID: Word);
  1811.  
  1812.    C++ 4.0:
  1813.  
  1814.       TSFXToolbar(TWindow* parent, int id, const char far* title, int x, int y, 
  1815.                   BOOL isChild = TRUE, TModule* module = 0);
  1816.  
  1817.       TSFXToolbar(TWindow* parent, int resourceId, TModule* module = 0);
  1818.  
  1819.    - If 'isChild' is TRUE the toolbar is a child toolbar. 
  1820.      Otherwise its a popup toolbar.
  1821.  
  1822.    - Only the X and Y coordinates for the top-left corner of the 
  1823.      toolbar are required as the toolbar resizes itself depending on 
  1824.      the number and size of the bitmaps used. 
  1825.  
  1826.  
  1827. PASCAL METHODS:
  1828.  
  1829.    function  GetClassName: PChar; virtual;
  1830.       - returns the SFX toolbar class name 'SFXTOOLBAR'.
  1831.  
  1832.    function  Register: Boolean; virtual;
  1833.       - returns TRUE to indicate that TSFXToolbar uses the 
  1834.         predefined global Windows class SFXTOOLBAR
  1835.         
  1836.    procedure WMPaint (var Msg: TMessage); virtual wm_First + wm_Paint;
  1837.       - Overrides TWindow's paint method to return DefWndProc(Msg);
  1838.  
  1839.    procedure GetTitle (ATextString: PChar);
  1840.       - Retrieves the full text string used to create the toolbar.
  1841.  
  1842.    procedure AlignToolbar;
  1843.       - Realigns a toolbar along the top, left, right or bottom 
  1844.         of its parent's client rectangle.
  1845.  
  1846.    function  GetCheck (ToolID: Integer): Word;
  1847.       - returns the check state of a radiobutton-style toolbar button
  1848.         identifed by ToolID (either BF_CHECKED or BF_UNCHECKED).
  1849.    
  1850.    procedure CheckTool (ToolID: Integer);
  1851.       - Checks the tool identified by ToolID so that it appears 
  1852.         depressed. If any other tool is checked it is unchecked 
  1853.         and redrawn so that it appears raised. 
  1854.  
  1855.    procedure UncheckTool (ToolID: Integer);
  1856.       - Unchecks the tool identified by ToolID so that it appears 
  1857.         raised.
  1858.  
  1859.    function  IsToolEnabled(ToolID: Integer): BOOL;
  1860.       - returns TRUE if the tool identifed by ToolID is 
  1861.         enabled. Otherwise it returns FALSE.
  1862.  
  1863.    procedure EnableTool(ToolID: Integer; Enabled: BOOL);
  1864.       - Enables or disables the tool identified by ToolID. If 
  1865.         'Enabled' is TRUE ToolID is enabled. If its FALSE its 
  1866.         disabled.
  1867.         
  1868.    procedure GetText (ATextString: PChar);
  1869.       - Retrieves the Static control text in an aligned toolbar or 
  1870.         status bar
  1871.  
  1872.    procedure SetText (ATextString: PChar);
  1873.       - sets the status bar text to 'ATextString'.
  1874.  
  1875.    procedure SetFont (Font: HFont);
  1876.       - sets the status bar font to 'Font'.
  1877.  
  1878.    procedure SetTool (AnID, ToolID: Integer);
  1879.       - changes the ID of the button identifed by ToolID to AnID
  1880.         and changes the bitmaps, if any.
  1881.  
  1882.    function  StatusWindow: HWnd;
  1883.       - Retrieves the window handle of the toolbar's static control
  1884.  
  1885.  
  1886. C++ 4.0 MEMBER FUNCTIONS:
  1887.  
  1888.    virtual int GetId();
  1889.       - returns the toolbar id (Attr.Id);
  1890.  
  1891.    char far* GetClassName();
  1892.       - returns the SFX toolbar class name "SFXTOOLBAR".
  1893.  
  1894.    void EvPaint();
  1895.       - Overrides TWindow's paint method to return 
  1896.         DefaultProcessing();
  1897.  
  1898.    void GetTitle(char far* str);
  1899.       - Retrieves the full text string used to create the toolbar.
  1900.  
  1901.    void AlignToolbar();
  1902.       - Realigns a toolbar along the top, left, right or bottom 
  1903.         of its parent's client rectangle.
  1904.  
  1905.    UINT GetCheck(int toolId);
  1906.       - returns the check state of a radiobutton-style toolbar button
  1907.         identifed by ToolId (either BF_CHECKED or BF_UNCHECKED).
  1908.    
  1909.    void CheckTool(int toolId);
  1910.       - Checks the tool identified by ToolId so that it appears 
  1911.         depressed. If any other tool is checked it is unchecked 
  1912.         and redrawn so that it appears raised. 
  1913.  
  1914.    void UncheckTool(int toolId);
  1915.       - Unchecks the tool identified by ToolId so that it appears 
  1916.         raised.
  1917.  
  1918.    BOOL IsToolEnabled(int toolId);
  1919.       - returns TRUE if the tool identifed by ToolId is 
  1920.         enabled. Otherwise it returns FALSE.
  1921.  
  1922.    void EnableTool(int toolId, BOOL enabled);
  1923.       - Enables or disables the tool identified by ToolId. If 
  1924.         'enabled' is TRUE ToolId is enabled. If its FALSE its 
  1925.         disabled.
  1926.         
  1927.    void GetText(char far* str);
  1928.       - Retrieves the Static control text in an aligned toolbar or 
  1929.         status bar
  1930.  
  1931.    void SetText(const char far* str);
  1932.       - sets the status bar text to 'str'.
  1933.  
  1934.    void SetFont(HFONT font);
  1935.       - sets the status bar font to 'font'.
  1936.  
  1937.    void SetTool(int newId, int toolId);
  1938.       - changes the Id of the button identifed by ToolId to AnId
  1939.         and changes the bitmaps, if any.
  1940.  
  1941.    HWND StatusWindow();
  1942.       - Retrieves the window handle of the toolbar's static control
  1943.  
  1944.  
  1945.  
  1946. --------------------
  1947. 13.  Percent Gauges.
  1948. --------------------
  1949.  
  1950. GLOBAL CLASS NAME:   SFXPercent
  1951.  
  1952. FUNCTION:   Horizontal 3-Dimensional Percent Gauge 
  1953.  
  1954. FLAGS: 
  1955.  
  1956.  - The MPS_TOP flag aligns the top edge of the percent gauge along 
  1957.    the top edge of the rectangle given in the CreateWindow 
  1958.    function. The percent gauge uses the default height for percent 
  1959.    gauges.
  1960.  
  1961.  - The MPS_BOTTOM aligns the bottom edge of the percent gauge 
  1962.    along the bottom edge of the rectangle given in the 
  1963.    CreateWindow function. The percent gauge uses the default 
  1964.    height for percent gauges.
  1965.  
  1966.  - If neither MPS_TOP or MPS_BOTTOM are specified the percent 
  1967.    gauge fills the rectangle specified in the CreateWindow 
  1968.    function.
  1969.  
  1970.  
  1971. PERCENT GAUGE STYLES:
  1972.  
  1973.  - Only horizontal percent gauges are supported.
  1974.  
  1975.  
  1976. PRIVATE MESSAGES:
  1977.  
  1978.  - You can use the any of the following messages (defined in 
  1979.    SFX200.PAS and SFX200.H) with an SFXPercent control:
  1980.       
  1981.       - WM_DRAWPERCENT
  1982.       - WM_RESETPERCENT
  1983.       - WM_SETBRUSH
  1984.       - WM_SFXCTLCOLOR
  1985.  
  1986.  
  1987. WM_DRAWPERCENT:
  1988.  
  1989.  - This message is sent to a percent gauge to tell it what 
  1990.    percentage to draw. wParam specifies the percentage to draw and 
  1991.    must be a value within the range 0 to 100%. lParam is zero. The 
  1992.    return value is 1 when the percentage drawn reaches 100 
  1993.    (complete). Otherwise, it is zero. (See Object Viewer source.)
  1994.  
  1995.  
  1996. WM_RESETPERCENT:
  1997.  
  1998.  - This message is sent to a percent gauge to reset the percentage 
  1999.    drawn to zero. This message has no parameters. 
  2000.  
  2001.  
  2002. WM_SETBRUSH:
  2003.  
  2004.  - You can use this message to set the brush used to paint the 
  2005.    client area of the gauge. The default is a special off-white
  2006.    brush created on the fly. This message is best sent to a percent 
  2007.    gauge in response to the WM_SFXCTLCOLOR message.   
  2008.  
  2009.  
  2010. WM_SFXCTLCOLOR:
  2011.  
  2012.  - This message is sent to a parent when an SFX control is about 
  2013.    to be painted. It is analogous to the WM_CTLCOLOR message. 
  2014.    wParam contains the percent gauge's display context, the 
  2015.    LOWORD of lParam contains its window handle and the 
  2016.    HIWORD of lParam specifies the a percent gauge control 
  2017.    (SFXCTLCOLOR_PERCENT).
  2018.  
  2019.       Pascal Example:
  2020.          
  2021.          procedure TMyWindow.WMSFXCtlColor (var Msg: TMessage);
  2022.          begin
  2023.            case Msg.lParamHi of
  2024.              SFXCtlColor_Percent:
  2025.              begin
  2026.                SetBkMode(Msg.wParam, Transparent);
  2027.                SetTextColor(Msg.wParam, RGB(128, 0, 128);
  2028.                SendMessage(Msg.lParamLo, wm_SetBrush, 
  2029.                            GetSFXObject(Blue_Brush), 0);
  2030.              end;
  2031.            end;
  2032.          end;
  2033.  
  2034.       C++ 4.0 Example:
  2035.  
  2036.          LRESULT
  2037.          TMyWindow::EvSFXCtlColor(WPARAM wParam, LPARAM lParam)
  2038.          {
  2039.            if (HIWORD(lParam) == SFXCTLCOLOR_PERCENT)
  2040.            {
  2041.               ::SetBkMode((HDC)wParam, TRANSPARENT);
  2042.               ::SetTextColor((HDC)wParam, RGB(128, 0, 128));
  2043.               ::SendMessage((HWND)LOWORD(lParam), WM_SETBRUSH, 
  2044.                             (UINT)GetSFXObject(BLUE_BRUSH), 0);
  2045.            }
  2046.          }
  2047.  
  2048.  
  2049. OBJECTWINDOWS CLASS:   TSFXPercent.
  2050.  
  2051. ANCESTOR CLASS:   TWindow.
  2052.  
  2053. CONSTRUCTORS:
  2054.  
  2055.    Pascal:
  2056.  
  2057.       Init (AParent: PWindowsObject; AnID: Integer; X, Y, W, H: Integer);
  2058.  
  2059.       InitResource (AParent: PWindowsObject; ResourceID: Word);
  2060.  
  2061.    C++ 4.0:
  2062.  
  2063.       TSFXPercent(TWindow* parent, int id, int x, int y, int w, int h,
  2064.                   TModule* module = 0);
  2065.  
  2066. PASCAL METHODS:
  2067.  
  2068.    function  GetClassName: PChar; virtual;
  2069.       - returns the SFX percent class name 'SFXPERCENT'.
  2070.  
  2071.    function  SetPercent (Percent: Word): LongInt;
  2072.       - draws the percentage amount specified by Percent and
  2073.         must be in the range 0 to 100%. The return value is 
  2074.         one when the percentage drawn reaches 100. Otherwise its 
  2075.         zero.
  2076.         
  2077.    procedure Reset;
  2078.       - resets the percentage drawn to zero.
  2079.  
  2080.  
  2081. C++ 4.0 MEMBER FUNCTIONS:
  2082.  
  2083.    char far* GetClassName();
  2084.       - returns the SFX percent class name "SFXPERCENT".
  2085.  
  2086.    LONG SetPercent(UINT percent);
  2087.       - draws the percentage amount specifed by 'percent' and
  2088.         must be in the range 0 to 100%. The return value is 
  2089.         one when the percentage drawn reaches 100. Otherwise its 
  2090.         zero.
  2091.  
  2092.    void Reset();
  2093.       - resets the percentage drawn to zero.
  2094.  
  2095.  
  2096.  
  2097. -------------------
  2098. 14.  MDI CLIENTS.  
  2099. -------------------
  2100.  
  2101. GLOBAL CLASS NAME:   SFXMDIClient, SFX3DMDIClient
  2102.  
  2103. FUNCTION:   Alternative MDI client windows. 
  2104.  
  2105. MDICLIENT  STYLES:
  2106.  
  2107.  - There are two MDI client window styles. An SFXMDIClient is 
  2108.    light gray and should be used with an MWS_SFXFRAME style 
  2109.    MDI window. An SFX3DMDIClient is the color specified by the 
  2110.    constant COLOR_WINDOW. It can be used with all MDI window 
  2111.    styles except MWS_SFXFRAME.
  2112.  
  2113.  
  2114. OBJECTWINDOWS CLASS:   TSFXMDIClient.
  2115.  
  2116. ANCESTOR CLASS:   TMDIClient.
  2117.  
  2118. CONSTRUCTORS:
  2119.  
  2120.    Pascal:
  2121.  
  2122.       Init (AParent: PMDIWindow; SFXClient: Boolean);
  2123.  
  2124.    C++ 4.0:
  2125.  
  2126.       TSFXMDIClient (BOOL sfxClient = FALSE, TModule* module = 0);
  2127.  
  2128.    - If sfxClient is TRUE GetClassName returns the global class 
  2129.      name 'SFXMDICLIENT'. If its FALSE it returns 'SFX3DMDICLIENT';
  2130.  
  2131. PASCAL METHODS:
  2132.  
  2133.    function  GetClassName: PChar; virtual;
  2134.       - returns the SFX MDI client class name 'SFXMDIClient' or 
  2135.         'SFX3DMDIClient'.
  2136.  
  2137.  
  2138. C++ 4.0 MEMBER FUNCTIONS:
  2139.  
  2140.    char far*  GetClassName();
  2141.       - returns the SFX MDI client class name "SFXMDIClient" or 
  2142.         "SFX3DMDIClient".
  2143.  
  2144.  
  2145.  
  2146. -------------------
  2147. 15.  DIALOG BOXES.  
  2148. -------------------
  2149.  
  2150. GLOBAL CLASS NAMES:   SFXDlg, SFX3DDlg, SFXGlazeDlg, 
  2151.                       SFXGrayDlg, SFXSteelDlg.
  2152.  
  2153. FUNCTION:   3-Dimensional custom dialog boxes. 
  2154.  
  2155. NEW FEATURES:
  2156.  
  2157.  - Added Chicago-style title bars that display a miniature class 
  2158.    icon on a title bar, next to the system menu control box, and 
  2159.    an adjacent left aligned caption. This style is specified using 
  2160.    the new MWS_SFXCAPTION flag (See Object Viewer or Resource 
  2161.    Workshop for an example).
  2162.  
  2163.  - Implemented a new non-client area paint function that removes 
  2164.    the previous window frame flicker.
  2165.  
  2166.  
  2167. FLAGS: 
  2168.  
  2169.  - The new MWS_SFXCAPTION flag is the old MWS_FLATCLIENT flag. Old 
  2170.    windows specifying one of the previous MWS_FLATTXXX flags will 
  2171.    automatically display an SFX caption. The MWS_FLATCLIENT style 
  2172.    has been made the default (so its flag is no longer needed) and 
  2173.    its combined styles have been assigned to other flags (for backward 
  2174.    compatibility).
  2175.  
  2176.  - As well as the standard window and dialog WS_XXX flags, SFX dialogs 
  2177.    use the ObjectMate window style flags:
  2178.  
  2179.     - MWS_SFXCAPTION      Chicago-style title bars.
  2180.     - MWS_FRAMEDCLIENT    3D raised frame drawn around client area.
  2181.     - MWS_RAISEDCLIENT    3D raised border drawn around client area.
  2182.     - MWS_GRAY            Light gray client area (default)
  2183.     - MWS_3DFRAME         3D window frame.
  2184.     - MWS_3DGRAY          Light gray client area and a 3D 
  2185.                           window frame.
  2186.     - MWS_SFXFRAME        Special 3D frame.
  2187.     - MWS_GLAZE           Fills client area with a GLAZE_BRUSH only 
  2188.                           if the class brush is set to zero.
  2189.     - MWS_STEEL           Fills client area with a STEEL_BRUSH only 
  2190.                           if the class brush is set to zero.
  2191.     - MWS_3DGLAZE         MWS_GLAZE + MWS_3DFRAME
  2192.     - MWS_3DSTEEL         MWS_STEEL + MWS_3DFRAME
  2193.     - MWS_FRAMED3DFRAME   MWS_3DFRAME + MWS_FRAMEDCLIENT
  2194.     - MWS_FRAMED3DGLAZE   MWS_3DGLAZE + MWS_FRAMEDCLIENT
  2195.     - MWS_FRAMED3DSTEEL   MWS_3DSTEEL + MWS_FRAMEDCLIENT
  2196.     - MWS_RAISED3DFRAME   MWS_3DFRAME + MWS_RAISEDCLIENT
  2197.     - MWS_RAISED3DGLAZE   MWS_3DGLAZE + MWS_RAISEDCLIENT
  2198.     - MWS_RAISED3DSTEEL   MWS_3DSTEEL + MWS_RAISEDCLIENT
  2199.  
  2200.  - Old window style flags included for compatibility
  2201.  
  2202.     - MWS_FLAT3DFRAME     Same as MWS_3DFRAME.
  2203.     - MWS_FLAT3DGLAZE     Same as MWS_3DGLAZE.
  2204.     - MWS_FLAT3DSTEEL      Same as MWS_3DSTEEL.
  2205.  
  2206.  - The MWS_SFXFRAME style overrides all other MWS_XXX style flags.
  2207.  
  2208.  - If the MWS_SFXCAPTION flag is set and the dialog doesn't 
  2209.    have its own icon it displays the application's class icon 
  2210.    in its title bar. You can specify a custom icon by sending 
  2211.    the dialog box a WM_SETBITMAP message. wParam is a valid 
  2212.    icon handle and lParam specifies whether to shrink the icon.
  2213.  
  2214.  
  2215. DIALOG STYLES:
  2216.  
  2217.  - SFX200.DLL registers five custom dialog classes: SFXDlg, 
  2218.    SFX3DDlg, SFXGlazeDlg, SFXGrayDlg and SFXSteelDlg and defines 
  2219.    its own default custom dialog box function: SFXDefDlgProc.
  2220.  
  2221.  
  2222. THE 'SFXDLG' USER-DEFINED DIALOG CLASS:
  2223.  
  2224.  - The SFXDlg class displays a dialog box that lets you define its 
  2225.    style using the ObjectMate window style flags. The default 
  2226.    dialog box style displays a modal frame with a flat light gray 
  2227.    client area. Other possible custom styles include any 
  2228.    combination of the following:
  2229.  
  2230.     - a Flat, Raised or Framed client area.
  2231.   
  2232.     - a modal frame, a thick frame, an SFXFrame or 3DFrame.
  2233.   
  2234.     - a Light gray client area, a Glazed client area , a Steel 
  2235.       client area or your own custom brush.
  2236.  
  2237.  - To use the SFXDlg class in your application do the following:
  2238.    
  2239.     1. Enter SFXDlg as the dialog class in the Window style dialog
  2240.        box in Resource Workshop.
  2241.  
  2242.     2. Pass the window style flag or combined style flags as the 
  2243.        dwInitParam parameter of the CreateDialogParam, 
  2244.        CreateDialogIndirectParam, DialogBoxParam or 
  2245.        DialogBoxIndiectParam functions.
  2246.  
  2247.        or
  2248.  
  2249.        Pass the window style flag or combined style flags as the 
  2250.        Attr.Param parameter in your ObjectWindows TDialog descendant's 
  2251.        constructor.
  2252.  
  2253.  
  2254. PREDEFINED DIALOG CLASSES: 
  2255.  
  2256.  - The other four custom dialog classes SFX3DDlg, SFXGlazeDlg, 
  2257.    SFXGrayDlg and SFXSteelDlg are predefined classes that do not 
  2258.    require the use of style flags. Use these dialog classes as you 
  2259.    would Borland's BorDlg class.  
  2260.  
  2261.  - To use the SFX3DDlg, SFXGlazeDlg, SFXGrayDlg and SFXSteelDlg 
  2262.    dialog classes in your application do the following:
  2263.  
  2264.   
  2265.     1. Enter SFX3DDlg, SFXGlazeDlg, SFXGrayDlg or SFXSteelDlg
  2266.        as the dialog class in the Window style dialog box in 
  2267.        Resource Workshop.
  2268.  
  2269.     2. Derive any ObjectWindows dialog class from TDialog.
  2270.  
  2271.  - You can use the SFX3DDlg, SFXGlazeDlg, SFXGrayDlg and 
  2272.    SFXSteelDlg classes to modify existing applications. 
  2273.  
  2274.  
  2275. RESOURCE WORKSHOP LIMITATION:
  2276.  
  2277.  - Resource Workshop does not display custom dialogs in its IDE 
  2278.    other than its own 'BorDlg' class. This limitation means that 
  2279.    SFX custom dialog styles are only visible at run time. 
  2280.  
  2281.  
  2282. DEFAULT DIALOG FUNCTION:
  2283.  
  2284.  - SFX dialogs have their own default dialog function: 
  2285.    SFXDefDlgProc. This function must handles the following
  2286.    messages: 
  2287.  
  2288.       WM_CREATE
  2289.       WM_COMMAND
  2290.       WM_CTLCOLOR
  2291.       WM_DESTROY
  2292.       WM_ERASEBKGND
  2293.       WM_GETMINMAXINFO
  2294.       WM_GETTEXT
  2295.       WM_INITDIALOG
  2296.       WM_LBUTTONDOWN
  2297.       WM_NCLBUTTONDOWN
  2298.       WM_NCCALCSIZE
  2299.       WM_NCPAINT
  2300.       WM_SETBITMAP  (Private message to set caption icon)
  2301.       WM_SETBRUSH  (Private message to set background brush)
  2302.       WM_SETTEXT
  2303.  
  2304.  - WM_GETMINMAXINFO is used to limit the maximized dialog size 
  2305.    to the width and height of the screen. This looks better with
  2306.    3-dimensional dialog styles.
  2307.  
  2308.  - Like the default window and MDI window functions, the most 
  2309.    important thing SFXDefDlgProc does is draw a dialog's  
  2310.    non-client area and control its activation state.
  2311.  
  2312.  - When you subclass a standard combo box you loose control of the 
  2313.    popup list box and it wont display properly. The WM_COMMAND, 
  2314.    WM_LBUTTONDOWN and WM_NCLBUTTONDOWN messages in SFXDefDlgProc 
  2315.    supply part of the routine used for handling an SFX combo 
  2316.    box's popup list box correctly. The rest of the routine is 
  2317.    written into the SFXComboBox class.
  2318.  
  2319.  - Because SFXDefDlgProc draws the dialog's non-client area it 
  2320.    also has to draw the dialog title. The WM_GETTEXT and 
  2321.    WM_SETTEXT messages are used to set, store and retrieve a 
  2322.    dialog's title. If you don't pass the messages on for default 
  2323.    processing your dialog title will display garbage (ie %#(&$!)
  2324.  
  2325. PRIVATE MESSAGES:
  2326.  
  2327.  - You can use the any of the following messages (defined in 
  2328.    SFX200.PAS and SFX200.H) with an SFX dialogs:
  2329.       
  2330.       - WM_SETBITMAP
  2331.       - WM_SETBRUSH
  2332.       - WM_SFXCTLCOLOR
  2333.  
  2334.  
  2335. WM_SETBITMAP:
  2336.  
  2337.  - This message to sent to set the icon you want an MWS_SFXCAPTION 
  2338.    style dialog box to display in its title bar. wParam must be a 
  2339.    valid icon handle. If lParam is zero the icon is shrunk to an 
  2340.    area 'GetSystemMetrics(SM_CYCAPTION)' in width and 
  2341.    'GetSystemMetrics(SM_CYCAPTION) - 4' in height and is 
  2342.    vertically centered in the title bar. If lParam is a value 
  2343.    greater than zero (eg 1) the icon is not shrunk. Instead, only 
  2344.    part of the icon is drawn, starting at the top-left corner, to 
  2345.    an area 'GetSystemMetrics(SM_CYCAPTION)' in width and 
  2346.    'GetSystemMetrics(SM_CYCAPTION) - 4' in height. If you 
  2347.    use this feature to display an undistorted miniature picture in 
  2348.    a title bar, only draw in the top-left area of the icon that
  2349.    corresponds to the above dimensions.
  2350.  
  2351.  - If the function GetSystemMetrics(SM_CYSIZE) returns a value of 26 
  2352.    (ie high screen resolution) the area of the icon displayed on the 
  2353.    title bar is 28 by 24 pixels. Otherwise (low screen resolution) 
  2354.    the area is 21 by 17 pixels.
  2355.  
  2356.  - If you set lParam to a value greater than zero and you want 
  2357.    your icon image to display correctly you need to supply to two 
  2358.    icons. One with the image drawn in an area 21 x 17 pixels and 
  2359.    one drawn in an area 28 x 24 pixels. Then, depending on the value 
  2360.    returned by GetSystemMetric(SM_CYSIZE) you should load the 
  2361.    appropriate icon (see Object Viewer source code and resource 
  2362.    file). 
  2363.  
  2364.  
  2365. WM_SETBRUSH:
  2366.  
  2367.  - You can specify your own background brush by sending the dialog 
  2368.    box a WM_SETBRUSH message in response to a WM_SFXCTLCOLOR 
  2369.    message. wParam contains a valid brush handle and lParam is 0.
  2370.  
  2371.  
  2372. WM_SFXCTLCOLOR:
  2373.  
  2374.  - An SFX dialog sends this message to itself when it's about 
  2375.    to be painted. It is analogous to the WM_CTLCOLOR message. 
  2376.    wParam contains the dialog box's display context, the 
  2377.    LOWORD of lParam contains its window handle and the 
  2378.    HIWORD of lParam specifies the a dialog box (SFXCTLCOLOR_DLG). 
  2379.  
  2380.       Pascal Example:
  2381.          
  2382.          procedure TMyDialog.WMSFXCtlColor (var Msg: TMessage);
  2383.          begin
  2384.            case Msg.lParamHi of
  2385.              SFXCtlColor_Dlg:
  2386.              begin
  2387.                SetBkMode(Msg.wParam, Transparent);
  2388.                SendMessage(Msg.lParamLo, wm_SetBrush, 
  2389.                            GetSFXObject(Wire_Brush), 0);
  2390.              end;
  2391.            end;
  2392.          end;
  2393.  
  2394.       C++ 4.0 Example:
  2395.  
  2396.          LRESULT
  2397.          TMyDialog::EvSFXCtlColor(WPARAM wParam, LPARAM lParam)
  2398.          {
  2399.            if (HIWORD(lParam) == SFXCTLCOLOR_DLG)
  2400.            {
  2401.               ::SetBkMode((HDC)wParam, TRANSPARENT);
  2402.               ::SendMessage((HWND)LOWORD(lParam), WM_SETBRUSH, 
  2403.                             (UINT)GetSFXObject(WIRE_BRUSH), 0);
  2404.            }
  2405.          }
  2406.  
  2407.  
  2408. OBJECTWINDOWS CLASS:   None. Use the standard TDialog class
  2409.                        (and Pascal TDlgWindow class).
  2410.  
  2411.  
  2412.  
  2413. ------------------------
  2414. 16.  COMMON DIALOG BOXES.  
  2415. ------------------------
  2416.  
  2417. NEW FEATURES:
  2418.  
  2419.  - Refined all common dialog box templates so they look better.
  2420.  
  2421.  - Provided in-built messages to handle the standard Apply and 
  2422.    Help buttons, so you don't have to worry about hooks. 
  2423.   
  2424.  - Added File Information, Delete File and Create Directory features 
  2425.    to the file open/save dialogs.
  2426.  
  2427.  - Added an 'Apply' button to the Color dialog box that lets you 
  2428.    update a color without closing the dialog box. This button is 
  2429.    handled automatically by SFX200.DLL.
  2430.  
  2431.  - Added the SFXOpenFile, SFXSaveFile, SFXChooseColor and 
  2432.    SFXChooseFont common dialog box functions. These functions can 
  2433.    be used instead of formal common dialog box structures or 
  2434.    OWL 2.0 common dialog box classes.
  2435.  
  2436.  - Added an "open file" style directory selection dialog box. This 
  2437.    dialog box can be displayed using the SFXDirBox function or the 
  2438.    new SFXOpenDir function. It returns the user-selected directory 
  2439.    string.
  2440.  
  2441.  - Redesigned the extended style font dialog box.
  2442.  
  2443.  
  2444. TEMPLATE STYLES:
  2445.  
  2446.  - SFX200.DLL provides you with an extended set of common dialog 
  2447.    box templates in each of the four custom dialog styles: 
  2448.    SFX3DDlg, SFXGlazeDlg, SFXGrayDlg and SFXSteelDlg. Each style 
  2449.    has 11 templates: 7 standard templates and 4 customized (or 
  2450.    extended style) templates. (You can view all the common dialog 
  2451.    box templates in the Object Viewer.)
  2452.  
  2453.  
  2454. TEMPLATE ID'S:
  2455.  
  2456.  - The following template ID's are used in the GetSFXTemplate and 
  2457.    GetSFXTemplateId functions to identify which template to load.
  2458.  
  2459.       DLG_COLOR           Choose color dialog box.
  2460.       DLG_EXCOLOR         Extended choose color.
  2461.       DLG_OPENSAVE        Open save dialog box.
  2462.       DLG_EXOPENSAVE         Open save with extended file selection.
  2463.       DLG_PRINT           Print dialog box.
  2464.       DLG_PRINTSETUP      Print setup dialog box.
  2465.       DLG_FIND            Find dialog box
  2466.       DLG_REPLACE         Replace dialog box.
  2467.       DLG_FONT            Font dialog box.
  2468.       DLG_EXFONT          Extended font dialog box
  2469.       DLG_OPENDIR         Directory selection dialog box
  2470.  
  2471.  
  2472. SETTING THE REQUIRED STACK SIZE:
  2473.  
  2474.  - Applications using common dialog boxes should specify at 
  2475.    least 8192 bytes for the stack size.
  2476.  
  2477.  
  2478. OPEN AND SAVE AS DIALOG BOXES:
  2479.  
  2480.  - File Information, Delete File and Create Directory features 
  2481.    have been added to the file open and save as dialog boxes.
  2482.  
  2483.  - File information is automatically displayed in the 'File 
  2484.    Information' panel for the currently selected file.
  2485.  
  2486.  - A 'delete' button appears in the 'Open File' dialog box. You 
  2487.    can use this button to delete selected single or multiple files. 
  2488.  
  2489.  - A 'CreateDir' button appears in the 'Save File As' dialog box. 
  2490.    You can use this button to create a new directory prior to 
  2491.    saving a file. To create  a new subdirectory in the current 
  2492.    directory enter the subdirectory name. To create a 
  2493.    new subdirectory in a different directory enter the new 
  2494.    subdirectory path. The CreateDir button only appears in the 
  2495.    'Save File As' dialog box if the  word 'save' is part of the 
  2496.    dialog box title. 
  2497.  
  2498.  - The help button is automatically activated by specifying the 
  2499.    OFN_SHOWHELP flag. Every time the help button is pressed a 
  2500.    WM_SFXHELP message is sent to the owner of the dialog box. 
  2501.    wParam is a handle to the dialog box and the HIWORD of lParam 
  2502.    its template ID, either DLG_OPENSAVE or DLG_EXOPENSAVE.
  2503.  
  2504.  
  2505. CHOOSE COLOR DIALOG BOX:
  2506.  
  2507.  - The choose color dialog box comes in two styles: a standard 
  2508.    choose color dialog box and an 'extended style' choose color 
  2509.    dialog box.
  2510.  
  2511.  - An 'Apply' button has been added to both templates. This button 
  2512.    lets the user update a color to see its effect without 
  2513.    closing the dialog box. Since the Apply button is not a 
  2514.    standard feature its automatically handle by SFX200.DLL and 
  2515.    displayed instead of the Help button. Specifying the 
  2516.    CC_SHOWHELP flag displays the Help button instead of the Apply 
  2517.    button. The Apply button is only active when the color dialog 
  2518.    box is fully open or if the dialog box was created with the 
  2519.    CC_FULLOPEN flag. 
  2520.  
  2521.  - When the Apply button in a color dialog box is pressed it sends 
  2522.    a WM_SFXAPPLYCOLOR message to the owner of the dialog box. wParam 
  2523.    zero and lParam is the selected RGB color value.
  2524.  
  2525.  - The 'extended style' dialog box only displays the 48 basic colors 
  2526.    from in the standard color dialog box. This dialog box cannot 
  2527.  
  2528.    be fully opened, however, to activate the 'Apply' button it must 
  2529.    be created with the CC_FULLOPEN flag. This activates the hidden 
  2530.    RGB color edit controls that are used to determine the current 
  2531.    color selection. This selection is passed as the lParam parameter 
  2532.    of the  WM_SFXAPPLYCOLOR message.
  2533.  
  2534.  - The help button is automatically activated by specifying the 
  2535.    CC_SHOWHELP flag. Everytime the help button is pressed a 
  2536.    WM_SFXHELP message is sent to the owner of the dialog box. 
  2537.    wParam is a handle to the dialog box and the HIWORD of lParam 
  2538.    its template ID, either DLG_COLOR or DLG_EXCOLOR.
  2539.  
  2540.  
  2541. CHOOSE FONT DIALOG BOX:
  2542.  
  2543.  - The font dialog box comes in two styles: a standard font dialog 
  2544.    box and an 'extended style' font dialog box.
  2545.  
  2546.  - The 'extended style' font dialog box does not display any 
  2547.    effects. It is a basic font dialog box that has been redesigned 
  2548.    to remove the standard half-empty appearance. It supports both the 
  2549.    CF_APPLY and CF_SHOWHELP styles but only one of these buttons can 
  2550.    be displayed as they occupy the same space.
  2551.  
  2552.  - The Apply and Help buttons can be activated by simply 
  2553.    specifying the appropriate flag: CF_APPLY or CF_SHOWHELP. You 
  2554.    don't have to worry about any hooks. 
  2555.  
  2556.  - When the Apply button is pressed it sends a WM_SFXAPPLYFONT 
  2557.    message to the owner of the dialog box. wParam is a handle to 
  2558.    the newly created font and lParam is the currently selected 
  2559.    color. You are responsible for deleting this font handle.
  2560.  
  2561.  - When the help button is pressed a WM_SFXHELP message is sent to 
  2562.    the dialog's owner. wParam is a handle to the dialog box and the 
  2563.    HIWORD of lParam its template ID, either DLG_FONT or DLG_EXFONT.
  2564.  
  2565.  
  2566. PRINT, PRINTSETUP, FIND and REPLACE DIALOG BOXES:
  2567.  
  2568.  - The help button is automatically activated when you specify the 
  2569.    appropriate XX_SHOWHELP flag. Every time the help button is 
  2570.    pressed a WM_SFXHELP message is sent to the dialog's owner. wParam 
  2571.    is a handle to the dialog box and the HIWORD of lParam its template 
  2572.    ID, either DLG_PRINT, DLG_PRINTSETUP, DLG_FIND or DLG_REPLACE.
  2573.  
  2574.  
  2575. PRIVATE MESSAGES:
  2576.  
  2577.  - The following private messages (defined in SFX200.PAS and 
  2578.    SFX200.H) can be used with SFX common dialogs:
  2579.       
  2580.       - WM_SFXAPPLYCOLOR  (see Choose Color dialog box)
  2581.       - WM_SFXAPPLYFONT   (see Choose Font dialog box)
  2582.       - WM_SFXHELP
  2583.       - WM_SFXINITDIALOG
  2584.       - WM_SETBITMAP
  2585.  
  2586. WM_SFXHELP:
  2587.  
  2588.  - This message is sent to the owner of a common dialog box when the 
  2589.    user presses the help button. wParam is a handle to the dialog box 
  2590.    and the HIWORD of lParam is its template id.
  2591.  
  2592.  
  2593. WM_SFXINITDIALOG:
  2594.  
  2595.  - This message is sent from an SFX common dialog box's WM_INITDIALOG 
  2596.    message response in SFX200.DLL. wParam is a handle to the common 
  2597.    dialog box and the HIWORD of lParam is the template ID. This message 
  2598.    gives you a chance to do some extra initialization before the 
  2599.    common dialog box is displayed. For example, responding to this 
  2600.    message is the only way to set the MWS_SFXCAPTION flag for a common 
  2601.    dialog box and send it a WM_SETBITMAP message.
  2602.  
  2603.  
  2604. WM_SETBITMAP:
  2605.  
  2606.  - This message to sent to set the icon you want an MWS_SFXCAPTION 
  2607.    style common dialog box to display in its title bar. wParam must be a 
  2608.    valid icon handle. If lParam is zero the icon is shrunk to an 
  2609.    area 'GetSystemMetrics(SM_CYCAPTION)' in width and 
  2610.    'GetSystemMetrics(SM_CYCAPTION) - 4' in height and is 
  2611.    vertically centered in the title bar. If lParam is a value 
  2612.    greater than zero (eg 1) the icon is not shrunk. Instead, only 
  2613.    part of the icon is drawn, starting at the top-left corner, to 
  2614.    an area 'GetSystemMetrics(SM_CYCAPTION)' in width and 
  2615.    'GetSystemMetrics(SM_CYCAPTION) - 4' in height. If you 
  2616.    use this feature to display an undistorted miniature picture in 
  2617.    a title bar, only draw in the top-left area of the icon that
  2618.    corresponds to the above dimensions.
  2619.  
  2620.  - If the function GetSystemMetrics(SM_CYSIZE) returns a value of 26 
  2621.    (ie high screen resolution) the area of the icon displayed on the 
  2622.    title bar is 28 by 24 pixels. Otherwise (low screen resolution) 
  2623.    the area is 21 by 17 pixels.
  2624.  
  2625.  - If you set lParam to a value greater than zero and you want 
  2626.    your icon image to display correctly you need to supply to two 
  2627.    icons. One with the image drawn in an area 21 x 17 pixels and 
  2628.    one drawn in an area 28 x 24 pixels. Then, depending on the value 
  2629.    returned by GetSystemMetric(SM_CYSIZE) you should load the 
  2630.    appropriate icon (see Object Viewer source code and resource 
  2631.    file). 
  2632.  
  2633.  
  2634. USING THE COMMON DIALOG BOX TEMPLATES IN SFX200.DLL:
  2635.  
  2636.  - To use a common dialog box template in your application 
  2637.    add the following to your common dialog structure:
  2638.  
  2639.     1. Set the structure's hInstance parameter to the value 
  2640.        returned by the GetSFXInstance function. This value 
  2641.        is the instance handle of SFX200.DLL.
  2642.  
  2643.     2. Set the structure's lpTemplateName parameter to the 
  2644.        value returned by the GetSFXTemplate function. This 
  2645.        value is a pointer to a null terminated string 
  2646.        identifying the common dialog box template to load.
  2647.  
  2648.     3. Add the appropriate XX_EnableTemplate flag the structure's
  2649.        'Flags' member (see Object Viewer source code).
  2650.  
  2651.  - To use a common dialog box template in your ObjectWindows 2.0 
  2652.    application do the following:
  2653.  
  2654.     1. Use the GetSFXTemplateId function to retrieve the resource
  2655.        Id of the common dialog box template to load and use it as the 
  2656.        TemplateId  parameter in the common dialog box constructor.
  2657.  
  2658.        then
  2659.  
  2660.     2. Create a module object for SFX200.DLL  using the GetSFXInstance 
  2661.        function and use that module as the TModule parameter in the 
  2662.        common dialog box constructor (see Object Viewer source code).
  2663.  
  2664.  - Alternatively, you can use one of the new common dialog box 
  2665.    functions described in the FUNCTIONS section at the end 
  2666.    of this file:
  2667.  
  2668.     - SFXOpenDir
  2669.     - SFXOpenFile
  2670.     - SFXSaveFile
  2671.     - SFXChooseColor
  2672.     - SFXChooseFont
  2673.  
  2674.  
  2675.  
  2676. ------------
  2677. 17.  WINDOWS.
  2678. ------------
  2679.   
  2680. NEW FEATURES:
  2681.  
  2682.  - Added Chicago-style title bars that display a miniature class 
  2683.    icon on the title bar, next to the system menu control box, and 
  2684.    an adjoining left aligned caption. This style is specified using 
  2685.    the new MWS_SFXCAPTION flag.
  2686.  
  2687.  - Implemented a new non-client paint function to remove the 
  2688.    previous window frame flicker.
  2689.  
  2690.  
  2691. FLAGS: 
  2692.  
  2693.  - The new MWS_SFXCAPTION flag is the old MWS_FLATCLIENT flag. Old 
  2694.    windows specifying one of the previous MWS_FLATXXX flags will 
  2695.    automatically display an SFX caption. The MWS_FLATCLIENT style 
  2696.    has been made the default (so it's no longer needed) and its 
  2697.    combined styles have been assigned to other flags (for backward 
  2698.    compatibility).
  2699.  
  2700.  - As well as the standard window WS_XXX flags, SFX windows use the 
  2701.    ObjectMate window style flags:
  2702.  
  2703.     - MWS_SFXCAPTION      Chicago-style title bars.
  2704.     - MWS_FRAMEDCLIENT    3D raised frame drawn around client area.
  2705.     - MWS_RAISEDCLIENT    3D raised border drawn around client area.
  2706.     - MWS_GRAY            Light gray client area (default)
  2707.     - MWS_3DFRAME         3D window frame.
  2708.     - MWS_3DGRAY          Light gray client area and a 3D 
  2709.                           window frame.
  2710.     - MWS_SFXFRAME        Special 3D frame.
  2711.     - MWS_GLAZE           Fills client area with a GLAZE_BRUSH only 
  2712.                           if the class brush is set to zero.
  2713.     - MWS_STEEL           Fills client area with a STEEL_BRUSH only 
  2714.                           if the class brush is set to zero.
  2715.     - MWS_3DGLAZE         MWS_GLAZE + MWS_3DFRAME
  2716.     - MWS_3DSTEEL         MWS_STEEL + MWS_3DFRAME
  2717.     - MWS_FRAMED3DFRAME   MWS_3DFRAME + MWS_FRAMEDCLIENT
  2718.     - MWS_FRAMED3DGLAZE   MWS_3DGLAZE + MWS_FRAMEDCLIENT
  2719.     - MWS_FRAMED3DSTEEL   MWS_3DSTEEL + MWS_FRAMEDCLIENT
  2720.     - MWS_RAISED3DFRAME   MWS_3DFRAME + MWS_RAISEDCLIENT
  2721.     - MWS_RAISED3DGLAZE   MWS_3DGLAZE + MWS_RAISEDCLIENT
  2722.     - MWS_RAISED3DSTEEL   MWS_3DSTEEL + MWS_RAISEDCLIENT
  2723.  
  2724.  - Old window style flags included for compatibility
  2725.  
  2726.     - MWS_FLAT3DFRAME     Same as MWS_3DFRAME.
  2727.     - MWS_FLAT3DGLAZE     Same as MWS_3DGLAZE.
  2728.     - MWS_FLAT3DSTEEL      Same as MWS_3DSTEEL.
  2729.  
  2730.  - The MWS_SFXFRAME style overrides all other MWS_XXX style flags.
  2731.  
  2732.  - If the MWS_SFXCAPTION flag is set and the window doesn't 
  2733.    have its own icon it will display the application's class icon in 
  2734.    its title bar. 
  2735.  
  2736.  
  2737. WINDOW STYLES:
  2738.  
  2739.  - The same styles used to create SFX dialogs (see Object Viewer) 
  2740.    can also be used to create windows, frame windows, MDI windows and 
  2741.    MDI child windows.
  2742.  
  2743.  
  2744. DEFAULT WINDOW FUNCTIONS:
  2745.  
  2746.  - SFX200.DLL defines the following default window functions:
  2747.  
  2748.     1. 'SFXDefWindowProc' to handle messages not explicitly 
  2749.        handled by an SFX window.
  2750.  
  2751.     2. 'SFXDefFrameProc' to handle messages not explicitly 
  2752.        handled by an SFX MDI window.
  2753.  
  2754.     3. 'SFXDefMDIChildProc' to handle messages not explicitly 
  2755.        handled by an SFX MDI child window.
  2756.  
  2757.  - Like the default dialog function 'SFXDefDlgProc', the most 
  2758.    important thing these functions do is draw a windows non-client 
  2759.    area and control its activation/inactivation state.
  2760.  
  2761.  
  2762. DEFAULT MESSAGES:
  2763.  
  2764.  - The default window functions must handle the following messages:
  2765.  
  2766.       WM_COMMAND        (not processed by SFXDefMDIChildProc)
  2767.       WM_CREATE         (not processed by SFXDefMDIChildProc)
  2768.       WM_DESTROY
  2769.       WM_EXITMENULOOP   (defined in SFX200.PAS or SFX200.H)
  2770.       WM_ERASEBKGND
  2771.       WM_GETMINMAXINFO  (not processed by SFXDefMDIChildProc)
  2772.       WM_GETTEXT
  2773.       WM_LBUTTONDOWN    (not processed by SFXDefMDIChildProc)
  2774.       WM_MENUSELECT
  2775.       WM_NCACTIVATE
  2776.       WM_NCCALCSIZE
  2777.       WM_NCCREATE       (MDI Child only)
  2778.       WM_NCLBUTTONDOWN  (not processed by SFXDefMDIChildProc)
  2779.       WM_NCPAINT
  2780.       WM_SETBITMAP      (Private message to set caption icon)
  2781.       WM_SETTEXT
  2782.       WM_SIZE           (MDI Child only)
  2783.       WM_SYSCHAR        (not processed by SFXDefMDIChildProc)
  2784.  
  2785.  - WM_GETMINMAXINFO is used to limit the maximized window size 
  2786.    to the width and height of the screen. This looks better with
  2787.    3-dimensional window styles.
  2788.  
  2789.  - When you subclass a standard combo box you loose control of the 
  2790.    popup list box and it wont display properly. The WM_COMMAND, 
  2791.    WM_LBUTTONDOWN and WM_NCLBUTTONDOWN messages supply part 
  2792.    of the routine used for handling an SFX combo box's popup 
  2793.    list box correctly. The rest of the routine is written into 
  2794.    the SFXComboBox class.
  2795.  
  2796.  - Because these functions draw the window's non-client area they 
  2797.    also have to draw the window title. The WM_GETTEXT and 
  2798.    WM_SETTEXT messages are used to set, store and retrieve a 
  2799.    window's title. If you don't pass the messages on for default 
  2800.    processing your window title will display garbage (ie %#(&$!)
  2801.  
  2802.  
  2803. CREATING SFX WINDOWS:
  2804.  
  2805.  - To create a generic SFX window you must do the following:
  2806.  
  2807.     1. Pass the desired WS_XXX and MWS_XXX window style flags in the 
  2808.        dwStyle parameter of the CreateWindow function.
  2809.  
  2810.     2. Call the appropriate default window function: SFXDefWindowProc,
  2811.        SFXDefMDIFrameProc or SFXDefMDIChildProc to handle any messages 
  2812.        not explicitly processed by your application's main window 
  2813.        function and to handle the messages listed above.
  2814.   
  2815.  - To create an ObjectWindows 1.0 SFX window you must do the following:
  2816.  
  2817.     1. Derive your window class from one of the predefined ObjectWindows 
  2818.        classes. There are four predefined classes: TSFXWindow, TSFXEditWindow,
  2819.        TSFXFileWindow, TSFXMDIWindow (Pascal Only). 
  2820.  
  2821.  - To create an ObjectWindows 2.0 SFX window (C++ 4.0) you must do the 
  2822.    following:
  2823.  
  2824.     1. Derive your frame window from TSFXFrameWindow, TSFXDecoratedFrame,
  2825.        TSFXMDIFrame, TSFXDecoratedMDIFrame or TSFXMDIChild.
  2826.  
  2827.     2. You can use any client window in a frame window. If you want to 
  2828.        create a MWS_SFXFRAME style window set the SFXFrame parameter in the 
  2829.        frame window constructor to TRUE and set your client window's 
  2830.        background color to light gray. The MWS_SFXFRAME style is not compatible 
  2831.        with TSFXDecoratedFrame and TSFXDecoratedMDIFrame styles.
  2832.  
  2833. PRIVATE MESSAGES:
  2834.  
  2835.  - You can use the following message (defined in 
  2836.    SFX200.PAS and SFX200.H) with an SFX Window:
  2837.       
  2838.       - WM_SETBITMAP
  2839.  
  2840.  
  2841. WM_SETBITMAP:
  2842.  
  2843.  - This message to sent to set the icon you want an MWS_SFXCAPTION 
  2844.    style window to display in its title bar. wParam must be a 
  2845.    valid icon handle. If lParam is zero the icon is shrunk to an 
  2846.    area 'GetSystemMetrics(SM_CYCAPTION)' in width and 
  2847.    'GetSystemMetrics(SM_CYCAPTION) - 4' in height and is 
  2848.    vertically centered in the title bar. If lParam is a value 
  2849.    greater than zero (eg 1) the icon is not shrunk. Instead, only 
  2850.    part of the icon is drawn, starting at the top-left corner to 
  2851.    an area 'GetSystemMetrics(SM_CYCAPTION)' in width and 
  2852.    'GetSystemMetrics(SM_CYCAPTION) - 4' in height. If you 
  2853.    use this feature to display an undistorted miniature picture in 
  2854.    a title bar, only draw in the top-left area of the icon 
  2855.    corresponding to the above dimensions.
  2856.  
  2857.  - If the function GetSystemMetrics(SM_CYSIZE) returns a value of 26 
  2858.    (ie high screen resolution) the area of the icon displayed on the 
  2859.    title bar is 28 by 24 pixels. Otherwise (low screen resolution) 
  2860.    the area is 21 by 17 pixels.
  2861.  
  2862.  - If you set lParam to a value greater than zero and you want 
  2863.    your icon image to display correctly you need to supply to two 
  2864.    icons. One with the image drawn in an area 21 x 17 pixels and 
  2865.    one drawn in an area 28 x 24 pixels. Then, depending on the value 
  2866.    returned by GetSystemMetric(SM_CYSIZE) you should load the 
  2867.    appropriate icon (see Object Viewer source code and resource 
  2868.    file). 
  2869.  
  2870.  
  2871. OBJECTWINDOWS CLASSES:
  2872.  
  2873.  - Pascal:
  2874.  
  2875.       TSFXWindow
  2876.       TSFXEditWindow
  2877.       TSFXFileWindow
  2878.       TSFXMDIWindow
  2879.  
  2880.  - C++ 4.0:
  2881.  
  2882.       TSFXWindow
  2883.       TSFXFrameWindow
  2884.       TSFXDecoratedFrame
  2885.       TSFXMDIFrame
  2886.       TSFXDecoratedMDIFrame
  2887.       TSFXMDIChild
  2888.  
  2889.  
  2890. TSFXWINDOW (Pascal):
  2891.  
  2892.  - Ancestor class:   TWindow 
  2893.  
  2894.  - Constructor:      Init(AParent: PWindowsObject; AName: PChar);
  2895.  
  2896.  - Load:             constructs and loads an SFX window from the stream S.
  2897.  
  2898.  - Store:            stores an SFX window on the stream S.
  2899.  
  2900.  - GetWindowClass:   sets the window background brush to zero.
  2901.  
  2902.  
  2903. TSFXEDITWINDOW (Pascal):
  2904.  
  2905.  - Ancestor class:   TEditWindow 
  2906.  
  2907.  - Constructor:      Init(AParent: PWindowsObject; ATitle: PChar);
  2908.  
  2909.  - Load :            constructs and loads an SFX edit window from the 
  2910.                      stream S.
  2911.  
  2912.  - Store:            stores an SFX edit window on the stream S.
  2913.  
  2914.  - GetWindowClass:   sets the window background to a null brush.
  2915.  
  2916.  - WMCtlColor:       sets the edit control color in an MWS_SFXFRAME 
  2917.                      style edit window to light gray.
  2918.  
  2919.  - WMSize:           re aligns the edit control if the edit window 
  2920.                      is resized.
  2921.  
  2922. TSFXFILEWINDOW (Pascal):
  2923.  
  2924.  - Ancestor class:   TFileWindow 
  2925.  
  2926.  - Constructor:      Init(AParent: PWindowsObject; ATitle, AFileName: PChar);
  2927.  
  2928.  - Load:             constructs and loads an SFX file window from the stream S.
  2929.  
  2930.  - Store:            stores an SFX file window on the stream S.
  2931.  
  2932.  - GetWindowClass:   sets the window background to a null brush.
  2933.  
  2934.  - WMCtlColor:       sets the edit control color in an MWS_SFXFRAME 
  2935.                      style file window to light gray.
  2936.  
  2937.  - WMSize:           re aligns the edit control if the file window 
  2938.                      is resized.
  2939.  
  2940.  
  2941. TSFXMDIWINDOW (Pascal):
  2942.  
  2943.  - Ancestor class:   TMDIWindow 
  2944.  
  2945.  - Constructor:      Init(ATitle: PChar; AMenu: HMenu);
  2946.  
  2947.  - Load:             constructs and loads an SFX MDI window from 
  2948.                      the stream S.
  2949.  
  2950.  - Store:            stores an SFX MDI window on the stream S.
  2951.  
  2952.  - GetWindowClass:   sets the window background brush to zero.
  2953.  
  2954.  - InitClientWindow: constructs a default TSFX3DMDIClient window. 
  2955.                      You can override this and construct a 
  2956.                      TSFXMDIClient window for MWS_SFXFRAME style 
  2957.                      MDI windows.
  2958.  
  2959.  - DefWndProc:       overrides DefFrameProc, passing all messages 
  2960.                      to SFXDefFrameProc.
  2961.  
  2962. TSFXWINDOW (C++ 4.0):
  2963.  
  2964.  - Ancestor class:   TWindow 
  2965.  
  2966.  - Constructors:     TSFXWindow(TWindow* parent, 
  2967.                                 const char far* title = 0,
  2968.                            TModule* module = 0);
  2969.  
  2970.  - GetWindowClass:   sets the window background to a null brush.
  2971.     
  2972.  - DefWindowProc:    overrides DefWindowProc, passing all messages to 
  2973.                      SFXDefWindowProc.
  2974.  
  2975.  
  2976. TSFXFRAMEWINDOW (C++ 4.0):
  2977.  
  2978.  - Ancestor class:   TFrameWindow 
  2979.  
  2980.  - Constructors:     TSFXFrameWindow(TWindow* parent, 
  2981.                                      const char far* title = 0,
  2982.                      TWindow* clientWnd = 0,
  2983.                      BOOL sfxFrame = FALSE,
  2984.                      BOOL sfxCaption = FALSE,
  2985.                          BOOL shrinkToClient = FALSE,
  2986.                      TModule* module = 0);
  2987.  
  2988.                      If sfxFrame is TRUE, the window is created with 
  2989.                      the MWS_SFXFRAME style flag set. If sfxCaption 
  2990.                      is true the MWS_SFXCAPTION flag is set. 
  2991.  
  2992.  - SetupWindow:      sets an MWS_SFXFRAME style frame window's client 
  2993.                      window to light gray.
  2994.  
  2995.  - DefWindowProc:    overrides DefWindowProc, passing all messages to 
  2996.                      SFXDefWindowProc.
  2997.  
  2998.  
  2999. TSFXDECORATEDFRAME (C++ 4.0):
  3000.  
  3001.  - Ancestor class:   TDecoratedFrame
  3002.  
  3003.  - Constructor       TSFXDecoratedFrame(TWindow* parent,
  3004.                     const char far* title,
  3005.                                         TWindow* clientWnd,
  3006.                         BOOL sfxCaption = FALSE,
  3007.                     BOOL trackMenuSelection = FALSE,
  3008.                     TModule* module = 0);
  3009.  
  3010.                      If sfxCaption is true the MWS_SFXCAPTION flag is set. 
  3011.  
  3012.  - DefWindowProc     overrides DefWindowProc, passing all messages to 
  3013.                      SFXDefWindowProc.
  3014.  
  3015.  
  3016. TSFXMDIFRAME (C++ 4.0):
  3017.  
  3018.  - Ancestor class:   TMDIFrame
  3019.  
  3020.  - Constructor:      TSFXMDIFrame(const char far* title,
  3021.                   TResId menuResId,
  3022.                   TMDIClient& clientWnd = *new TSFXMDIClient,
  3023.                   BOOL sfxFrame = FALSE,
  3024.                       BOOL sfxCaption = FALSE,
  3025.                   TModule* module = 0);
  3026.  
  3027.                      If sfxFrame is TRUE, the window is created with the 
  3028.                      MWS_SFXFRAME style flag set. If sfxCaption is true the 
  3029.                      MWS_SFXCAPTION flag is set. 
  3030.  
  3031.  - DefWindowProc:    overrides DefWindowProc, passing all messages to 
  3032.                      SFXDefFrameProc.
  3033.  
  3034.  
  3035. TSFXDECORATEDMDIFRAME (C++ 4.0):
  3036.  
  3037.  - Ancestor class:   TDecoratedMDIFrame
  3038.  
  3039.  - Constructor:      TSFXDecoratedMDIFrame(const char far* title,
  3040.                    TResId menuResId,
  3041.                        TMDIClient& clientWnd = *new TMDIClient,
  3042.                    BOOL sfxCaption = FALSE,
  3043.                    BOOL trackMenuSelection = FALSE,
  3044.                    TModule* module = 0);
  3045.  
  3046.                      If sfxCaption is true the MWS_SFXCAPTION flag is set. 
  3047.  
  3048.  - DefWindowProc     overrides DefWindowProc, passing all messages to 
  3049.                      SFXDefFrameProc.
  3050.  
  3051.  
  3052. TSFXMDICHILD (C++ 4.0):
  3053.  
  3054.  - Ancestor class:   TMDIChild
  3055.  
  3056.  - Constructors:     TSFXMDIChild(TMDIClient& parent,
  3057.                   const char far* title = 0,
  3058.                   TWindow* clientWnd = new TWindow(0, 0, 0),
  3059.                          BOOL sfxFrame = FALSE,
  3060.                   BOOL sfxCaption = FALSE,
  3061.                   BOOL shrinkToClient = FALSE,
  3062.                   TModule* module = 0);
  3063.  
  3064.                      If sfxFrame is TRUE, the window is created with the 
  3065.                      MWS_SFXFRAME style flag set. If sfxCaption is true the 
  3066.                      MWS_SFXCAPTION flag is set. 
  3067.  
  3068.  - SetupWindow:      sets an MWS_SFXFRAME style frame window's client 
  3069.                      window to light gray.
  3070.  
  3071.  - DefWindowProc:    overrides DefWindowProc, passing all messages to 
  3072.                      SFXDefMDIChildProc.
  3073.  
  3074.  
  3075.  
  3076. --------------
  3077. 18.  3D MENUS.
  3078. --------------
  3079.  
  3080.  - Stylish 3D ownerdraw menus have been added to ObjectMate 2.6 and 
  3081.    they're easy to use. 
  3082.  
  3083.  - The WINMENU demonstration shows you how easy it is to add 3D 
  3084.    menus to your application, the supplied source code does all 
  3085.    the work. Just use the functions in the Pascal ODMENU unit or 
  3086.    the C++ SMENU.H and SMENU.CPP files. The supplied 3D menu 
  3087.    functions let you specify the menu text font, highlight 
  3088.    background color and highlight text color, or you can use the 
  3089.    default font and system colors. If you want to add bitmaps or 
  3090.    icons to the menu (eg like Chicago does) you will need to
  3091.    modify the source code.
  3092.  
  3093.  - To add basic 3D ownerdraw menus to your application you will need 
  3094.    to do following:
  3095.  
  3096.     1. Create a new popup menu and append ownerdraw items to it 
  3097.        or modify each item in an existing menu resource.
  3098.  
  3099.     2. Process the WM_MEASUREITEM, WM_DRAWITEM and WM_MENUCHAR 
  3100.        messages. WM_MEASUREITEM and WM_DRAWITEM simply call the 
  3101.        supplied MeasureMenuItem and DrawMenuItem functions.
  3102.  
  3103.     3. With ownerdraw menus you must create the menu mnenonics
  3104.        yourself. This is done in response to the WM_MENUCHAR 
  3105.        message.
  3106.  
  3107.     4. Since a window's system menu is seldom modified, two 
  3108.        functions are supplied that set up a basic 3D ownerdraw 
  3109.        system menu. Set3DSystemMenu automatically modifies the
  3110.        system menu items to MF_OWNERDRAW and ProcessSystemChar
  3111.        handles the menu item mnenonics.
  3112.  
  3113.  - The most time consuming thing you'll have to do is append/modify
  3114.    each menu item to MF_OWNERDRAW and handle its mnenonics.
  3115.  
  3116.  - One quirk is the colored flash that occurs when a menu is 
  3117.    first drawn. The menu background color is always the color 
  3118.    specified by the system color utility in Control Panel. An 
  3119.    ownerdraw menu first draws a blank menu background using the 
  3120.    system color and then draws each menu item. There is no way to 
  3121.    prevent this. Usually menus are white so you'll see a
  3122.    white flash. If the menu is light gray you wont see any flash. 
  3123.   
  3124.  
  3125.  
  3126. -----------------------------------
  3127. 19.  MESSAGE BOXES and INPUT BOXES.
  3128. -----------------------------------
  3129.  
  3130.  - The system menu has been removed from the message boxes and 
  3131.    input boxes, to make them look better.
  3132.  
  3133.  - You can give a message box or input box an SFXCaption by 
  3134.    combining the MWS_SFXCAPTION flag with the MWS_XXX style flag 
  3135.    specified in the style argument of the SFXMsgBox or SFXInputBox 
  3136.    functions. 
  3137.  
  3138.  
  3139.  
  3140. --------------
  3141. 20.  FUNCTIONS.
  3142. --------------
  3143.  
  3144. FUNCTIONS THAT HAVE CHANGED:
  3145.  
  3146.  - The following functions have had there arguments changed
  3147.  
  3148.     1. DrawBorder.
  3149.  
  3150.     2. Draw3DBorder.
  3151.  
  3152.     3. SFXDefFrameProc.
  3153.  
  3154.  
  3155. NEW FUNCTIONS:
  3156.  
  3157.  - Nine new functions have been added to the library.
  3158.  
  3159.     1. IsNCActive 
  3160.     2. PtInClient  
  3161.     3. PtInWindow 
  3162.     4. SFXDirBox
  3163.     5. SFXOpenDir
  3164.     6. SFXOpenFile
  3165.     7. SFXSaveFile
  3166.     8. SFXChooseColor
  3167.     9. SFXChooseFont  
  3168.  
  3169.  
  3170. FUNCTION LIST:
  3171.  
  3172.    Common dialog box functions
  3173.  
  3174.       - SFXDirBox
  3175.       - SFXOpenDir
  3176.       - SFXOpenFile
  3177.       - SFXSaveFile
  3178.       - SFXChooseColor
  3179.       - SFXChooseFont
  3180.  
  3181.    Drawing functions:
  3182.  
  3183.       - AlignBrush
  3184.       - BlackFrame
  3185.       - ChildToParentRect
  3186.       - DrawBorder
  3187.       - Draw3DBorder
  3188.       - EraseObject
  3189.       - GetSFXCtrlFont
  3190.       - GetSFXObject
  3191.  
  3192.    Information functions
  3193.  
  3194.       - GetSFXInstance
  3195.       - GetSFXTemplate
  3196.       - GetSFXTempateId
  3197.       - GetSFXVersion
  3198.       - IsNCActive
  3199.       - PtInClient
  3200.       - PtInWindow
  3201.  
  3202.    Window creation functions
  3203.   
  3204.       - SFXDefDlgProc
  3205.       - SFXDefWindowProc
  3206.       - SFXDefFrameProc
  3207.       - SFXDefMDIChildProc
  3208.       - SFXMsgBox
  3209.       - SFXInputBox
  3210.  
  3211.    Window display functions
  3212.  
  3213.       - CenterWindow
  3214.  
  3215.  
  3216. SFXDIRBOX:
  3217.  
  3218.  - The SFXDirBox function displays a "open file" style 
  3219.    common dialog box that lists only directories. When the OK 
  3220.    button is pressed by the user, the current directory selection 
  3221.    is copied into the supplied buffer.
  3222.  
  3223.  - Syntax:
  3224.  
  3225.      int SFXDirBox(HWND hWndParent, const char far* caption, char far* dir, 
  3226.                    UINT flags = 0, UINT style = 0)
  3227.  
  3228.      function SFXDirBox(WndParent: HWnd; Caption, Dir: PChar; 
  3229.                         Flags, Style: Word): Integer;
  3230.  
  3231.  
  3232.      Parameter       Description
  3233.      -----------------------------------------------------------
  3234.      hWndParent      Identifies the window that owns the 
  3235.                      directory dialog box.
  3236.  
  3237.      caption         Points to a null terminated character string 
  3238.                      that is to be used for the dialog's caption.
  3239.                      The default is 'Directories'.
  3240.  
  3241.      dir             Points to a buffer that is to receive 
  3242.                      the path of the selected directory.
  3243.  
  3244.      flags           Specifies the OFN flags to add to the 
  3245.                      Flags member of the OFN structure. By 
  3246.                      default, the selected directory becomes the 
  3247.                      current directory. Specifying OFN_NOCHANGEDIR 
  3248.                      resets the current directory to what it was 
  3249.                      before the dialog box was created. This is 
  3250.                      useful if you only want to retrieve a directory 
  3251.                      path from the user without changing directories. 
  3252.                      Specifying OFN_SHOWHELP displays the Help 
  3253.                      button. When this button is pressed a WM_SFXHELP 
  3254.                      message is sent to the owner of the dialog box. 
  3255.                      Its lParam value identifies the directory dialog
  3256.                      box (ie DLG_OPENDIR). In C++ you will need 
  3257.                      to cast the flags (a DWORD) to an UINT.
  3258.  
  3259.      style          Specifies the directory box window style. wStyle 
  3260.                      can be one of the following values:
  3261.  
  3262.                      Value          Description
  3263.                      -------------------------------------------
  3264.                      MWS_SFXFRAME   SFXFrame with light gray client area
  3265.                      MWS_3DGRAY     3DFrame with raised light gray client area
  3266.                      MWS_3DGLAZE    3DFrame with raised glaze client area
  3267.                      MWS_3DSTEEL    3DFrame with raised steel client area
  3268.  
  3269.  - If the user presses the OK button the return value is IDOK. 
  3270.    Otherwise it's IDCANCEL.
  3271.  
  3272.  - This function first appeared in the beta version of ObjectMate 
  3273.    2.6 and is only included here for backward compatibility. It is 
  3274.    superseded by the new SFXOpenDir function. 
  3275.  
  3276.  
  3277. SFXOPENDIR:
  3278.  
  3279.  - The new SFXOpenDir function displays a "open file" style 
  3280.    directory selection common dialog box. When the OK button 
  3281.    is pressed by the user, the current directory selection 
  3282.    is copied into the supplied buffer. This function is 
  3283.    intended to replace SFXDirBox.
  3284.  
  3285.  - Syntax:
  3286.  
  3287.      BOOL SFXOpenDir(HWND hWndParent, char far* dir, const char far* title = "",
  3288.                  DWORD flags = 0, int templateId = 0, BOOL center = FALSE);
  3289.  
  3290.  
  3291.      function SFXOpenDir (WndParent: HWnd; Buffer, Title: PChar; OFNFlags: LongInt;
  3292.                          Template: Integer; Center: Boolean): BOOL;
  3293.  
  3294.  
  3295.      Parameter       Description
  3296.      -----------------------------------------------------------
  3297.      hWndParent      Identifies the window that owns the 
  3298.                      directory dialog box.
  3299.  
  3300.      dir             Points to a buffer that is to receive 
  3301.                      the path of the selected directory.
  3302.  
  3303.      title           Points to a null terminated character string 
  3304.                      that is to be used as the dialog's title.
  3305.                      If title is null the default title "Directories"
  3306.                      is used.
  3307.  
  3308.      flags           Specifies the OFN flags to add to the 
  3309.                      Flags member of the OFN structure. By 
  3310.                      default, the selected directory becomes the 
  3311.                      current directory. Specifying OFN_NOCHANGEDIR 
  3312.                      resets the current directory to what it was 
  3313.                      before the dialog box was created. This is 
  3314.                      useful if you only want to retrieve a directory 
  3315.                      path from the user without changing directories. 
  3316.                      Specifying OFN_SHOWHELP displays the Help 
  3317.                      button. When this button is pressed a WM_SFXHELP 
  3318.                      message is sent to the owner of the dialog box. 
  3319.                      Its lParam value identifies the directory dialog
  3320.                      box (ie DLG_OPENDIR). This member can be null.
  3321.  
  3322.      templateId      Identifies which common dialog box template to 
  3323.                      load. This value can be obtained using the 
  3324.                      GetSFXTemplateId function. If templateId is null 
  3325.                      the default "SFX3DDlg" DLG_OPENDIR template is used.
  3326.  
  3327.      center          Specifies whether to center the dialog box over 
  3328.                      the desktop window. If center is TRUE the dialog 
  3329.                      box is centered. If it's FALSE it's not.
  3330.  
  3331.  - The default flags set internally by this function are 
  3332.    OFN_PATHMUSTEXIST, OFN_ENABLETEMPLATE and OFN_ENABLEHOOK. This 
  3333.    function returns TRUE if successful. Otherwise, it returns 
  3334.    FALSE.
  3335.  
  3336.  
  3337. SFXOPENFILE:
  3338.  
  3339.  - The new SFXOpenFile function displays an "Open File" common
  3340.    dialog box. When the OK button is pressed by the user, the 
  3341.    path of the selected file is copied into the supplied buffer.
  3342.  
  3343.  - Syntax:
  3344.  
  3345.      BOOL SFXOpenFile(HWND hwndParent, char far* file, const char far* filters,
  3346.                   DWORD flags = 0, int templateId = 0, BOOL center = FALSE,
  3347.                   const char far* title = "", DWORD far* filterIndex = 0, 
  3348.                       const char far* defExt = "");
  3349.  
  3350.      function SFXOpenFile (WndParent: HWnd; Buffer, Filters: PChar; OFNFlags: LongInt;
  3351.                            Template: Integer; Center: Boolean; Title: PChar;
  3352.                            var FilterIndex: LongInt; DefExt: PChar): BOOL;
  3353.  
  3354.  
  3355.      Parameter       Description
  3356.      -----------------------------------------------------------
  3357.      hWndParent      Identifies the window that owns the 
  3358.                      'Open File' dialog box.
  3359.  
  3360.      file            Points to a buffer that is to receive 
  3361.                      the path of the selected file.
  3362.  
  3363.      filters         Points to a null terminated character string 
  3364.                      that specifies the filters to display in the 
  3365.                      dialog box. If filters is null, the default 
  3366.                      "All Files" and "*.*" are used. 
  3367.  
  3368.      flags           Specifies the OFN flags to add to the 
  3369.                      OFN_ENABLETEMPLATE and OFN_ENABLEHOOK flags
  3370.                      set internally by this function. If flags 
  3371.                      is null the default OFN_FILEMUSTEXIST and 
  3372.                      OFN_HIDEREADONLY flags are added.
  3373.  
  3374.      templateId      Identifies which common dialog box template to 
  3375.                      load. This value can be obtained using the 
  3376.                      GetSFXTemplateId function. If templateId is null 
  3377.                      the default "SFX3DDlg" DLG_OPENSAVE template is used.
  3378.  
  3379.      center          Specifies whether to center the dialog box over 
  3380.                      the desktop window. If center is TRUE the dialog 
  3381.                      box is centered. If it's FALSE it's not.
  3382.  
  3383.      title           Points to a null terminated character string 
  3384.                      that is to be used as the dialog's title.
  3385.                      If title is null the default title "Open File"
  3386.                      is used.
  3387.  
  3388.      filterIndex     Specifies which filter to use when initially 
  3389.                      displaying file names. If filterIndex is 
  3390.                      null the first filter (1) in the filter 
  3391.                      string is used.
  3392.  
  3393.      defExt          Stores the default file extension. If 
  3394.                      defExt is null there is no default file 
  3395.                      extension.
  3396.  
  3397.  - When SFXOpenFile returns the filterIndex argument contains the 
  3398.    index of the selected filter string (eg 1, 2, 3 etc.). This 
  3399.    function returns TRUE if successful. Otherwise. it returns 
  3400.    FALSE. 
  3401.  
  3402.  
  3403. SFXSAVEFILE:
  3404.  
  3405.  - The new SFXSaveFile function displays an "Save File As" common
  3406.    dialog box. When the OK button is pressed by the user, the 
  3407.    selected path is copied into the supplied buffer.
  3408.  
  3409.  - Syntax:
  3410.  
  3411.      BOOL SFXSaveFile(HWND hwndParent, char far* file, const char far* filters,
  3412.                   DWORD flags = 0, int templateId = 0, BOOL center = FALSE,
  3413.                   const char far* title = "", DWORD far* filterIndex = 0, 
  3414.                       const char far* defExt = "");
  3415.  
  3416.      function SFXSaveFile (WndParent: HWnd; Buffer, Filters: PChar; OFNFlags: LongInt;
  3417.                            Template: Integer; Center: Boolean; Title: PChar;
  3418.                            var FilterIndex: LongInt; DefExt: PChar): BOOL;
  3419.  
  3420.  
  3421.      Parameter       Description
  3422.      -----------------------------------------------------------
  3423.      hWndParent      Identifies the window that owns the 
  3424.                      'Save File As' dialog box.
  3425.  
  3426.      file            Points to a buffer that is to receive 
  3427.                      the path of the selected file.
  3428.  
  3429.      filters         Points to a null terminated character string 
  3430.                      that specifies the filters to display in the 
  3431.                      dialog box. If filters is null, the default 
  3432.                      "All Files" and "*.*" are used. 
  3433.  
  3434.      flags           Specifies the OFN flags to add to the 
  3435.                      OFN_ENABLETEMPLATE and OFN_ENABLEHOOK flags
  3436.                      set internally by this function. If flags 
  3437.                      is null the default OFN_FILEMUSTEXIST and 
  3438.                      OFN_HIDEREADONLY flags are added.
  3439.  
  3440.      templateId      Identifies which common dialog box template to 
  3441.                      load. This value can be obtained using the 
  3442.                      GetSFXTemplateId function. If templateId is null 
  3443.                      the default "SFX3DDlg" DLG_OPENSAVE template 
  3444.                      is used.
  3445.  
  3446.      center          Specifies whether to center the dialog box over 
  3447.                      the desktop window. If center is TRUE the dialog 
  3448.                      box is centered. If it's FALSE it's not.
  3449.  
  3450.      title           Points to a null terminated character string 
  3451.                      that is to be used as the dialog's title.
  3452.                      If title is null the default title "Save 
  3453.                      File As" is used.
  3454.  
  3455.      filterIndex     Specifies which filter to use when initially 
  3456.                      displaying file names. If filterIndex is 
  3457.                      null the first filter (1) in the filter 
  3458.                      string is used.
  3459.  
  3460.      defExt          Stores the default file extension. If 
  3461.                      defExt is null there is no default file 
  3462.                      extension.
  3463.  
  3464.  - When SFXSaveFile returns the filterIndex argument contains the 
  3465.    index of the selected filter string (eg 1, 2, 3 etc.). This 
  3466.    function returns TRUE if successful. Otherwise. it returns 
  3467.    FALSE. 
  3468.  
  3469.  
  3470. SFXCHOOSECOLOR:
  3471.  
  3472.  - The new SFXChooseColor function displays a "Choose Color" common
  3473.    dialog box. When the OK button is pressed by the user, the 
  3474.    'rgbColor' argument contains the RGB value of the selected color. 
  3475.  
  3476.  - Syntax:
  3477.  
  3478.      BOOL SFXChooseColor(HWND hwndParent, COLORREF far* rgbColor, 
  3479.                          DWORD flags = 0, int templateId = 0, 
  3480.                          BOOL center = FALSE, COLORREF far* customColors = 0);
  3481.  
  3482.      function SFXChooseColor(WndParent: HWnd; var RGBColor: LongInt; 
  3483.                              CCFlags: LongInt; Template: Integer; 
  3484.                              Center: Boolean; CustomColors: PLongInt): BOOL;
  3485.  
  3486.  
  3487.      Parameter       Description
  3488.      -----------------------------------------------------------
  3489.      hWndParent      Identifies the window that owns the 
  3490.                      'Choose Color' dialog box.
  3491.  
  3492.      rgbColor        Specifies the color initially selected when 
  3493.                      the dialog box is created and it contains the 
  3494.                      users color selection when the dialog box is 
  3495.                      closed.
  3496.  
  3497.      flags           Specifies the CHOOSECOLOR flags to add to the 
  3498.                      CC_ENABLETEMPLATE and CC_ENABLEHOOK flags
  3499.                      set internally by this function. If flags 
  3500.                      is null the default CC_RGBINIT flag is added.
  3501.  
  3502.      templateId      Identifies which common dialog box template to 
  3503.                      load. This value can be obtained using the 
  3504.                      GetSFXTemplateId function. If templateId is null 
  3505.                      the default "SFX3DDlg" DLG_COLOR template 
  3506.                      is used.
  3507.  
  3508.      center          Specifies whether to center the dialog box over 
  3509.                      the desktop window. If center is TRUE the dialog 
  3510.                      box is centered. If it's FALSE it's not.
  3511.  
  3512.      customColors    Points to an array of 16 DWORDs (LongInts) 
  3513.                      that contain RGB values for the custom color boxes 
  3514.                      in the dialog box. If the user modifies these colors 
  3515.                      the system updates the array with the new RGB values. 
  3516.                      If this value is null, the default array containing 
  3517.                      16 shades of grey is used. 
  3518.  
  3519.  - When this function returns 'rgbColor' contains the user's selected color
  3520.    and 'customColors' points to the updated color array.
  3521.  
  3522.  
  3523. SFXCHOSEFONT:
  3524.  
  3525.  - The new SFXChooseFont function displays a "Choose Font" common
  3526.    dialog box. When the OK button is pressed by the user, the 
  3527.    supplied LOGFONT structure is updated.
  3528.  
  3529.  - Syntax:
  3530.  
  3531.      BOOL SFXChooseFont(HWND hwndParent, LOGFONT far* logFont, 
  3532.                         DWORD flags = 0, int templateId = 0, 
  3533.                         BOOL center = FALSE, COLORREF far* rgbColor = 0);
  3534.  
  3535.      function SFXChooseFont(WndParent: HWnd; var LogFont: TLogFont; 
  3536.                             CFFlags: LongInt; Template: Integer; 
  3537.                             Center: Boolean; var RGBColor: LongInt): BOOL;
  3538.  
  3539.  
  3540.      Parameter       Description
  3541.      -----------------------------------------------------------
  3542.      hWndParent      Identifies the window that owns the 
  3543.                      'Choose Font' dialog box.
  3544.  
  3545.      logFont         Points to a logFont structure that specifies 
  3546.                      the font used to initialze dialog box. When the 
  3547.                      user closes the dialog box the system updates the 
  3548.                      logFont structure.
  3549.  
  3550.      flags           Specifies the CHOOSEFONT flags to add to the 
  3551.                      CF_INITTOLOGFONTSTRUCT, CF_ENABLETEMPLATE and 
  3552.                      CF_ENABLEHOOK flags set internally by this function. 
  3553.                      If flags is null the default CF_SCREENFONTS flag is 
  3554.                      added.
  3555.  
  3556.      templateId      Identifies which common dialog box template to 
  3557.                      load. This value can be obtained using the 
  3558.                      GetSFXTemplateId function. If templateId is null 
  3559.                      the default "SFX3DDlg" DLG_EXFONT template is used.
  3560.  
  3561.      center          Specifies whether to center the dialog box over 
  3562.                      the desktop window. If center is TRUE the dialog 
  3563.                      box is centered. If it's FALSE it's not.
  3564.  
  3565.      rgbColor        Specifies the initial RGB color value that 
  3566.                      should be used to set the text color. When 
  3567.                      the dialog box is closed this value contains 
  3568.                      the color of the font selected by the user.
  3569.  
  3570.  - When this function returns 'rgbColor' contains the color of 
  3571.    the font selected by the user and the logFont structure 
  3572.    contains the updated LOGFONT data.
  3573.  
  3574.  
  3575. ALIGNBRUSH:
  3576.  
  3577.  - Syntax:
  3578.  
  3579.      void AlignBrush(HWND hWnd, HDC hDC, HBRUSH hBrush)
  3580.  
  3581.      procedure AlignBrush(Wnd: HWnd; DC: HDC; Brush: HBrush) ;
  3582.  
  3583.  
  3584.      Parameter       Description
  3585.      -----------------------------------------------------------
  3586.      hWnd         Handle of window to align brush with origin.
  3587.  
  3588.      hDC         Device context to set new origin.
  3589.  
  3590.      hBrush         Brush to align.
  3591.  
  3592.  - AlignBrush calls UnrealizeObject and SetBrushOrg to 
  3593.    align the origin of hBrush in hDC to the origin of hWnd.
  3594.  
  3595.  
  3596. BLACKFRAME:
  3597.  
  3598.  - Syntax:
  3599.  
  3600.      void BlackFrame(HDC hDC, int X1, int Y1, int X2, int Y2)
  3601.  
  3602.      procedure BlackFrame(DC: HDC; X1, Y1, X2, Y2: Integer) ;
  3603.  
  3604.  
  3605.      Parameter       Description
  3606.      -----------------------------------------------------------
  3607.      hDC         Identifies the device context.
  3608.  
  3609.      X1                 Specifies the logical x-coordinate of the upper 
  3610.                      left corner of the frame.
  3611.  
  3612.      Y1                 Specifies the logical y-coordinate of the upper 
  3613.                      left corner of the frame.
  3614.  
  3615.      X2                 Specifies the logical x-coordinate of the lower 
  3616.                      right corner of the frame.
  3617.  
  3618.      Y2                 Specifies the logical y-coordinate of the lower 
  3619.                      right corner of the frame.
  3620.  
  3621.  - BlackFrame draws a black frame (one pixel in width) around the 
  3622.    rectangle specified by X1, Y1, X2 and Y2. The top-right and 
  3623.    bottom-right pixels are dark gray to prevent pointing.
  3624.  
  3625.  
  3626. CHILDTOPARENTRECT:
  3627.  
  3628.  - Syntax
  3629.  
  3630.      RECT far* ChildToParentRect(HWND hWnd)
  3631.  
  3632.      function ChildToParentRect(Wnd: HWnd): PRect ;
  3633.  
  3634.  
  3635.      Parameter       Description
  3636.      -----------------------------------------------------------
  3637.      hWnd         Handle of child window.
  3638.  
  3639.  - ChildToParentRect returns a pointer to a RECT data structure 
  3640.    that contains the dimensions of hWnd in parent client 
  3641.    coordinates.
  3642.  
  3643.  
  3644. DRAWBORDER and DRAW3DBORDER:
  3645.  
  3646.  - The first argument in these two functions previously specified 
  3647.    a window handle. This has been been changed to a display 
  3648.    context. The actual function in SFX200.DLL accepts either a valid 
  3649.    window handle or display context so it's backwardly compatible. 
  3650.    However, the new function declaration in SFX200.PAS and SFX200.H
  3651.    specifies a display context.
  3652.  
  3653.  - Syntax
  3654.  
  3655.      void DrawBorder(HDC hDC, int x, int y, int width, int height, 
  3656.                      UINT style  = BD_RECESSED)
  3657.  
  3658.      void Draw3DBorder(HDC hDC, int x, int y, int width, int height, 
  3659.                        UINT style  = BD_RECESSED)
  3660.  
  3661.      procedure DrawBorder(DC: HDC; X, Y, W, H: Integer; Style: Word);
  3662.  
  3663.      procedure Draw3DBorder(DC: HDC; X, Y, W, H: Integer; Style: Word);
  3664.  
  3665.  
  3666.      Parameter       Description
  3667.      -----------------------------------------------------------
  3668.      hDC         Identifies the display context.
  3669.  
  3670.      x                 Specifies the logical x coordinate of the top
  3671.                      left corner of the rectangular border.
  3672.  
  3673.      y                 Specifies the logical y coordinate of the top 
  3674.                      left corner of the rectangular border.
  3675.  
  3676.      width           Specifies the width of the rectangular border.
  3677.  
  3678.      height          Specifies the height of the rectangular border.
  3679.  
  3680.      style           Specifies the border style. It can be BD_RECESSED or 
  3681.                      BD_RAISED.
  3682.  
  3683.  - DrawBorder draws a Borland style 3-dimensional border (one pixel 
  3684.    in width) around the rectangle specified by X, Y, W and H. This 
  3685.    border can be recessed (BD_RECESSED) or raised (BD_RAISED). 
  3686.  
  3687.  - Draw3DBorder draws a 3-dimensional border (three pixels in width) 
  3688.    around the rectangle specified by X, Y, W and H. This border 
  3689.    can either be recessed (BD_RECESSED) or raised (BD_RAISED). 
  3690.  
  3691.  
  3692. ERASEOBJECT:
  3693.  
  3694.  - Syntax
  3695.      
  3696.      BOOL EraseObject(HGDIOBJ hObject)
  3697.  
  3698.      function EraseObject(Handle: THandle): BOOL;
  3699.  
  3700.  
  3701.      Parameter       Description
  3702.      -----------------------------------------------------------
  3703.      hObject         Identifies a handle to a logical pen, brush, font, 
  3704.                      bitmap, region or palette.
  3705.  
  3706.  - EraseObject is a safe way to delete a resource object 
  3707.    from memory. It checks to make sure the handle identified by 
  3708.    hObejct is valid before calling DeleteObject. The return 
  3709.    value is TRUE if hObject is erased. Otherwise, it is FALSE.
  3710.  
  3711.  
  3712. GETSFXCTRLFONT:
  3713.  
  3714.  - Syntax
  3715.  
  3716.      HFONT GetSFXCtrlFont(HWND hWnd)
  3717.  
  3718.      function GetSFXCtrlFont(Wnd: HWnd): HFont;
  3719.  
  3720.  
  3721.      Parameter       Description
  3722.      -----------------------------------------------------------
  3723.      hWnd            Identifies the control's parent window.
  3724.  
  3725.  - GetSFXCtrlFont retrieves the LOGFONT data for current dialog 
  3726.    box bold font. It sets the lfWeight member to FW_NORMAL and
  3727.    creates a new font. The return value is a handle to the 
  3728.    newly created font. If hWnd is NULL the bold system font is 
  3729.    retrieved and used to create a fine system font. You are 
  3730.    responsible for deleting this font.
  3731.  
  3732.  - SFX controls use this function to create the MBS_DEFFONT,
  3733.    MSH_DEFFONT and MSS_DEFFONT styles which are set by 
  3734.    the fine font check box in the Resource Workshop SFX button, 
  3735.    checkbox, radiobutton, static and shade style dialog boxes.  
  3736.  
  3737.  
  3738. GETSFXOBJECT:
  3739.  
  3740.  - Syntax
  3741.  
  3742.      HGDIOBJ GetSFXObject(int index)
  3743.  
  3744.      function GetSFXObject(Index: Integer): THandle;
  3745.  
  3746.  
  3747.      Parameter       Description
  3748.      -----------------------------------------------------------
  3749.      index           Specifies the type of SFX stock object desired. 
  3750.                      index must be one of the following values:
  3751.  
  3752.                      Value              Meaning
  3753.                      -------------------------------------------
  3754.                      GLAZE_BRUSH        Glaze brush
  3755.                      STEEL_BRUSH        Chiselled steel brush
  3756.                      RED_BRUSH          Red brush
  3757.                      LIME_BRUSH         lime brush
  3758.                      YELLOW_BRUSH       yellow brush
  3759.                      BLUE_BRUSH         Blue brush
  3760.                      MAGENTA_BRUSH      Magenta brush
  3761.                      MAROON_BRUSH       Maroon brush
  3762.                      GREEN_BRUSH        Green breen
  3763.                      NAVY_BRUSH         Navy brush
  3764.                      PURPLE_BRUSH       Purple brush
  3765.                      FINE_FONT          Regular MS Sans Serif 8 font
  3766.                      BOLD_FONT          Bold MS Sans Serif 8 font
  3767.                      RED_PEN            Red pen
  3768.                      BLUE_PEN           Blue pen
  3769.                      GREEN_PEN          Green pen
  3770.                      MAROON_PEN         Maroon pen
  3771.                      NAVY_PEN           Navy pen
  3772.                      PURPLE_PEN         Purple pen
  3773.                      SYSTEM_FINE_FONT   Regular system font, ie not Bold
  3774.  
  3775.  - The return value is the handle of the desired stock object. 
  3776.    Otherwise, it is NULL.
  3777.  
  3778.  - The SFX stock objects are used internally by 
  3779.    SFX200.DLL to draw its custom controls, dialogs and windows. Do 
  3780.    not delete the handle returned by this function. 
  3781.  
  3782.  
  3783. GETSFXINSTANCE:
  3784.  
  3785.  - Syntax
  3786.  
  3787.      HINSTANCE GetSFXInstance()
  3788.  
  3789.      function GetSFXInstance: THandle;
  3790.  
  3791.  - No parameters.
  3792.  
  3793.  - GetSFXInstance returns the instance handle of SFX200.DLL. 
  3794.    This handle can be used as the hInstance parameter in a common 
  3795.    dialog structure loading a custom template from SFX200.DLL.
  3796.  
  3797.  
  3798. GETSFXTEMPLATE:
  3799.  
  3800.  - Syntax:
  3801.  
  3802.      char far* GetSFXTemplate(char far* className, UINT templateType) 
  3803.  
  3804.      function GetSFXTemplate(Class: PChar; Template: Word): PChar;
  3805.  
  3806.  
  3807.      Parameter       Description
  3808.      -----------------------------------------------------------
  3809.      className      Identifies the SFX dialog class. It must be 
  3810.                     one of the following classes: SFX3DDlg, 
  3811.                     SFXGlazeDlg, SFXGrayDlg or SFXSteelDlg.
  3812.  
  3813.      templateType   Identifies the common dialog box template. 
  3814.                     templateType must be one of the template ID's:
  3815.  
  3816.                      Value            Description
  3817.                      -------------------------------------------
  3818.                      DLG_COLOR    Choose color dialog box
  3819.                      DLG_EXCOLOR  Customised choose color dialog box
  3820.                      DLG_OPENSAVE       Open/save dialog box
  3821.                      DLG_EXOPENSAVE     Open/save with extended select
  3822.                      DLG_PRINT          Print dialog box
  3823.                      DLG_PRINTSETUP     Print setup dialog box
  3824.                      DLG_FIND           Find dialog box
  3825.                      DLG_REPLACE        Replace dialog box
  3826.                      DLG_FONT           Font dialog box
  3827.                      DLG_EXFONT         Customised font dialog box
  3828.  
  3829.  - GetSFXTemplate returns a pointer to a null terminated string 
  3830.    that identifies the common dialog box template to load. The 
  3831.    pointer should be used as the lpTemplateName member in your 
  3832.    common dialog structure. 
  3833.  
  3834.  
  3835. GETSFXTEMPLATEID:
  3836.  
  3837.  - Syntax:
  3838.  
  3839.      int GetSFXTemplateId(char far* className, UINT templateType)
  3840.  
  3841.      function GetSFXTemplate(Class: PChar; Template: Word): Integer;
  3842.  
  3843.  
  3844.      Parameter       Description
  3845.      -----------------------------------------------------------
  3846.      className      Identifies the SFX dialog class. It must be 
  3847.                     one of the following classes: SFX3DDlg, 
  3848.                     SFXGlazeDlg, SFXGrayDlg or SFXSteelDlg.
  3849.  
  3850.      templateType   Identifies the common dialog box template. 
  3851.                     templateType must be one of the template ID's:
  3852.  
  3853.                      Value            Description
  3854.                      -------------------------------------------
  3855.                      DLG_COLOR    Choose color dialog box
  3856.                      DLG_EXCOLOR  Customised choose color dialog box
  3857.                      DLG_OPENSAVE       Open/save dialog box
  3858.                      DLG_EXOPENSAVE     Open/save with extended select
  3859.                      DLG_PRINT          Print dialog box
  3860.                      DLG_PRINTSETUP     Print setup dialog box
  3861.                      DLG_FIND           Find dialog box
  3862.                      DLG_REPLACE        Replace dialog box
  3863.                      DLG_FONT           Font dialog box
  3864.                      DLG_EXFONT         Customised font dialog box
  3865.  
  3866.  - GetSFXTemplateId returns the resource Id that identifies the 
  3867.    common dialog box template to load. This value should be used 
  3868.    as the templateId parameter in your ObjectWindows 2.0 common 
  3869.    dialog box constructor or one of the new common dialog 
  3870.    box functions.  
  3871.  
  3872.  
  3873. GETSFXVERSION:
  3874.  
  3875.  - Syntax
  3876.  
  3877.      UINT GetSFXVersion ()
  3878.  
  3879.      function GetSFXVersion: Word;
  3880.  
  3881.  - No parameters.
  3882.  
  3883.  - The return value 'SFXVERSION' specifies the version number of SFX200.DLL.
  3884.    The current value of SFXVERSION is 0x0250 ($0250) for 
  3885.    version 2.6.
  3886.  
  3887.  
  3888. ISNCACTIVE:
  3889.  
  3890.  - Since the new default window/dialog functions draw the
  3891.    non-client area and control window/dialog activation/inactivation they 
  3892.    need to keep track of a window's activation state. IsNCActive 
  3893.    returns the activation state of the caption not the window. 
  3894.  
  3895.  - Syntax:
  3896.  
  3897.      BOOL IsNCActive(HWND hWnd)
  3898.  
  3899.      function IsNCActive(Wnd: HWnd): BOOL;
  3900.  
  3901.  
  3902.      Parameter       Description
  3903.      -----------------------------------------------------------
  3904.      hWnd            Identifies the SFX window whose activation
  3905.                      state is to be checked.
  3906.  
  3907.  - If the caption is active IsNCActive returns TRUE. Otherwise it 
  3908.    returns FALSE.
  3909.  
  3910.  
  3911. PTINCLIENT and PTINWINDOW:
  3912.  
  3913.  - Syntax
  3914.  
  3915.      BOOL PtInClient(HWND hWnd, POINT point)
  3916.  
  3917.      BOOL PtInWindow(HWND hWnd, POINT point)
  3918.  
  3919.      function PtInClient(Wnd: HWnd; Point: TPoint): BOOL;
  3920.  
  3921.      function PtInWindow(Wnd: HWnd; Point: TPoint): BOOL;
  3922.   
  3923.  
  3924.      Parameter       Description
  3925.      -----------------------------------------------------------
  3926.      hWnd            Handle of the window to be checked.
  3927.  
  3928.      point           Specifies a POINT structure that contains 
  3929.                      the specified point.
  3930.  
  3931.  - If the point lies within the client area of the window, 
  3932.    PtInClient returns TRUE. If the point lies anywhere within the 
  3933.    window, PtInWindow returns TRUE. Otherwise both functions 
  3934.    return FALSE.
  3935.  
  3936.  
  3937. SFXDEFDLGPROC:
  3938.  
  3939.  - Syntax
  3940.  
  3941.      LRESULT SFXDefDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
  3942.  
  3943.      function SFXDefDlgProc(Dlg: HWnd; Msg, wParam: Word; lParam: LongInt): LongInt;
  3944.  
  3945.  
  3946.      Parameter       Description
  3947.      -----------------------------------------------------------
  3948.      hDlg            Handle of the dialog box.
  3949.  
  3950.      msg             Specifies the message number.
  3951.  
  3952.      wParam          Specifies 16 bits of additional message-dependent information.
  3953.  
  3954.      lParam          Specifies 32 bits of additional message-dependent information.
  3955.  
  3956.  - This function provides default processing for any Windows 
  3957.    messages that an SFX dialog box does not process. All 
  3958.    messages not explicitly processed by the Window function must 
  3959.    be passed to the SFXDefDlgProc function not the DefDlgProc 
  3960.    function.
  3961.  
  3962.  - The return value specifies the result of the message 
  3963.    processing and depends on the actual message sent.
  3964.  
  3965.  - The SFXDefDlgProc function must process the following messages:
  3966.  
  3967.       WM_CREATE
  3968.       WM_COMMAND
  3969.       WM_CTLCOLOR
  3970.       WM_DESTROY
  3971.       WM_ERASEBKGND
  3972.       WM_GETMINMAXINFO
  3973.       WM_GETTEXT
  3974.       WM_INITDIALOG
  3975.       WM_LBUTTONDOWN
  3976.       WM_NCLBUTTONDOWN
  3977.       WM_NCCALCSIZE
  3978.       WM_NCPAINT
  3979.       WM_SETBITMAP
  3980.       WM_SETBRUSH
  3981.       WM_SETTEXT
  3982.  
  3983.  - A generic Windows program should pass these messages onto 
  3984.    SXDefDlgProc. An ObjectWindows 1.0 program should call 
  3985.    DefWndProc. An ObjectWindows 2.0 program should call 
  3986.    DefaultProcessing.  
  3987.  
  3988.  
  3989. SFXDEFWINDOWPROC:
  3990.  
  3991.  - Syntax
  3992.  
  3993.      LRESULT SFXDefWindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
  3994.  
  3995.      function SFXDefWindowProc(Wnd: HWnd; Msg, wParam: Word; lParam: LongInt): LongInt;
  3996.  
  3997.  
  3998.      Parameter       Description
  3999.      -----------------------------------------------------------
  4000.      hWnd            Handle of the window.
  4001.  
  4002.      msg             Specifies the message number.
  4003.  
  4004.      wParam          Specifies 16 bits of additional message-dependent information.
  4005.  
  4006.      lParam          Specifies 32 bits of additional message-dependent information.
  4007.  
  4008.  - This function provides default processing for any Windows 
  4009.    messages that an SFX window does not process. All messages 
  4010.    not explicitly processed by the Window function must be passed 
  4011.    to the SFXDefWindowProc function not the DefWindowProc function.
  4012.  
  4013.  - The return value specifies the result of the message 
  4014.    processing and depends on the actual message sent.
  4015.  
  4016.  - The SFXDefWindowProc function must process the following messages:
  4017.  
  4018.       WM_COMMAND
  4019.       WM_CREATE
  4020.       WM_DESTROY
  4021.       WM_EXITMENULOOP (defined in SFX200.PAS or SFX200.H)
  4022.       WM_ERASEBKGND
  4023.       WM_GETMINMAXINFO
  4024.       WM_GETTEXT
  4025.       WM_LBUTTONDOWN
  4026.       WM_MENUSELECT
  4027.       WM_NCACTIVATE
  4028.       WM_NCCALCSIZE
  4029.       WM_NCLBUTTONDOWN
  4030.       WM_NCPAINT
  4031.       WM_SETBITMAP 
  4032.       WM_SETTEXT
  4033.       WM_SYSCHAR
  4034.  
  4035.  - A Generic Windows program should pass these messages onto 
  4036.    SFXDefWindowProc. An ObjectWindows 1.0 program should call 
  4037.    DefWndProc. An ObjectWindows 2.0 program should call 
  4038.    DefaultProcessing.  #$ K + #$ K + SFXDefMDIChildProc
  4039.  
  4040.  
  4041. SFXDEFFRAMEPROC:
  4042.  
  4043.  - Syntax
  4044.  
  4045.      LRESULT SFXDefFrameProc(HWND hWnd, HWND hWndClient, UINT msg, 
  4046.                              WPARAM wParam, LPARAM lParam)
  4047.  
  4048.      function SFXDefFrameProc(Wnd, ClientWnd: HWnd; Msg, wParam: Word;
  4049.                               lParam: LongInt): LongInt;
  4050.  
  4051.  
  4052.      Parameter       Description
  4053.      -----------------------------------------------------------
  4054.      hWnd            Handle of the frame window.
  4055.  
  4056.      hWndClient      Handle of the client window.
  4057.  
  4058.      msg             Specifies the message number.
  4059.  
  4060.      wParam          Specifies 16 bits of additional message-dependent information.
  4061.  
  4062.      lParam          Specifies 32 bits of additional message-dependent information.
  4063.  
  4064.  - This function provides default processing for any Windows 
  4065.    messages that an SFX multiple document interface (MDI) 
  4066.    frame window does not process. All messages not explicitly 
  4067.    processed by the Window function must be passed to the 
  4068.    SFXDefFrameProc function not the DefFrameProc function.
  4069.  
  4070.  - The return value specifies the result of the message 
  4071.    processing and depends on the actual message sent.
  4072.  
  4073.  - The SFXDefFrameProc function must process the following messages:
  4074.  
  4075.       WM_COMMAND
  4076.       WM_CREATE
  4077.       WM_DESTROY
  4078.       WM_EXITMENULOOP (defined in SFX200.PAS or SFX200.H)
  4079.       WM_ERASEBKGND
  4080.       WM_GETMINMAXINFO
  4081.       WM_GETTEXT
  4082.       WM_MENUSELECT
  4083.       WM_NCACTIVATE
  4084.       WM_NCCALCSIZE
  4085.       WM_NCLBUTTONDOWN
  4086.       WM_NCPAINT
  4087.       WM_SETBITMAP 
  4088.       WM_SETTEXT
  4089.       WM_SYSCHAR
  4090.  
  4091.  - A Generic Windows program should pass these messages onto 
  4092.    SFXDefFrameProc. An ObjectWindows 1.0 program should call 
  4093.    DefWndProc. An ObjectWindows 2.0 program should call 
  4094.    DefaultProcessing.  
  4095.  
  4096.  
  4097. SFXDEFMDICHILDPROC:
  4098.  
  4099.  - Syntax
  4100.  
  4101.      LRESULT SFXDefMDIChildProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
  4102.  
  4103.      function SFXDefMDIChildProc(Wnd: HWnd; Msg, wParam: Word; lParam: LongInt): LongInt;
  4104.  
  4105.  
  4106.      Parameter       Description
  4107.      -----------------------------------------------------------
  4108.      hWnd            Handle of the MDI child window.
  4109.  
  4110.      msg             Specifies the message number.
  4111.  
  4112.      wParam          Specifies 16 bits of additional message-dependent information.
  4113.  
  4114.      lParam          Specifies 32 bits of additional message-dependent information.
  4115.  
  4116.  - This function provides default processing for any Windows 
  4117.    messages that an SFX MDI child window does not process. 
  4118.    All messages not explicitly processed by the Window function 
  4119.    must be passed to the SFXDefMDIChildProc function not the 
  4120.    DefMDIChildProc function.
  4121.  
  4122.  - The return value specifies the result of the message 
  4123.    processing and depends on the actual message sent.
  4124.  
  4125.  - The SFXDefMDIChildProc function must process the following messages:
  4126.  
  4127.       WM_DESTROY
  4128.       WM_ERASEBKGND
  4129.       WM_GETTEXT
  4130.       WM_MENUSELECT
  4131.       WM_NCACTIVATE
  4132.       WM_NCCALCSIZE
  4133.       WM_NCCREATE
  4134.       WM_NCPAINT
  4135.       WM_SIZE
  4136.       WM_SETBITMAP 
  4137.       WM_SETTEXT
  4138.  
  4139.  - A generic Windows program should pass these messages onto 
  4140.    SFXDefMDIChildProc. An ObjectWindows 1.0 program should call 
  4141.    DefWndProc. An ObjectWindows 2.0 program should call 
  4142.    DefaultProcessing.
  4143.  
  4144.  
  4145. SFXMSGBOX:
  4146.  
  4147.  - The SFXMsgBox function creates and displays an SFX message box 
  4148.    that contains an application supplied message and caption, plus 
  4149.    any combination of predefined icons and push buttons. The 
  4150.    maximum number of characters you can display in a message box 
  4151.    is about 220, depending on the word combination. 
  4152.  
  4153.  - The SFXMsgBox function is call-compatible with the Windows API 
  4154.    MessageBox function except for one extra parameter: style. 
  4155.    'style' is a word value specifying the window style. If 
  4156.     style is zero the default style is used: MWS_SFXFRAME.
  4157.  
  4158.  - Syntax
  4159.  
  4160.      int SFXMsgBox(HWND hWndParent, const char far* text, const char far* 
  4161.                    caption, UINT type = 0, UINT style = 0)
  4162.  
  4163.      function SFXMsgBox(WndParent: HWnd; Txt, Caption: PChar; TextType, 
  4164.                         Style: Word): Integer;
  4165.  
  4166.      Parameter       Description
  4167.      -----------------------------------------------------------
  4168.      hWndParent         Identifies the window that owns the message box. 
  4169.                      This can be NULL.
  4170.  
  4171.      text            Points to a null-terminated string that contains 
  4172.                      the message to be displayed.
  4173.  
  4174.      caption         Points to a null-terminated character string to 
  4175.                      be used for the window caption.
  4176.  
  4177.      type            Specifies the contents of the message box. type 
  4178.                      can be any combination of values defined by the 
  4179.                      Windows API MessageBox function plus any of the 
  4180.                      following:
  4181.  
  4182.                      Value            Description
  4183.                      -------------------------------------------
  4184.                      MB_GO              Go button
  4185.                      MB_GOSTOP          Go and Stop buttons
  4186.                      MB_OKCANCELHELP    OK, Cancel and Help buttons
  4187.                      MB_YESNOHELP       Yes, No and Help buttons
  4188.  
  4189.      style           Specifies the message box style. style can be one 
  4190.                      of the following values:
  4191.  
  4192.                      Value            Description
  4193.                      -------------------------------------------
  4194.                      MWS_SFXFRAME       SFXFrame with light gray client 
  4195.                                         area
  4196.                      MWS_GRAY           Modal frame with raised light 
  4197.                                         gray client area
  4198.                      MWS_GLAZE          Modal frame with raised glaze 
  4199.                                         client area
  4200.                      MWS_STEEL          Modal frame with raised steel 
  4201.                                         client area
  4202.                      MWS_3DGRAY         3DFrame with raised light gray 
  4203.                                         client area
  4204.                      MWS_3DGLAZE        3DFrame with raised glaze client 
  4205.                                         area
  4206.                      MWS_3DSTEEL        3DFrame with raised steel client 
  4207.                                         area
  4208.  
  4209.  - The return value specifies the outcome of the function. It 
  4210.    is zero if there is not enough memory to create the message 
  4211.    box. Otherwise, it is one of the following values:
  4212.  
  4213.      Return Value       Description
  4214.      -----------------------------------------------------------
  4215.      IDOK               OK button pressed
  4216.      IDCANCEL           Cancel button pressed
  4217.      IDABORT            Abort button pressed
  4218.      IDRETRY            Retry button pressed
  4219.      IDIGNORE           Ignore button pressed
  4220.      IDYES              Yes button pressed
  4221.      IDNO               No button pressed
  4222.      IDGO               Go button pressed
  4223.      IDSTOP             Stop button pressed
  4224.  
  4225.  - The MB_OKCANCELHELP and MB_YESNOHELP flags create a message 
  4226.    box that contains a help button. When the user selects the help 
  4227.    button a WM_COMMAND message is sent to the message box's parent 
  4228.    window. wParam contains the help button ID: IDHELP, 
  4229.    LOWORD(lParam) contains the handle of the static control 
  4230.    displaying the message text and HIWORD(lParam) contains the 
  4231.    BN_CLICKED notification code. Usually, LOWORD(lParam) contains 
  4232.    the window handle of the control sending the message not a 
  4233.    sibling window.
  4234.  
  4235.  - To distinguish one help button BN_CLICKED message from 
  4236.    another you must do the following:
  4237.  
  4238.      1. Trap the WM_COMMAND message sent to the parent of the 
  4239.         message box.           
  4240.  
  4241.      2.    Use GetWindowText to retrieve the message text from the 
  4242.         static control identified by LOWORD(lParam) and compare this 
  4243.         text with known message texts. If it matches, display the 
  4244.         appropriate help.
  4245.  
  4246.  
  4247. SFXINPUTBOX:
  4248.  
  4249.  - This function creates and displays an SFX input box that 
  4250.    prompts the user for a single line of input text.
  4251.  
  4252.  - Syntax
  4253.  
  4254.      int SFXInputBox(HWND hWndParent, const char far* caption, 
  4255.                      const char far* prompt, char far* text,  
  4256.                      int maxCount = 144, UINT style = 0)
  4257.  
  4258.      function SFXInputBox(WndParent: HWnd; Caption, Prompt, Text: PChar; 
  4259.                           MaxCount: Integer; Style: Word): Integer;
  4260.  
  4261.  
  4262.      Parameter       Description
  4263.      -----------------------------------------------------------
  4264.      hWndParent      Identifies the window that owns the input box. 
  4265.                      This can be NULL.
  4266.  
  4267.      caption         Points to a null-terminated character string to 
  4268.                      be use for the window caption.
  4269.  
  4270.      prompt          Points to a null-terminated character that is 
  4271.                      displayed above the edit control as a prompt.
  4272.  
  4273.      text            Points to a buffer that returns the text retrieved
  4274.                      from the user.
  4275.  
  4276.      maxCount        Maximum number of characters to copy into the buffer .
  4277.  
  4278.      style           Specifies the input box window style. style can be 
  4279.                      one of the following values:
  4280.  
  4281.                      Value            Description
  4282.                      -------------------------------------------
  4283.                      MWS_SFXFRAME       SFXFrame with light gray client 
  4284.                                         area
  4285.                      MWS_GRAY           Modal frame with raised light 
  4286.                                         gray client area
  4287.                      MWS_GLAZE          Modal frame with raised glaze 
  4288.                                         client area
  4289.                      MWS_STEEL          Modal frame with raised steel 
  4290.                                         client area
  4291.                      MWS_3DGRAY         3DFrame with raised light gray 
  4292.                                         client area
  4293.                      MWS_3DGLAZE        3DFrame with raised glaze client 
  4294.                                         area
  4295.                      MWS_3DSTEEL        3DFrame with raised steel client 
  4296.                                         area
  4297.  
  4298.  - The return value specifies the outcome of the function. It 
  4299.    is zero if there is not enough memory to create the input box. 
  4300.    Otherwise, it is one of the following values:
  4301.  
  4302.      Return Value       Description
  4303.      -----------------------------------------------------------
  4304.      IDOK               OK button pressed
  4305.      IDCANCEL           Cancel button pressed
  4306.  
  4307.  - To use an input box in your application you must set up a 
  4308.    buffer and pass it as the 'text' parameter in SFXInputBox. Any 
  4309.    text in the buffer will be displayed in the edit control when 
  4310.    the input box first appears. If the buffer is empty the edit 
  4311.    control is blank. If the input box title is Password the edit 
  4312.    control is created with the ES_PASSWORD flag. The text passed 
  4313.    as 'prompt' appears above the edit control as a prompt to the 
  4314.    user.
  4315.  
  4316.  - If the user enters or changes the text in the edit control and 
  4317.    selects the OK button the content of the edit control is copied 
  4318.    into the buffer, up to maxCount characters. If the user 
  4319.    selects the Cancel button the buffer remains unchanged.  
  4320.  
  4321.  
  4322. CENTERWINDOW:
  4323.  
  4324.  - Syntax
  4325.  
  4326.      void CenterWindow(HWND hWndParent, HWND hWnd)
  4327.  
  4328.      procedure CenterWindow(ParentWnd, Wnd: HWnd);
  4329.  
  4330.  
  4331.      Parameter       Description
  4332.      -----------------------------------------------------------
  4333.      hWndParent      Handle of parent window..
  4334.  
  4335.      hWnd            Handle of window to center.
  4336.  
  4337.  - CenterWindow moves hWnd to the center of hWndParent. If 
  4338.    hWndParent is NULL hWnd is centered over the desktop window.
  4339.  
  4340.  
  4341.  
  4342. ----------------------
  4343. 21.  PRIVATE MESSAGES.
  4344. ----------------------
  4345.  
  4346.  - SFX200.DLL uses the following private messages to modify the 
  4347.    appearance and/or behaviour of its custom controls, dialogs
  4348.    and windows.
  4349.  
  4350.      WM_ALIGNTOOLBAR 
  4351.      WM_DRAWPERCENT    
  4352.      WM_GETCHECK         
  4353.      WM_RESETPERCENT     
  4354.      WM_SETBITMAP        
  4355.      WM_SETBRUSH       
  4356.      WM_SETCHECK         
  4357.      WM_SETPEN           
  4358.      WM_SFXCTLCOLOR      
  4359.      WM_SFXAPPLYCOLOR    
  4360.      WM_SFXAPPLYFONT     
  4361.      WM_SFXHELP
  4362.      WM_SFXINITDIALOG
  4363.  
  4364. WM_ALIGNTOOLBAR:
  4365.  
  4366.  - wParam  =  0 ;    /* not used, must be zero */
  4367.  
  4368.    lParam  =  0L ;    /* not used, must be zero */
  4369.  
  4370.  - This message has no parameters. It is used to re align an SFX 
  4371.    toolbar that has one of the following toolbar style flags set:
  4372.  
  4373.     Flag          Description
  4374.      -----------------------------------------------------------
  4375.      MTB_TOP       Aligns the toolbar along the top of the parent's 
  4376.                    client  area.
  4377.      MTB_LEFT       Aligns the toolbar along the left edge of the parent's 
  4378.                    client  area.
  4379.      MTB_RIGHT       Aligns the toolbar along the right edge of the parent's 
  4380.                    client  area.
  4381.      MTB_BOTTOM    Aligns the toolbar along the bottom of the parent's 
  4382.                    client  area.
  4383.      MTB_STATUS    Aligns the toolbar along the bottom of the parent's 
  4384.                    client  area.
  4385.  
  4386.  - An application should return zero if 
  4387.    it processes this message.
  4388.  
  4389.  
  4390.  - A WM_ALIGNTOOLBAR message should be sent to an aligned 
  4391.    toolbar every time its parent window is resized. 
  4392.  
  4393.  
  4394. WM_DRAWPERCENT:
  4395.  
  4396.  - wParam  = percent ;    /* percentage to draw */
  4397.  
  4398.    lParam  =  0L ;    /* not used, must be zero */
  4399.  
  4400.  
  4401.      Parameter       Description
  4402.      -----------------------------------------------------------
  4403.      percent         Value of wParam. Specifies the percent complete. 
  4404.                      It must be a value in the range 0 to 100%.
  4405.  
  4406.  - This message must be sent to a percent gauge to tell it what 
  4407.    percentage to draw.
  4408.  
  4409. -  The return value is 1 when the percentage drawn reaches 100% 
  4410.    (complete). Otherwise, it is zero. 
  4411.  
  4412.  
  4413. WM_GETCHECK
  4414.  
  4415.  - wParam  = toolId ;    /* resource Id of toolbar button */
  4416.  
  4417.    lParam  =  0L ;    /* not used, must be zero */
  4418.  
  4419.  
  4420.      Parameter       Description
  4421.      -----------------------------------------------------------
  4422.      toolId          Value of wParam. Specifies the resource Id of 
  4423.                      toolbar button whose check state is to be 
  4424.                      retrieved.
  4425.  
  4426.  - This message is sent to an SFX toolbar to retrieve the 
  4427.    check state of the tool identified by toolId.
  4428.  
  4429.  - The return value is 1 if the button identified by toolId is 
  4430.    checked. Otherwise, it is zero.
  4431.  
  4432.  - This message is only valid for toolbars created with the MTB_RADIO 
  4433.    style flag.
  4434.  
  4435.  
  4436. WM_RESETPERCENT:
  4437.  
  4438.  - wParam  = 0 ;    /* not used, must be zero */
  4439.  
  4440.    lParam  =  0L ;    /* not used, must be zero */
  4441.  
  4442.  - This message has no parameters. The message is sent to a percent gauge
  4443.    to reset the percentage drawn to zero.
  4444.  
  4445.  - This message is only valid for toolbars created with the MTB_RADIO 
  4446.    style flag.
  4447.  
  4448.  - An application should return zero if it processes this 
  4449.    message.   
  4450.  
  4451.  
  4452. WM_SETBITMAP (for Bitmap Buttons):
  4453.  
  4454.  - wParam  = newId ;    /* new resource Id of button */
  4455.    
  4456.    lParam  =  0L ;    /* not used, must be zero */
  4457.  
  4458.  
  4459.      Parameter       Description
  4460.      -----------------------------------------------------------
  4461.      newld           Value of wParam. Specifies the new resource Id.
  4462.  
  4463.  - This message is sent to an SFX button to change its ID. 
  4464.    If the button is a bitmap button, the bitmap(s) are updated to 
  4465.    reflect the new ID.
  4466.  
  4467.  - You can use this message to change the bitmap(s) and ID of an 
  4468.    existing Borland-style button or Bitmap button. The new 
  4469.    bitmap(s) must follow the Borland numbering system.
  4470.  
  4471.  - An application should return zero if it processes this message
  4472.  
  4473.  
  4474. WM_SETBITMAP (for Icon Buttons, Dialogs and Windows):
  4475.  
  4476.  - wParam  = hIcon ;    /* handle to a valid icon */
  4477.    
  4478.    lParam  =  0L ;    /* not used, must be zero */
  4479.  
  4480.  
  4481.      Parameter       Description
  4482.      -----------------------------------------------------------
  4483.      hIcon           Value of wParam. Specifies the valid icon 
  4484.                      handle.
  4485.  
  4486.  - This message is sent to an SFX Icon button to set the icon
  4487.    displayed by the button. The button ID is not changed.
  4488.  
  4489.  - This message is sent to an MWS_SFXCAPTION style dialog or window 
  4490.    to set the icon to displayed in the title bar.
  4491.  
  4492.  - An application should return zero if it processes this message
  4493.  
  4494.  
  4495. WM_SETBITMAP (for Static controls):
  4496.  
  4497.  - wParam  = 0 ;    /* not used, must be zero */
  4498.    
  4499.    lParam  =  (LPARAM)(LPCSTR)lpsz; /* address of bitmap title string */
  4500.  
  4501.  
  4502.      Parameter       Description
  4503.      -----------------------------------------------------------
  4504.      lpsz            Value of lParam. Points to a null terminated 
  4505.                      string that is the character resource ID of the 
  4506.                      bitmap to be displayed.
  4507.  
  4508.  - This message is sent to an SFX static control to change the 
  4509.    static bitmap. Since static bitmaps are loaded by 
  4510.    name, lParam must point to a null terminated string that is 
  4511.    the new bitmap name.
  4512.  
  4513.  
  4514. WM_SETBITMAP (for Toolbars):
  4515.  
  4516.  - wParam  = newId;     /* new toolbar button Id */
  4517.    
  4518.    lParam  = currentId;  /* current toolbar button Id*/
  4519.  
  4520.  
  4521.      Parameter       Description
  4522.      -----------------------------------------------------------
  4523.      newld           Value of wParam. Specifies the new toolbar 
  4524.                      button Id. If this button Id has predefined 
  4525.                      resource bitmap(s), the bitmaps are also changed.
  4526.  
  4527.      currentld       Value of lParam. Specifies the current toolbar 
  4528.                      button Id. 
  4529.  
  4530.  - This message is sent to an SFX toolbar to change a toolbar 
  4531.    button ID and Bitmap(s), if any. The button ID's in title text 
  4532.    string that was used to create the toolbar are also updated.
  4533.  
  4534.  - An application should return zero if it processes this message
  4535.  
  4536.  
  4537. WM_SETBRUSH
  4538.  
  4539.  - wParam  = hBrush ;    /* handle to a valid brush */
  4540.  
  4541.    lParam  =  0L ;    /* not used, must be zero */
  4542.  
  4543.  
  4544.      Parameter       Description
  4545.      -----------------------------------------------------------
  4546.      hBrush          Value of wParam. Specifies a valid brush handle.
  4547.  
  4548.  - This message can be sent to the following SFX objects in response
  4549.    to a WM_SFXCTLCOLOR message:
  4550.  
  4551.      Object          Description
  4552.      -----------------------------------------------------------
  4553.      SFXBUTTION      Used to paint the button face. The default is 
  4554.                      light gray.
  4555.      SFXSTATIC       Used to paint the static background. The default
  4556.                      is light gray.
  4557.      SFXSHADE        Used to paint the shade background. The default 
  4558.                      is light gray.
  4559.      SFXRADIO        Used to paint the radio button check mark. The 
  4560.                      default is black.
  4561.      SFXPERCENT      Used to paint the percent gauge background. The
  4562.                      default is off-white.
  4563.      SFX DIALOGS     Used to paint the dialog box background.
  4564.  
  4565.      SFXCOMBOBOX     Used to paint the space between the edit control 
  4566.                      and the button in a drop down combo box. The 
  4567.                      default is light gray. 
  4568.  
  4569.  - An application should return zero if it processes this message
  4570.  
  4571.  
  4572. WM_SETCHECK:
  4573.  
  4574.  - wParam  = toolId ;    /* resource Id of toolbar button */
  4575.  
  4576.    lParam  =  fCheck ;    /* check state */
  4577.  
  4578.  
  4579.      Parameter       Description
  4580.      -----------------------------------------------------------
  4581.      toolId          Value of wParam. Specifies the resource Id of
  4582.                      the toolbar button that is to have its check 
  4583.                      state changed.
  4584.  
  4585.      fCheck          Value of lParam. Specifies the new check state.
  4586.                      It can be unchecked (0) or checked (1).
  4587.  
  4588.  - This message is sent to an SFX toolbar to set the check 
  4589.    state of the toolbar button identified by toolId. 
  4590.  
  4591.  - An application should return zero if it processes this message
  4592.  
  4593.  - This message is only valid for toolbars created with the MTB_RADIO 
  4594.    style flag.
  4595.  
  4596.  
  4597. WM_SETPEN:
  4598.  
  4599.  - wParam  = hPen ;    /* handle to a valid pen */
  4600.  
  4601.    lParam  =  0L ;    /* not used, must be zero */
  4602.  
  4603.  
  4604.      Parameter       Description
  4605.      -----------------------------------------------------------
  4606.      hPen            Value of wParam. Specifies a valid pen handle.
  4607.  
  4608.  - This message is sent to an SFX check box to set its check mark color.
  4609.    It should be sent in response to a WM_SFXCTLCOLOR message.
  4610.  
  4611.  - An application should return zero if it processes this message
  4612.  
  4613.  
  4614. WM_SFXCTLCOLOR:
  4615.  
  4616.  - hDCChild  =  (HDC) wParam;             /*child-window display context*/
  4617.    hWndChild  = (HWND) LOWORD (lParam);  /* handle of child window */
  4618.    ctlType  =   (int) HIWORD (lParam);     /* type of SpecialFX control */
  4619.  
  4620.      Parameter       Description
  4621.      -----------------------------------------------------------
  4622.      hDCChild        Value of wParam. Identifies the display context
  4623.                      of the child window.
  4624.      hWndChild       Value of the low order word of lParam. Identifies
  4625.                      the child window.
  4626.      ctlType         Value of the high order word of lParam. Identifies
  4627.                      the type of control sending the message. It can be 
  4628.                      one of the following values:
  4629.  
  4630.                      Value                 Description
  4631.                      -------------------------------------------
  4632.                      SFXCTLCOLOR_BUTTON       Button
  4633.                      SFXCTLCOLOR_CHECK       Check box
  4634.                      SFXCTLCOLOR_COMBO       Combo box
  4635.                      SFXCTLCOLOR_DLG       Dialog box
  4636.                      SFXCTLCOLOR_RADIO     Radio button
  4637.                      SFXCTLCOLOR_SHADE     Group shade
  4638.                      SFXCTLCOLOR_STATIC       Static control
  4639.                      SFXCTLCOLOR_PERCENT   Percent gauge
  4640.  
  4641.  - This message is sent to the parent of an SFX control when 
  4642.    the control is about to be painted. 
  4643.  
  4644.  - An application should return zero if it processes this message
  4645.  
  4646.  - This message behaves just like the WM_CTLCOLOR message with 
  4647.    one exception; it does not use a return value. Instead, you 
  4648.    must use the SendMessage function to return a valid brush or 
  4649.    pen handle. You can use this message to set the following:
  4650.  
  4651.  - You can also set the text color for text buttons, check boxes, 
  4652.    radio buttons, group shades, static controls, combo boxes, 
  4653.    percent gauges and dialogs using the SetTextColor function. The 
  4654.    default text color is black. 
  4655.  
  4656.  
  4657. WM_SFXAPPLYCOLOR:
  4658.  
  4659.  - wParam  = 0;                    /* not used, must be zero */
  4660.  
  4661.    lParam  =  (LPARAM) rgbColor;   /* RGB color value */
  4662.  
  4663.  
  4664.      Parameter       Description
  4665.      -----------------------------------------------------------
  4666.      rgbColor        Value of lParam. Specifies an RGB color value.
  4667.  
  4668.  - This message is sent by SFX200.DLL to the owner of an SFX 
  4669.    color common dialog box when the user presses the 'Apply' 
  4670.    button. The value of rgbColor is the RGB color selected by the 
  4671.    user.
  4672.  
  4673.  
  4674. WM_SFXAPPLYFONT:
  4675.  
  4676.  - wParam  = hFont;              /* handle to a valid font */
  4677.  
  4678.    lParam  = (LPARAM) rgbColor;  /* RGB color value of hFont */
  4679.  
  4680.  
  4681.      Parameter       Description
  4682.      -----------------------------------------------------------
  4683.      hFont           Value of wParam. Specifies a valid font 
  4684.                      handle.
  4685.  
  4686.      rgbColor        Value of lParam. Specifies the RGB color value
  4687.                      of hFont.
  4688.  
  4689.  - This message is sent by SFX200.DLL to the owner of an SFX 
  4690.    font common dialog box when the user presses the 'Apply' 
  4691.    button. 'hFont' is the handle to a newly created font selected 
  4692.    by the user. 'rgbColor' is the RGB color value of the 
  4693.    selected font. 
  4694.  
  4695.  - You are responsible for deleting hFont!
  4696.  
  4697.  
  4698. WM_SFXHELP:
  4699.  
  4700.  - wParam  = hWndTemplate          /* handle to dialog box */
  4701.  
  4702.    templateType  = HIWORD(LPARAM)  /* Template identifier */
  4703.  
  4704.  
  4705.      Parameter       Description
  4706.      -----------------------------------------------------------
  4707.      hWndTemplate    Value of wParam. Handle to the dialog box 
  4708.                      sending the message.
  4709.  
  4710.      templateType    Value of the high order word of lParam. Specifies 
  4711.                      the type of SFX common dialog box template sending 
  4712.                      the message. It can be one of the following values:
  4713.    
  4714.                      Template              Meaning
  4715.                      -------------------------------------------
  4716.                      DLG_COLOR       Choose color dialog box.
  4717.                      DLG_EXCOLOR     Extended choose color.
  4718.                      DLG_OPENSAVE          Open save dialog box.
  4719.                      DLG_EXOPENSAVE        Open save with extended file selection.
  4720.                      DLG_PRINT             Print dialog box.
  4721.                      DLG_PRINTSETUP        Print setup dialog box.
  4722.                      DLG_FIND              Find dialog box
  4723.                      DLG_REPLACE           Replace dialog box.
  4724.                      DLG_FONT              Font dialog box.
  4725.                      DLG_EXFONT            Extended font dialog box
  4726.                      DLG_OPENDIR           Open directory dialog box
  4727.  
  4728.  - This message is sent by SFX200.DLL to the owner of an SFX 
  4729.    common dialog box when the user presses the 'Help' button. 
  4730.    You can use templateType to identify the dialog box type 
  4731.    sending the message.
  4732.  
  4733.  
  4734. WM_SFXINITDIALOG:
  4735.  
  4736.  - wParam  = hDlg ;               /* handle to a dialog box */
  4737.  
  4738.    templateType  = HIWORD(LPARAM)  /* Template idenifier */
  4739.  
  4740.  
  4741.      Parameter       Description
  4742.      -----------------------------------------------------------
  4743.      hDlg            Value of wParam. Handle to an SFX common dialog 
  4744.                      box.
  4745.  
  4746.      templateType    Value of the high order word of lParam. Specifies 
  4747.                      the type of SFX common dialog box template sending 
  4748.                      the message. It can be one of the following values:
  4749.    
  4750.                      Template              Meaning
  4751.                      -------------------------------------------
  4752.                      DLG_COLOR       Choose color dialog box.
  4753.                      DLG_EXCOLOR     Extended choose color.
  4754.                      DLG_OPENSAVE          Open save dialog box.
  4755.                      DLG_EXOPENSAVE        Open save with extended file selection.
  4756.                      DLG_PRINT             Print dialog box.
  4757.                      DLG_PRINTSETUP        Print setup dialog box.
  4758.                      DLG_FIND              Find dialog box
  4759.                      DLG_REPLACE           Replace dialog box.
  4760.                      DLG_FONT              Font dialog box.
  4761.                      DLG_EXFONT            Extended font dialog box
  4762.                      DLG_OPENDIR           Open directory dialog box
  4763.  
  4764.  - This message is sent to the parent of an SFX common dialog 
  4765.    box from the dialog function's WM_INITDIALOG message response, 
  4766.    before WM_INITDIALOG returns. This gives you a chance to do 
  4767.    some extra initialization before the common dialog box is displayed.
  4768.  
  4769.  - This message was added so you could optionally set the 
  4770.    MWS_SFXCAPTION flag using SetWindowLong and specify a custom icon 
  4771.    by sending the dialog box a WM_SETBITMAP message.   
  4772.  
  4773. WM_SFXNCACTIVATE:
  4774.  
  4775.  - wParam  = fActive         /* activation flag*/
  4776.  
  4777.  - lParam  = 0 ;         /* not used, must be zero */
  4778.  
  4779.      Parameter       Description
  4780.      -----------------------------------------------------------
  4781.      fActive         Value of wParam. Specifies the activation state of
  4782.                      a window's title bar. If fActive is 1, the title bar 
  4783.                      is active. If fActive is 2, the title bar is inactive. 
  4784.                      If fActive is 0, the default Window function activates 
  4785.                      and inactivates the title bar.
  4786.  
  4787.  - An application should return zero if it processes this message
  4788.  
  4789.  - The WM_NCACTIVATE message is used by an SFX dialog box or 
  4790.    window for its own use and is not passed onto the default 
  4791.    window function. To set a title bar's activation state you must 
  4792.    send the dialog box or window a WM_SFXNCACTIVATE message. The 
  4793.    value of wParam sets an internal flag that specifies the title 
  4794.    bar's activation state. Once set, the activation state can only 
  4795.    be changed by sending another WM_SFXNCACTIVATE message.
  4796.  
  4797. ========================= End of SFX200.TXT ==========================
  4798.  
  4799.