ICheckBox Interface Reference

The main interface (checkbox) More...

List of all members.

Public Member Functions

HRESULT About (void)
 Displays the control's credits
HRESULT Click (void)
 Clicks the checkbox by code
HRESULT GetControlState ([out, retval] ControlStateConstants *pControlState)
 Retrieves a bit field describing the control's state
HRESULT GetIdealSize ([in, out, defaultvalue(0)] OLE_XSIZE_PIXELS *idealWidth,[in, out, defaultvalue(0)] OLE_YSIZE_PIXELS *idealHeight)
 Retrieves the control's optimal size
HRESULT LoadSettingsFromFile ([in] BSTR file,[out, retval] VARIANT_BOOL *pSucceeded)
 Loads the control's settings from the specified file
HRESULT Refresh (void)
 Advises the control to redraw itself
HRESULT SaveSettingsToFile ([in] BSTR file,[out, retval] VARIANT_BOOL *pSucceeded)
 Saves the control's settings to the specified file

Properties

AppearanceConstants Appearance [get, set]
 Controls the style of the control's outer border
VARIANT_BOOL AutoToggleCheckMark [get, set]
 Controls how the control reacts to mouse clicks
OLE_COLOR BackColor [get, set]
 Specifies the control's background color
BorderStyleConstants BorderStyle [get, set]
 Controls the style of the control's inner border
VARIANT_BOOL CheckMarkOnRight [get, set]
 Controls the checkmark's location relative to the control's caption
ContentTypeConstants ContentType [get, set]
 Controls the type of the control's caption
DisabledEventsConstants DisabledEvents [get, set]
 Controls which events are fired
VARIANT_BOOL DontRedraw [get, set]
 Controls redrawing of the control
VARIANT_BOOL Enabled [get, set]
 Controls whether the control accepts user input
IFontDisp Font [get, set]
 Specifies the control's font
OLE_COLOR ForeColor [get, set]
 Specifies the control's text color
HAlignmentConstants HAlignment [get, set]
 Controls the horizontal alignment of the control's caption
OLE_HANDLE hImageList [get, set]
 Specifies the control's associated imagelist
LONG HoverTime [get, set]
 Controls when the MouseHover event is fired
OLE_HANDLE hWnd [get]
 Retrieves the control's window handle
IconAlignmentConstants IconAlignment [get, set]
 Controls the location of the control's icon
OLE_YSIZE_PIXELS IconMarginBottom [get, set]
 Controls the location of the control's icon
OLE_XSIZE_PIXELS IconMarginLeft [get, set]
 Controls the location of the control's icon
OLE_XSIZE_PIXELS IconMarginRight [get, set]
 Controls the location of the control's icon
OLE_YSIZE_PIXELS IconMarginTop [get, set]
 Controls the location of the control's icon
OLE_HANDLE Image [get, set]
 Specifies the bitmap or icon displayed as caption
IPictureDisp MouseIcon [get, set]
 Controls the control's mouse cursor
MousePointerConstants MousePointer [get, set]
 Controls the control's mouse cursor
VARIANT_BOOL MultiLine [get, set]
 Specifies whether the control displays text in multiple lines
VARIANT_BOOL ProcessContextMenuKeys [get, set]
 Specifies whether the ContextMenu event can be invoked using the keyboard
VARIANT_BOOL Pushed [get, set]
 Specifies whether the control is drawn like being pushed
VARIANT_BOOL PushLike [get, set]
 Controls the control's appearance
VARIANT_BOOL RegisterForOLEDragDrop [get, set]
 Controls the control's behavior in drag'n'drop operations
RightToLeftConstants RightToLeft [get, set]
 Controls the control's right-to-left features
SelectionStateConstants SelectionState [get, set]
 Specifies the state of the control's checkmark
StyleConstants Style [get, set]
 Controls the control's appearance
VARIANT_BOOL SupportOLEDragImages [get, set]
 Controls the control's behavior in drag'n'drop operations
