Share via


ToolBarView_t::DrawButtonBorder (Windows Embedded CE 6.0)

1/6/2010

This method draws the border of a button on a toolbar.

Syntax

static void DrawButtonBorder(
  HDC hdc,
  RECT* prc,
  bool bPushed,
  DWORD style
);

Parameters

  • hdc
    [in] Handle to the device context for the toolbar window.
  • prc
    [in] Pointer to a RECT structure that specifies the bounding rectangle of the toolbar button.
  • bPushed
    [in] Boolean that indicates whether the button appears pressed. TRUE indicates that the button appears pressed. FALSE indicates that the button does not appear pressed.
  • style
    [in] DWORD that specifies the style of the toolbar. The following table shows the possible values.

    Value Description

    TBSTYLE_AUTOSIZE

    Calculates a button width based on the text of the button, not on the size of the image.

    TBSTYLE_BUTTON

    Creates a toolbar button that looks like a standard Windows Embedded CE push button.

    TBSTYLE_CHECK

    Creates a button that toggles between the pressed and not pressed states each time the user clicks it. The button has a different background color when it is in the pressed state.

    TBSTYLE_CHECKGROUP

    Creates a check button that stays pressed until another button in the group is pressed.

    TBSTYLE_CUSTOMERASE

    Creates a toolbar that generates NM_CUSTOMDRAW messages when it processes WM_ERASEBKGND messages.

    TBSTYLE_DROPDOWN

    Creates a drop-down list button.

    TBSTYLE_FLAT

    Creates a flat toolbar in which both the toolbar and the buttons are transparent. Button text appears under button bitmaps.

    TBSTYLE_GROUP

    Creates a button that stays pressed until another button in the group is pressed.

    TBSTYLE_LIST

    Places button text to the right of button bitmaps. This style can only be used with the TBSTYLE_FLAT style. In Windows Embedded CE, the TBSTYLE_LIST style creates a toolbar with variable width buttons. If you want to use the TBSTYLE_LIST style with fixed width buttons, you can override the default behavior by sending a TB_SETBUTTONSIZE or TB_SETBUTTONWIDTH message.

    TBSTYLE_SEP

    Creates a separator, which provides a small gap between button groups. A button that has this style does not receive user input.

    TBSTYLE_TOOLTIPS

    Creates a ToolTip control that an application can use to display descriptive text for the buttons in the toolbar.

    TBSTYLE_TRANSPARENT

    Creates a transparent toolbar in which the toolbar is transparent, but the buttons are not. Button text appears under button bitmaps.

    TBSTYLE_WRAPABLE

    Creates a toolbar that can have multiple rows of buttons. Toolbar buttons can wrap to the next line when the toolbar becomes too narrow to include all buttons on the same line. Wrapping occurs on separation and nongroup boundaries.

Return Value

None.

Requirements

Header toolbarview.hpp
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

ToolBarView_t
RECT