home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0040 - 0049 / ibm0040-0049 / ibm0040.tar / ibm0040 / BCPPOWL1.ZIP / OWLDOC.ZIP / BWCCAPI.DOC < prev    next >
Encoding:
Text File  |  1991-08-28  |  30.8 KB  |  905 lines

  1. Borland Windows Custom Controls (BWCC) Documentation
  2. ====================================================
  3.  
  4. OVERVIEW
  5. --------
  6.  
  7.  
  8.   What is BWCC?
  9.   -------------
  10.  
  11.     BWCC is a collection of custom controls and a custom dialog
  12.     class that implement the look and feel of Borland-style dialog
  13.     boxes, such as the dialog boxes in Resource Workshop.
  14.  
  15.  
  16.   The BWCC custom controls
  17.   ------------------------
  18.  
  19.     o Bitmapped push buttons
  20.  
  21.       These controls use bitmaps to implement the behavior of
  22.       standard windows push buttons. They also implement two
  23.       enhancements over Windows standard buttons:
  24.  
  25.       - An additional level of parent window notification and control
  26.         over keyboard focus and tab movement 
  27.   
  28.       - An owner-draw style that allows a programmer to override the
  29.         look of a standard windows push button, while inheriting all
  30.         other behavior of the push button
  31.   
  32.       In addition to push buttons, this control implements a "non-
  33.       pushable" bitmap style for displaying "splash" images (such as
  34.       the bitmapped image that appears when you start Resource Workshop). 
  35.       This type is called a "Bitmap".
  36.   
  37.  
  38.     o Better-looking radio buttons
  39.   
  40.       These radio buttons implement the behavior of standard Windows
  41.       radio buttons and auto-radio buttons and provide an improved
  42.       look. Like the push buttons, they implement two enhancements 
  43.       over Windows standard buttons:
  44.   
  45.       - An additional level of parent window notification and control
  46.         over keyboard focus and tab movement
  47.   
  48.       - An owner-draw style that allows a programmer to override the 
  49.         look of a standard Windows radio button, while inheriting all
  50.         other behavior of the radio button.
  51.  
  52.  
  53.     o Better-looking check boxes
  54.   
  55.       These check boxes implement the behavior of standard Windows
  56.       check boxes and auto-check boxes and look better. Like the
  57.       push buttons, they implement two enhancements over Windows standard
  58.       check boxes:
  59.   
  60.       - An additional level of parent window notification and control 
  61.         over keyboard focus and tab movement
  62.  
  63.       - An owner-draw style which allows a programmer to override the 
  64.         look of a standard windows check box, while inheriting all other
  65.         behavior of the check box
  66.   
  67.   
  68.     o Gray panels.
  69.   
  70.       These controls provide areas that appear to be cut into the
  71.       "chiseled steel" background. Other controls can be placed on
  72.       these areas. Gray panels themselves are "static" controls, 
  73.       meaning that the user does not interact with them at runtime.
  74.   
  75.   
  76.     o Dips and bumps.
  77.   
  78.       These thin lines act as vertical and horizontal dividers
  79.       within a dialog. 
  80.  
  81.       - Dips (derivation: speed dip) are used to separate areas 
  82.         within a dialog. ( Borland uses them to separate push buttons 
  83.         from the rest of  the dialog's controls.)
  84.  
  85.       - Bumps (derivation: speed bump) are used to separate areas
  86.         within a gray panel.
  87.  
  88.  
  89.    Custom Dialog Class
  90.    -------------------
  91.  
  92.      The Borland custom dialog class does two things: 
  93.  
  94.      o It paints the dialog window background with a brush
  95.        appropriate to the display device--speckled (chiseled steel)
  96.        for VGA and above, white for EGA and monochrome.
  97.  
  98.      o It optimizes drawing of the dialogs by taking over
  99.        from the custom controls and drawing them directly on the
  100.        surface of the dialog window. This "turbo-painting" allows
  101.        Borland's dialogs to implement a sophisticated look without a
  102.        sluggish feel.
  103.  
  104.  
  105. USING BWCC OR CUSTOM BUTTONS IN A PROGRAM
  106. -----------------------------------------
  107.  
  108.   Using BWCC in a program is easy.
  109.  
  110.   1. Use the Resource Workshop Dialog editor to lay out your dialogs.
  111.      
  112.      a. Double-click the dialog box caption to bring up the Windows
  113.         Style dialog box, then in the Class text box, type "bordlg".
  114.         Your dialog box now will display the "chiseled steel" background
  115.         on displays with VGA or better resolution.
  116.  
  117.      b. Select Borland-style controls from the rightmost column of the 
  118.         Tools palette.
  119.  
  120.         If you select a Borland push button and want to make it an OK,
  121.         Help, or Cancel button, double-click on the button to display the
  122.         Borland Button Style dialog box, then enter IDOK, IDHELP, or
  123.         IDCANCEL as the control id. If you then test the dialog or you've
  124.         set Options|Preferences to WYSIWYG, the button has the characteristic
  125.         Borland look.
  126.  
  127.   2. Link your program first with the import library BWCC.LIB, and then with
  128.      IMPORT.LIB, both of which are contained in the LIB subdirectory specified
  129.      by the Install program. You *must* link BWCC.LIB to your program before 
  130.      you link IMPORT.LIB.
  131.  
  132.   3. Make the Dynamic-link library BWCC.DLL available for your application 
  133.      to use at runtime. For Windows to find it, it must be in one of the 
  134.      following places:
  135.  
  136.      o The same directory as your application's .EXE file
  137.  
  138.      o The Windows startup directory 
  139.  
  140.      o The Windows system directory
  141.  
  142.      o A directory on your PATH
  143.  
  144.   Creating your own custom bitmapped buttons is just a little
  145.   more work. You can use Resource Workshop to extract some of
  146.   our images from the BWCC library. We use a very simple
  147.   numbering scheme (described in the material that follows) 
  148.   to map a button's control ID in a dialog box to the resource IDs
  149.   of its bitmaps. You can then use the extracted images as templates 
  150.   to build your own bitmaps.
  151.  
  152.  
  153. DEFINING YOUR OWN "DERIVATIVE" DIALOG CLASS
  154. -------------------------------------------
  155.  
  156.    If for some reason, you find it necessary to create your own
  157.    dialog window class (for example, if you want the dialog to
  158.    have its own icon), you must "derive" your class from the
  159.    BORDLG class. Unfortunately, since the Windows API is not
  160.    really object-oriented, this "derivation" is not as clean or
  161.    elegant as it would be for a purely object-oriented system. 
  162.  
  163.    To "derive" a class from BORDLG, do the following:
  164.  
  165.    1. The window class name must start with the characters 
  166.       "bordlg". Thus "bordlg_foo" is a valid derived name, while 
  167.       "mybordlg" is not. Class names with the format "_bordlg..." 
  168.       (with a leading underscore) and "bordlg" itself are reserved 
  169.       for use by Borland.
  170.  
  171.    2. Your dialog window function should call BCCDefDlgProc, not
  172.       the Windows standard DefDlgProc for messages that it does not
  173.       process.
  174.  
  175.    3. The window proc must call BCCDefDlgProc for the following
  176.       messages:
  177.  
  178.       WM_CTLCOLOR
  179.       WM_NCCREATE
  180.       WM_CREATE
  181.       WM_NCDESTROY
  182.       WM_SETFONT
  183.       WM_MOVE
  184.       WM_PAINT
  185.       WM_ERASEBKGND
  186.  
  187.  
  188. TECHNICAL DESCRIPTION OF BORLAND WINDOWS CUSTOM CONTROLS
  189. --------------------------------------------------------
  190.  
  191.   The descriptions of Borland Windows Custom Controls in this
  192.   section all use the following format:
  193.  
  194.   Name of Control
  195.     Function: (what the control is used for)
  196.     Class Name: (Resource Workshop name in quotation marks followed by
  197.                  the identifier name--C define or Pascal constant)
  198.     Window Styles
  199.       Types (Overall appearance and use of the control)
  200.         Types inherited from Windows
  201.         Types unique to BWCC
  202.       Options (Options available to each type of control)
  203.         Options inherited from Windows
  204.         Options unique to BWCC
  205.     Messages
  206.       Commands (Messages to a control)
  207.         Commands inherited from Windows
  208.         Commands unique to BWCC
  209.       Notifications (Commands from a control)
  210.         Notifications inherited from Windows
  211.         Notifications unique to BWCC
  212.     Miscellaneous comments
  213.  
  214.   Notifications are a special type of WM_COMMAND message used
  215.   by controls. The control ID of the button is passed in the
  216.   wParam of the message, while the lParam contains both the
  217.   notification type and the window handle of the control. The
  218.   notification type is contained in the high-order word of
  219.   lParam and can be extracted using the HIWORD macro, while
  220.   the window handle is contained in the low-order word of
  221.   lParam and can be extracted using the LOWORD macro.
  222.  
  223.  
  224.   THE BORBTN CONTROL
  225.   ------------------
  226.  
  227.     Function: bitmapped push buttons and "splash panels"
  228.  
  229.     Class Name: "borbtn" ( BUTTON_CLASS )
  230.  
  231.     Window Styles
  232.  
  233.       Types
  234.  
  235.         Types inherited from Windows
  236.  
  237.           BS_PUSHBUTTON    A non-default push button.
  238.           BS_DEFPUSHBUTTON  A default push button.
  239.  
  240.           The difference between these two types is what happens when
  241.           the user presses the Enter key in a dialog box. The first button
  242.           in the dialog box with the BS_DEFPUSHBUTTON style sends a 
  243.           BN_CLICKED notification to the dialog window. (Actually, it
  244.           appears that the Windows dialog manager sends the message on 
  245.           behalf of the button.) 
  246.  
  247.           When a dialog box is first displayed, Windows looks for and 
  248.           remembers which button is the original default button. As a
  249.           user interacts with a dialog, if any button gains the keyboard 
  250.           focus, it temporarily becomes the default button (that is, 
  251.           the Windows dialog manager will send a BN_CLICKED notification 
  252.           from that button to the dialog window when Enter is pressed.)
  253.  
  254.  
  255.         Types unique to BWCC
  256.  
  257.  
  258.           BBS_BITMAP
  259.  
  260.             This type is used to display "splash panels", which are 
  261.             bitmaps with which the user does not interact.
  262.  
  263.  
  264.       Options
  265.  
  266.  
  267.         Options inherited from Windows
  268.  
  269.           none
  270.  
  271.         Options unique to BWCC
  272.  
  273.           Messages described in these options are described later in
  274.           the Messages section for this control.
  275.  
  276.           BBS_PARENTNOTIFY
  277.  
  278.             This option causes the control to generate additional 
  279.             notification messages at runtime. The messages are:
  280.             BBN_SETFOCUS, BBN_SETFOCUSMOUSE, BBN_GOTATAB, and 
  281.             BBN_GOTABTAB.
  282.  
  283.           BBS_OWNERDRAW
  284.  
  285.             This option causes the control to send WM_DRAWITEM to its
  286.             parent at runtime, for specialized drawing.
  287.  
  288.  
  289.           BBS_DLGPAINT
  290.  
  291.             This option is used internally by BWCC Custom Dialog Class to
  292.             inform the button that the dialog class will be painting it 
  293.             on its behalf. This option is for internal use only by BWCC.
  294.  
  295.  
  296.  
  297.     Messages
  298.  
  299.       Commands  (messages to a button)
  300.  
  301.         Commands inherited from Windows
  302.  
  303.           BM_SETSTYLE
  304.  
  305.             This message is used primarily by the Windows dialog manager 
  306.             to toggle between BS_DEFPUSHBUTTON and BS_PUSHBUTTON types. 
  307.             In fact, those two values are the only two recognized by this 
  308.             window class.
  309.  
  310.  
  311.           BM_GETSTATE
  312.  
  313.             This message can be used to determine whether a button is 
  314.             highlighted or not. It returns a non-zero value when the 
  315.             button is highlighted and zero when the button is not 
  316.             highlighted.
  317.  
  318.  
  319.           BM_SETSTATE
  320.  
  321.             This message can be used to change the "highlight" state of a 
  322.             button. If the wParam of the message is non-zero, the button 
  323.             is highlighted; that is, it is drawn as if it were pressed.
  324.  
  325.  
  326.         Commands unique to BWCC
  327.  
  328.           BBM_SETBITS
  329.  
  330.             This message can be used by an application program to pass a
  331.             set of bitmap handles to the button. Normally, the buttons
  332.             use the button control ID to automatically load bitmaps from 
  333.             the user's resources. If the bitmaps do not exist, the button 
  334.             caption is drawn into a default bitmap by using a lighter-weight 
  335.             version of the dialog font.
  336.  
  337.  
  338.             To use this message, you must first create three bitmaps: a 
  339.             bitmap image for a button that doesn't have keyboard focus, 
  340.             an image for the "pressed" or highlighted button, and, finally, 
  341.             an image for the button that contains the keyboard focus, but 
  342.             isn't pressed.
  343.  
  344.             After creating the bitmaps, you must put the handles to
  345.             these bitmaps into an array and pass a far pointer to this
  346.             array in the lParam of the BM_SETBITS message.
  347.  
  348.             The following C and Pascal samples show how all this is done:
  349.  
  350.               C SAMPLE
  351.               --------
  352.  
  353.               HBITMAP hBits[3];
  354.               HWND    hWndButton = GetDlgItem( hWnd, ID_FOO);
  355.  
  356.  
  357.               hBits[0] = MakeNormalBitmap(...);
  358.               hBits[1] = MakeHighlightBitmap(...);
  359.               hBits[2] = MakeFocusBitmap(...);
  360.  
  361.  
  362.               SendMessage( hWndButton, BBM_SETBITS, 0, (LONG) (LPSTR)
  363.                            hBits);
  364.  
  365.               PASCAL SAMPLE
  366.               -------------
  367.  
  368.               procedure SetBitmaps(Wnd: HWnd);
  369.               var
  370.                 Bits: array[0..2] of HBitmap;
  371.                 WndButton: HWnd;
  372.               begin
  373.                 WndButton := GetDlgItem(Wnd, id_Foo);
  374.                 Bits[0] := MakeNormalBitmap(...);
  375.                 Bits[1] := MakeHighlightBitmap(...);
  376.                 Bits[2] := MakeFocusBitmap(...);
  377.                 SendMessage(WndButtton, BBM_SETBITS, 0, @Bits);
  378.               end;
  379.  
  380.  
  381.       Notifications (commands from a button)
  382.  
  383.         Inherited from Windows
  384.  
  385.           BN_CLICKED
  386.  
  387.             This message is sent by the button when it has been "pressed"
  388.             by the user, either by pressing and releasing the left mouse
  389.             button while the mouse pointer is within the button window or
  390.             by a number of keyboard actions. 
  391.  
  392.             The button can be "pressed" from the keyboard by two separate 
  393.             methods:
  394.  
  395.             o If the button has keyboard focus, the user can press either 
  396.               the spacebar or the Enter key. 
  397.  
  398.             o If the keyboard focus is in another control, the button is 
  399.               "pressed" if the user presses the button's accelerator key. 
  400.  
  401.               You associate an accelerator key with a button by placing an
  402.               ampersand before the the ASCII value of the key in the button's
  403.               text (for example, "&Yes"). Note that case is not significant 
  404.               for button accelerators.
  405.  
  406.       Notifications unique to BWCC
  407.  
  408.         These notifications are sent to the parent window only if you've
  409.         specified the BBS_PARENTNOTIFY style.
  410.  
  411.         BBN_SETFOCUS
  412.  
  413.           This message is sent by the button to its parent window when 
  414.           the button gains the keyboard focus through an action other 
  415.           than a mouse click.
  416.  
  417.         BBN_SETFOCUSMOUSE
  418.  
  419.           This message is sent by the button to its parent window when 
  420.           the button gains the keyboard focus through a mouse click.
  421.  
  422.  
  423.         BBN_GOTATAB
  424.  
  425.           The notification is sent by the button to its parent window 
  426.           when the user presses the tab key while the keyboard focus is 
  427.           in the button. The parent can then intervene in the 
  428.           processing of the keystroke. If the parent wants to 
  429.           intervene, it returns a non-zero value. 
  430.  
  431.  
  432.         BBN_GOTABTAB
  433.  
  434.           The notification is sent by the button to its parent window 
  435.           when the user presses Shift-Tab (back-tab) while the keyboard 
  436.           focus is in the button. The parent can then intervene in the 
  437.           processing of the keystroke. If the parent wants to intervene, 
  438.           it returns a non-zero value. 
  439.  
  440.  
  441.         WM_DRAWITEM
  442.  
  443.           If you specify the BBS_OWNERDRAW style for the button, it 
  444.           will send a WM_DRAWITEM message to its parent window with a 
  445.           far pointer to a DRAWITEMSTRUCT in the lParam of the message. 
  446.           The fields of that message are the same as in the Windows SDK
  447.           documentation for this message, with the following enhancement:
  448.  
  449.           For Windows owner-draw buttons, the itemID field of the 
  450.           DRAWITEMSTRUCT structure is unused. Borland buttons use this 
  451.           field to pass their type. If the button is a Default 
  452.           push button, this field will contain the value 
  453.           BS_DEFPUSHBUTTON. Otherwise, it will contain BS_PUSHBUTTON.
  454.  
  455.           The values passed in the other fields:
  456.  
  457.             CtlType     ODT_BUTTON
  458.  
  459.             CtlID       The control ID of the button 
  460.                         (GetWindowWord(hWnd, GWW_ID))
  461.  
  462.             itemAction  ODA_DRAWENTIRE, unless the repaint is being
  463.                          caused by a focus change, in which case this 
  464.                          field will contain ODA_FOCUS
  465.  
  466.             itemState   The combination of the following values, depending 
  467.                         on the current state of the button
  468.         
  469.                         ODS_FOCUS if the button has the keyboard focus
  470.                         ODS_DISABLED if the button is disabled
  471.                         ODS_SELECTED if the button is highlighted
  472.  
  473.             hwndItem    The window handle of the control
  474.  
  475.             hDC         A device context for the window, with all 
  476.                         values in the default state returned by GetDC
  477.  
  478.             rcItem      The client rectangle of the control
  479.  
  480.  
  481.  
  482.     The button resource Id numbering scheme
  483.     ---------------------------------------
  484.  
  485.       Because the Windows dialog template data structure as parsed 
  486.       by the Microsoft resource compiler does not provide user-specified 
  487.       control initialization data, we chose to use the control ID 
  488.       field as a base from which to derive the resource IDs of the 
  489.       bitmaps required by a button. The scheme is very simple. For 
  490.       each bitmap button, there are 6 images: 3 for EGA and 
  491.       monochrome devices, and 3 for VGA and higher-resolution
  492.       devices.
  493.  
  494.       The bitmap resource IDs are derived from the button control 
  495.       using the following formulas:
  496.  
  497.       ControlId + 1000: Normal  VGA-resolution image
  498.       ControlId + 3000: Pressed VGA-resolution image
  499.       ControlId + 5000: Focused VGA-resolution image
  500.  
  501.       ControlId + 2000: Normal  EGA-resolution image
  502.       ControlId + 4000: Pressed EGA-resolution image
  503.       ControlId + 6000: Focused EGA-resolution image
  504.  
  505.  
  506.  
  507.   THE BORRADIO CONTROL
  508.   --------------------
  509.  
  510.     Function: Better-looking radio buttons
  511.  
  512.     Class Name: "borradio" ( RADIO_CLASS )
  513.  
  514.     Window Styles
  515.  
  516.       Types
  517.  
  518.         Types inherited from Windows
  519.  
  520.           BS_RADIOBUTTON
  521.  
  522.             A nonautomatic radio button. Application program intervention 
  523.             is required to change its state and the state of the other buttons 
  524.             with which it is grouped.
  525.  
  526.           BS_AUTORADIOBUTTON 
  527.  
  528.             A radio button that's part of a group. When one button within 
  529.             the group is checked, all other buttons within the group uncheck
  530.             without the intervention of the application program.
  531.  
  532.           The two types differ in the amount of application program
  533.           intervention required at runtime to check a group of buttons. 
  534.           The nonautomatic button merely informs the application program
  535.           that it has been "checked" via the BN_CLICKED notification. It's
  536.           then the responsibility of the application program to check this 
  537.           button and to uncheck the others within the group by calling the 
  538.           CheckRadioButton function.
  539.  
  540.  
  541.         Types unique to BWCC
  542.  
  543.           none
  544.  
  545.  
  546.       Options
  547.  
  548.         Options inherited from Windows
  549.  
  550.           BS_LEFTTEXT
  551.  
  552.             This option causes the text associated with the button to be 
  553.             displayed to the left of the button, rather than to the right 
  554.             of the button.
  555.  
  556.         Options unique to BWCC
  557.  
  558.           Messages described in these options are explained later in the 
  559.           Messages section for this control.
  560.  
  561.           BBS_PARENTNOTIFY
  562.  
  563.             This option causes the control to generate additional 
  564.             notification messages at runtime. The messages are:
  565.             BBN_SETFOCUS, BBN_SETFOCUSMOUSE, BBN_GOTATAB, and 
  566.             BBN_GOTABTAB.
  567.  
  568.           BBS_OWNERDRAW
  569.  
  570.             This option causes the control to send WM_DRAWITEM to its 
  571.             parent at runtime, for specialized drawing.
  572.  
  573.           BBS_DLGPAINT
  574.  
  575.             This option is used internally by the BWCC Custom Dialog Class to
  576.             inform the button that the dialog class will be painting it 
  577.             on its behalf. This option is for internal use only by BWCC.
  578.  
  579.  
  580.     Messages
  581.  
  582.       Commands (messages to a button)
  583.  
  584.         Commands inherited from Windows
  585.  
  586.  
  587.           BM_GETCHECK
  588.  
  589.             This message causes the button to return its current "check"
  590.             state. If it is checked, it returns a non-zero value. 
  591.             Otherwise, it returns zero.
  592.  
  593.           BM_SETCHECK
  594.         
  595.             This message can be used to change the "check" state of a 
  596.             button. If the wParam of the message is non-zero, the button 
  597.             is checked; that is, it is drawn with a check mark next to 
  598.             it.
  599.  
  600.           BM_GETSTATE
  601.  
  602.             This message can be used to determine whether a button is 
  603.             highlighted or not. It returns a non-zero value when the button 
  604.             is highlighted and zero when the button is not highlighted.
  605.  
  606.  
  607.           BM_SETSTATE
  608.  
  609.             This message can be used to change the "highlight" state of a 
  610.             button. If the wParam of the message is non-zero, the button 
  611.             is highlighted, that is, it is drawn as if it were pressed.
  612.  
  613.  
  614.       Notifications (commands from a button)
  615.  
  616.         Notifications inherited from Windows
  617.  
  618.           BN_CLICKED
  619.  
  620.             See the description of BN_CLICKED earlier under the BORBTN class.
  621.  
  622.  
  623.         Notifications unique to BWCC
  624.  
  625.           These notifications are sent to the parent window only if the 
  626.           programmer has specified the BBS_PARENTNOTIFY style.
  627.  
  628.           BBN_SETFOCUS
  629.           BBN_SETFOCUSMOUSE
  630.           BBN_GOTATAB
  631.           BBN_GOTABTAB
  632.  
  633.             The descriptions of these messages are the same as the
  634.             the earlier descriptions of the same messages under the
  635.             BORBTN control.
  636.  
  637.           WM_DRAWITEM
  638.  
  639.             If an application program specifies the BBS_OWNERDRAW style
  640.             for the button, it will send a WM_DRAWITEM message to its 
  641.             parent window with a far pointer to a DRAWITEMSTRUCT in the 
  642.             lParam of the message. The fields of that message are the same 
  643.             as in the Windows SDK documentation for this message, with the 
  644.             following enhancement:
  645.  
  646.             For Windows owner-draw buttons, the itemID field of the 
  647.             DRAWITEMSTRUCT structure is unused. Borland radio buttons use 
  648.             this field to pass their type. If the button is an auto-radio 
  649.             button, this field will contain the value BS_AUTORADIOBUTTON. 
  650.             Otherwise, it will contain BS_RADIOBUTTON.
  651.  
  652.             The values passed in the other fields:
  653.  
  654.               CtlType     ODT_BUTTON
  655.  
  656.               CtlID       The control ID of the button 
  657.                           (GetWindowWord(hWnd, GWW_ID))
  658.  
  659.               itemAction  ODA_DRAWENTIRE, unless the repaint is being 
  660.                           caused by a focus change, in which case this 
  661.                           field will contain ODA_FOCUS
  662.  
  663.               itemState   The combination of the following values, depending 
  664.                           on the current state of the button:
  665.  
  666.                           ODS_FOCUS if the button has the keyboard focus
  667.                           ODS_DISABLED if the button is disabled
  668.                           ODS_SELECTED if the button is highlighted
  669.  
  670.               hwndItem    The window handle of the control
  671.  
  672.               hDC         A device context for the window, with all 
  673.                           values in the default state returned by GetDC.
  674.  
  675.               rcItem      The client rectangle of the control
  676.  
  677.  
  678.  
  679.   THE BORCHECK CONTROL
  680.   --------------------
  681.  
  682.     Function: Better-looking check boxes
  683.  
  684.     Class Name: "borcheck" ( CHECK_CLASS )
  685.  
  686.     Window Styles
  687.  
  688.       Types
  689.  
  690.         Types inherited from Windows
  691.  
  692.           BS_CHECKBOX  
  693.  
  694.             A nonautomatic check box. Application program intervention is 
  695.             required to change its visual state after it has been "clicked."
  696.  
  697.           BS_AUTOCHECKBOX 
  698.  
  699.             A check box that automatically changes its state when "clicked."
  700.  
  701.         Types unique to BWCC
  702.  
  703.           none
  704.  
  705.  
  706.       Options
  707.  
  708.         Options inherited from Windows
  709.  
  710.           BS_LEFTTEXT
  711.  
  712.             This option causes the text associated with the button to be 
  713.             displayed to the left of the button, rather than to the right 
  714.             of the button.
  715.  
  716.         Options unique to BWCC
  717.  
  718.           Messages described in these options are explained later in the 
  719.           Messages section for this control.
  720.  
  721.           BBS_PARENTNOTIFY
  722.  
  723.             This option causes the control to generate additional 
  724.             notification messages at runtime. The messages are:
  725.             BBN_SETFOCUS, BBN_SETFOCUSMOUSE, BBN_GOTATAB, and
  726.             BBN_GOTABTAB.
  727.  
  728.  
  729.           BBS_OWNERDRAW
  730.  
  731.             This option causes the control to send WM_DRAWITEM to its 
  732.             parent at runtime, for specialized drawing.
  733.  
  734.  
  735.           BBS_DLGPAINT
  736.  
  737.             This option is used internally by BWCC Custom Dialog Class to
  738.             inform the button that the dialog class will be painting it 
  739.             on its behalf. This option is for internal use only by BWCC.
  740.  
  741.     Messages
  742.  
  743.       Commands  (messages to a button)
  744.  
  745.         Commands inherited from Windows
  746.  
  747.           BM_GETCHECK
  748.  
  749.             This message causes the button to return its current "check"
  750.             state. If it is checked, it returns a non-zero value. 
  751.             Otherwise, it returns zero.
  752.  
  753.           BM_SETCHECK
  754.  
  755.             This message can be used to change the "check" state of a button.
  756.             If the wParam of the message is a non-zero value, the button
  757.             is checked; that is, it is drawn with a check mark next to it.
  758.  
  759.           BM_GETSTATE
  760.  
  761.             This message can be used to determine whether a button is 
  762.             highlighted or not. It returns a non-zero value when the button 
  763.             is highlighted and zero when the button is not highlighted.
  764.         
  765.  
  766.           BM_SETSTATE
  767.  
  768.             This message can be used to change the "highlight" state of a 
  769.             button. If the wParam of the message is a non-zero value, the 
  770.             button is highlighted; that is, it is drawn as if it were pressed.
  771.  
  772.  
  773.       Notifications (commands from a button)
  774.  
  775.         Notifications inherited from Windows
  776.  
  777.           BN_CLICKED
  778.  
  779.             See the description of BN_CLICKED earlier under the BORBTN class.
  780.  
  781.         Notifications unique to BWCC:
  782.  
  783.           These notifications are sent to the parent window only if the
  784.           programmer has specified the BBS_PARENTNOTIFY style.
  785.  
  786.           BBN_SETFOCUS
  787.           BBN_SETFOCUSMOUSE
  788.           BBN_GOTATAB
  789.           BBN_GOTABTAB
  790.  
  791.             The descriptions of these messages are the same as the
  792.             the earlier descriptions of the same messages under the
  793.             BORBTN control.
  794.  
  795.           WM_DRAWITEM implementation.
  796.  
  797.             If an application program specifies the BBS_OWNERDRAW style 
  798.             for the button, it will send a WM_DRAWITEM message to its 
  799.             parent window with a far pointer to a DRAWITEMSTRUCT in the 
  800.             lParam of the message. The fields of that message are the same 
  801.             as in the Windows SDK documentation for this message, with the
  802.             following enhancement:
  803.  
  804.             For MS owner-draw buttons, the itemID field of the 
  805.             DRAWITEMSTRUCT structure is unused. Borland check boxes use 
  806.             this field to pass their type. If the button is an 
  807.             auto-check box, this field will contain the value 
  808.             BS_AUTOCHECKBOX. Otherwise, it will contain BS_CHECKBOX.
  809.  
  810.             The values passed in the other fields:
  811.  
  812.               CtlType     ODT_BUTTON
  813.  
  814.               CtlID       The control ID of the button 
  815.                           (GetWindowWord(hWnd, GWW_ID))
  816.  
  817.               itemAction  ODA_DRAWENTIRE, unless the repaint is being
  818.                           caused by a focus change, in which case this 
  819.                           field will contain ODA_FOCUS
  820.  
  821.               itemState   The combination of the following values, depending 
  822.                           on the current state of the button:
  823.  
  824.                           ODS_FOCUS if the button has the keyboard focus
  825.                           ODS_DISABLED if the button is disabled
  826.                           ODS_SELECTED if the button is highlighted
  827.  
  828.               hwndItem    The window handle of the control
  829.  
  830.               hDC         A device context for the window, with all 
  831.                           values in the default state returned by GetDC
  832.  
  833.               rcItem      The client rectangle of the control
  834.  
  835.  
  836.  
  837.   THE BORSHADE CONTROL
  838.   --------------------
  839.  
  840.     Function: panels and dividers
  841.  
  842.     Class Name: "borshade" ( SHADE_CLASS )
  843.  
  844.       Window Styles
  845.  
  846.         Types
  847.  
  848.           Types inherited from Windows
  849.  
  850.             none
  851.  
  852.         Types unique to BWCC
  853.  
  854.           BSS_GROUP
  855.  
  856.             This style draws a "chiseled" gray box.
  857.  
  858.           BSS_HBORDER
  859.  
  860.             This style draws a horizontal dividing line. It's used to 
  861.             separate sections of a dialog.
  862.  
  863.           BSS_VBORDER
  864.  
  865.             This style draws a vertical dividing line. It's used to 
  866.             separate sections of a dialog.
  867.  
  868.           BSS_HBUMP
  869.  
  870.             This style draws a horizontal dividing line. It's used to 
  871.             separate sections of a gray group (BSS_GROUP).
  872.  
  873.           BSS_VBUMP
  874.  
  875.             This style draws a vertical dividing line. It is used to 
  876.             separate sections of a gray group (BSS_GROUP).
  877.  
  878.  
  879.  
  880.   THE BORDLG DIALOG CLASS
  881.   -----------------------
  882.  
  883.     Function: "Turbo" fast dialog drawing
  884.  
  885.     Class Name: "bordlg" ( BORDLGCLASS )
  886.  
  887.     Window Styles
  888.  
  889.       Inherited from Windows
  890.  
  891.         All valid styles for a standard Windows dialog.
  892.  
  893.       Unique to BWCC
  894.  
  895.         none
  896.  
  897.     This custom dialog dialog window class implements the "turbo 
  898.     painting" of Borland custom controls, by eliminating 
  899.     unnecessary static control windows, keeping its own private 
  900.     list of controls within a dialog, and painting those controls 
  901.     itself. It also automatically provides a patterned background on 
  902.     VGA and higher-resolution displays. If you want your dialogs to 
  903.     share the "Borland look", you must specify this dialog class in 
  904.     your dialog template.
  905.