BSTR Text [get, set]
 Specifies the control's caption
OLE_YSIZE_PIXELS TextMarginBottom [get, set]
 Controls the location of the control's caption
OLE_XSIZE_PIXELS TextMarginLeft [get, set]
 Controls the location of the control's caption
OLE_XSIZE_PIXELS TextMarginRight [get, set]
 Controls the location of the control's caption
OLE_YSIZE_PIXELS TextMarginTop [get, set]
 Controls the location of the control's caption
VARIANT_BOOL TriState [get, set]
 Specifies whether the control supports 3 states
VARIANT_BOOL UseSystemFont [get, set]
 Specifies whether the control uses the system font
VAlignmentConstants VAlignment [get, set]
 Controls the vertical alignment of the control's caption
BSTR Version [get]
 Retrieves the control's version

Detailed Description

The main interface (checkbox)

This is the checkbox control's main interface. It wraps the control window.

See also:
_ICheckBoxEvents

Member Function Documentation

HRESULT About ( void   ) 

Displays the control's credits

Displays some information about this control and its author.

HRESULT Click ( void   ) 

Clicks the checkbox by code

See also:
_ICheckBoxEvents::Click
HRESULT GetControlState ( [out, retval] ControlStateConstants pControlState  ) 

Retrieves a bit field describing the control's state

Returns:
A bit field of constants defined by the ControlStateConstants enumeration, that describe the control's state.
See also:
Pushed, SelectionState, ControlStateConstants
HRESULT GetIdealSize ( [in, out, defaultvalue(0)] OLE_XSIZE_PIXELS *  idealWidth,
[in, out, defaultvalue(0)] OLE_YSIZE_PIXELS *  idealHeight 
)

Retrieves the control's optimal size

Calculates the rectangle that best fits the control's text and image, if an imagelist is present.

Parameters:
[out] idealWidth The control's optimal width in pixels.
[out] idealHeight The control's optimal height in pixels.
Remarks:
Requires comctl32.dll version 6.0 or higher.
See also:
Text, hImageList, TextMarginBottom, TextMarginLeft, TextMarginRight, TextMarginTop
HRESULT LoadSettingsFromFile ( [in] BSTR  file,
[out, retval] VARIANT_BOOL *  pSucceeded 
)

Loads the control's settings from the specified file

Parameters:
[in] file The file to read from.
Returns:
True if the settings could be loaded; otherwise False.
See also:
SaveSettingsToFile
HRESULT SaveSettingsToFile ( [in] BSTR  file,
[out, retval] VARIANT_BOOL *  pSucceeded 
)

Saves the control's settings to the specified file

Parameters:
[in] file The file to write to.
Returns:
True if the settings could be saved; otherwise False.
See also:
LoadSettingsFromFile

Property Documentation

AppearanceConstants Appearance [get, set]

Controls the style of the control's outer border

Retrieves or sets the kind of border that is drawn around the control. Any of the values defined by the AppearanceConstants enumeration is valid.

See also:
BorderStyle, PushLike, Style, AppearanceConstants
VARIANT_BOOL AutoToggleCheckMark [get, set]

Controls how the control reacts to mouse clicks

Retrieves or sets whether the checkmark state is changed automatically if the user clicks on the control. If set to True, it is changed automatically; otherwise not.

See also:
SelectionState, TriState, _ICheckBoxEvents::Click
OLE_COLOR BackColor [get, set]

Specifies the control's background color

Retrieves or sets the control's background color.

Remarks:
This property isn't supported for themed checkboxes.
See also:
ForeColor
BorderStyleConstants BorderStyle [get, set]

Controls the style of the control's inner border

Retrieves or sets the kind of inner border that is drawn around the control. Any of the values defined by the BorderStyleConstants enumeration is valid.

See also:
Appearance, PushLike, Style, BorderStyleConstants
VARIANT_BOOL CheckMarkOnRight [get, set]

