Share via


ButtonView_t::DrawCheckBoxandRadioStyle (Windows Embedded CE 6.0)

1/6/2010

This method draws a button that the user can choose; for example, a button with a radio button or check box style.

Syntax

static void DrawCheckBoxandRadioStyle(
  HWND hwnd,
  HDC hdc,
  HBRUSH hbr,
  WORD alignment
);

Parameters

  • hwnd
    [in] Handle to a window for a button control that has a radio button or check box style.
  • hdc
    [in] Handle to a device context.
  • hbr
    [in] Handle to a brush when drawing the button.
  • alignment
    [in] WORD that specifies the alignment of the bitmap for the button with a radio button or check box style. You can specify a vertical alignment only by combining the VER_ALIGN_MASK value with another value by using a bitwise-OR operation. The following table shows the possible values that you can combine with VER_ALIGN_MASK.

    Value Description

    BS_BOTTOM

    Bitmap is aligned with the bottom.

    BS_TOP

    Bitmap is aligned with the top.

    BS_VCENTER

    Bitmap is centered vertically.

Remarks

The following table shows the button styles for which an application calls ButtonView_t::DrawCheckBoxandRadioStyle when the application repaints the button.

Style Description

BS_3STATE

Creates a check box in which the box can be unavailable as well as selected or cleared. Use the unavailable state to show that the state of the check box is not determined.

BS_AUTO3STATE

Creates a three-state check box in which the state cycles through selected, unavailable, and cleared each time the user selects the check box.

BS_AUTOCHECKBOX

Creates a check box in which the check state switches between selected and cleared each time the user selects the check box.

BS_AUTORADIOBUTTON

Creates a radio button that, when selected by a user, clears all other buttons in the same group.

BS_CHECKBOX

Creates a small, empty check box with a label displayed to the right of the check box.

BS_RADIOBUTTON

Creates a small circle with a label displayed to the right of the circle.

This function is also called when the check state of the control changes, or the control receives a BM_SETCHECK message.

Requirements

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

See Also

Reference

ButtonView_t
BM_SETCHECK

Concepts

Control Styles