Controls the checkmark's location relative to the control's caption

Retrieves or sets whether the control's checkmark is drawn to the right of the text specified by the Text property. If set to True, it is drawn to the right; otherwise to the left.

See also:
RightToLeft, Text
ContentTypeConstants ContentType [get, set]

Controls the type of the control's caption

Retrieves or sets what the control's caption consists of. Any of the values defined by the ContentTypeConstants enumeration is valid.

See also:
Image, Text, ContentTypeConstants
DisabledEventsConstants DisabledEvents [get, set]

Controls which events are fired

Retrieves or sets the events that won't be fired. Disabling events increases performance. Any combination of the values defined by the DisabledEventsConstants enumeration is valid.

See also:
DisabledEventsConstants
VARIANT_BOOL DontRedraw [get, set]

Controls redrawing of the control

Enables or disables automatic redrawing of the control. Disabling redraw while doing large changes on the control may increase performance. If set to False, the control will redraw itself automatically; otherwise not.

VARIANT_BOOL Enabled [get, set]

Controls whether the control accepts user input

Enables or disables the control for user input. If set to True, it reacts to user input; otherwise not.

IFontDisp Font [get, set]

Specifies the control's font

Retrieves or sets the control's font. It's used to draw the caption.

See also:
UseSystemFont, Text, ForeColor
OLE_COLOR ForeColor [get, set]

Specifies the control's text color

Retrieves or sets the control's text color.

Remarks:
This property isn't supported for themed checkboxes.
See also:
BackColor, Text, Font
HAlignmentConstants HAlignment [get, set]

Controls the horizontal alignment of the control's caption

Retrieves or sets the horizontal alignment of the control's caption. Any of the values defined by the HAlignmentConstants enumeration is valid.

See also:
Text, VAlignment, IconAlignment, HAlignmentConstants
OLE_HANDLE hImageList [get, set]

Specifies the control's associated imagelist

Retrieves or sets the handle to the imagelist containing the control's icons. If set to 0, no icon is drawn.
The icon's index in the imagelist specifies the control state it is used for:

  • 0 - Used if the checkbox is in no special state.
  • 1 - Used if the checkbox is in 'hot' state, i. e. it's below the mouse cursor.
  • 2 - Used if the checkbox is pressed.
  • 3 - Used if the checkbox is disabled.
  • (4 - Used if the checkbox is the dialog's default button.)
  • 5 - Used on Tablet PCs (I don't know when).

If the imagelist contains only one icon, it is used for all control states. If it contains more than one, but less than five (six on Tablet PCs), no icon will be drawn if the control is in a state that no icon is specified for.

Remarks:
Requires comctl32.dll version 6.0 or higher.
The previous imagelist does NOT get auto-destroyed.
See also:
Image, Text, IconAlignment, GetIdealSize
LONG HoverTime [get, set]

Controls when the MouseHover event is fired

Retrieves or sets the number of milliseconds the mouse cursor must be located over the control's client area before the MouseHover event is fired. If set to -1, the system hover time is used.

See also:
_ICheckBoxEvents::MouseHover
OLE_HANDLE hWnd [get]

Retrieves the control's window handle

Retrieves the control's window handle.

Remarks:
This property is read-only.
See also:
_ICheckBoxEvents::RecreatedControlWindow, _ICheckBoxEvents::DestroyedControlWindow
IconAlignmentConstants IconAlignment [get, set]

Controls the location of the control's icon

Retrieves or sets the alignment of the control's icon (which is taken from the imagelist specified by the hImageList property). Any of the values defined by the IconAlignmentConstants enumeration is valid.

Remarks:
Requires comctl32.dll version 6.0 or higher.
See also:
hImageList, HAlignment, VAlignment, IconAlignmentConstants
OLE_YSIZE_PIXELS IconMarginBottom [get, set]

Controls the location of the control's icon

Retrieves or sets the bottom margin (in pixels) of the control's icon (which is taken from the imagelist specified by the hImageList property).

Remarks:
Requires comctl32.dll version 6.0 or higher.
See also:
IconMarginLeft, IconMarginRight, IconMarginTop, hImageList
OLE_XSIZE_PIXELS IconMarginLeft [get, set]

Controls the location of the control's icon

Retrieves or sets the left margin (in pixels) of the control's icon (which is taken from the imagelist specified by the hImageList property).

Remarks:
Requires comctl32.dll version 6.0 or higher.
See also:
IconMarginBottom, IconMarginRight, IconMarginTop, hImageList
OLE_XSIZE_PIXELS IconMarginRight [get, set]

Controls the location of the control's icon

Retrieves or sets the right margin (in pixels) of the control's icon (which is taken from the imagelist specified by the hImageList property).

Remarks:
Requires comctl32.dll version 6.0 or higher.
See also:
IconMarginBottom, IconMarginLeft, IconMarginTop, hImageList
OLE_YSIZE_PIXELS IconMarginTop [get, set]

Controls the location of the control's icon

Retrieves or sets the top margin (in pixels) of the control's icon (which is taken from the imagelist specified by the hImageList property).

Remarks:
Requires comctl32.dll version 6.0 or higher.
See also:
IconMarginBottom, IconMarginLeft, IconMarginRight, hImageList
OLE_HANDLE Image [get, set]

Specifies the bitmap or icon displayed as caption

Retrieves or sets the image that is displayed as the control's caption if the ContentType property is set to ctBitmap or ctIcon.

Remarks:
The image does NOT get auto-destroyed by the control.
Due to limitations in Windows' Button window class, checkboxes displaying a bitmap or icon won't use Windows XP themes.
See also:
ContentType, Text, hImageList
IPictureDisp MouseIcon [get, set]

Controls the control's mouse cursor

Retrieves or sets a user-defined mouse cursor. It's used if MousePointer is set to mpCustom.

See also:
MousePointer, MousePointerConstants
MousePointerConstants MousePointer [get, set]

Controls the control's mouse cursor

Retrieves or sets the cursor's type that's used if the mouse cursor is placed within the control's client area. Any of the values defined by the MousePointerConstants enumeration is valid.

See also:
MouseIcon, MousePointerConstants
VARIANT_BOOL MultiLine [get, set]

Specifies whether the control displays text in multiple lines

Retrieves or sets whether the control's caption is wrapped to multiple lines if it is too long to fit on a single line. If set to True, the text may be wrapped; otherwise not.

See also:
Text
VARIANT_BOOL ProcessContextMenuKeys [get, set]

Specifies whether the ContextMenu event can be invoked using the keyboard

Retrieves or sets whether the control fires the ContextMenu event if the user presses [SHIFT]+[F10] or [WINDOWS CONTEXTMENU]. If set to True, the event gets fired; otherwise not.

See also:
_ICheckBoxEvents::ContextMenu
VARIANT_BOOL Pushed [get, set]

Specifies whether the control is drawn like being pushed

Retrieves or sets whether the checkbox is drawn like being pushed. If set to True, it is drawn like being pushed; otherwise not.

See also:
Click, GetControlState
VARIANT_BOOL PushLike [get, set]

Controls the control's appearance

Retrieves or sets whether the checkbox is drawn like a push button. If set to True, it is drawn like a push button; otherwise it is drawn like a common checkbox.

See also:
Appearance, BorderStyle, Style
VARIANT_BOOL RegisterForOLEDragDrop [get, set]

Controls the control's behavior in drag'n'drop operations

Retrieves or sets whether the control is registered as a target for OLE drag'n'drop. If set to True, the control accepts OLE drag'n'drop actions; otherwise not.

See also:
SupportOLEDragImages, _ICheckBoxEvents::OLEDragEnter
RightToLeftConstants RightToLeft [get, set]

Controls the control's right-to-left features

Enables or disables bidirectional features. Any combination of the values defined by the RightToLeftConstants enumeration is valid.

Attention:
Changing this property destroys and recreates the control window.
See also:
CheckMarkOnRight, RightToLeftConstants
SelectionStateConstants SelectionState [get, set]

Specifies the state of the control's checkmark

Retrieves or sets the state of the control's checkmark. Any of the values defined by the SelectionStateConstants enumeration is valid.

See also:
AutoToggleCheckMark, TriState, GetControlState, SelectionStateConstants, _ICheckBoxEvents::SelectionStateChanged
StyleConstants Style [get, set]

Controls the control's appearance

Retrieves or sets the control's drawing style. Any of the values defined by the StyleConstants enumeration is valid.

See also:
Appearance, BorderStyle, PushLike, StyleConstants
VARIANT_BOOL SupportOLEDragImages [get, set]

Controls the control's behavior in drag'n'drop operations

Retrieves or sets whether the control creates an IDropTargetHelper object, so that a drag image can be displayed during OLE drag'n'drop. If set to True, the control creates the object; otherwise not.

Remarks:
Requires shell32.dll version 5.0 or higher.
See also:
RegisterForOLEDragDrop, IDropTargetHelper
BSTR Text [get, set]

Specifies the control's caption

Retrieves or sets the text that is displayed as the control's caption if the ContentType property is set to ctText.

See also:
HAlignment, VAlignment, MultiLine, ForeColor, Font, ContentType, Image, hImageList, GetIdealSize
OLE_YSIZE_PIXELS TextMarginBottom [get, set]

Controls the location of the control's caption

Retrieves or sets the bottom margin (in pixels) of the control's text.

Remarks:
Requires comctl32.dll version 6.0 or higher.
Current versions of Windows don't seem to support text margins.
See also:
TextMarginLeft, TextMarginRight, TextMarginTop, Text, GetIdealSize
OLE_XSIZE_PIXELS TextMarginLeft [get, set]

Controls the location of the control's caption

Retrieves or sets the left margin (in pixels) of the control's text.

Remarks:
Requires comctl32.dll version 6.0 or higher.
Current versions of Windows don't seem to support text margins.
See also:
TextMarginBottom, TextMarginRight, TextMarginTop, Text, GetIdealSize
OLE_XSIZE_PIXELS TextMarginRight [get, set]

Controls the location of the control's caption

Retrieves or sets the right margin (in pixels) of the control's text.

Remarks:
Requires comctl32.dll version 6.0 or higher.
Current versions of Windows don't seem to support text margins.
See also:
TextMarginBottom, TextMarginLeft, TextMarginTop, Text, GetIdealSize
OLE_YSIZE_PIXELS TextMarginTop [get, set]

Controls the location of the control's caption

Retrieves or sets the top margin (in pixels) of the control's text.

Remarks:
Requires comctl32.dll version 6.0 or higher.
Current versions of Windows don't seem to support text margins.
See also:
TextMarginBottom, TextMarginLeft, TextMarginRight, Text, GetIdealSize
VARIANT_BOOL TriState [get, set]

Specifies whether the control supports 3 states

Retrieves or sets whether the control's checkmark supports 3 states. If set to True, it supports 3 states; otherwise only 2.

See also:
SelectionState, AutoToggleCheckMark
VARIANT_BOOL UseSystemFont [get, set]

Specifies whether the control uses the system font

Retrieves or sets whether the control uses the MS Shell Dlg font (which is mapped to the system's default GUI font) or the font specified by the Font property. If set to True, the system font; otherwise the specified font is used.

See also:
Font
VAlignmentConstants VAlignment [get, set]

Controls the vertical alignment of the control's caption

Retrieves or sets the vertical alignment of the control's caption. Any of the values defined by the VAlignmentConstants enumeration is valid.

See also:
Text, HAlignment, IconAlignment, VAlignmentConstants
BSTR Version [get]

Retrieves the control's version

Remarks:
This property is read-only.

Generated by  doxygen 1.6.2