TimoSoft ButtonControls  1.8.9.175
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties Pages
IFrame Interface Reference

The main interface (frame) More...

Inherits IDispatch.

Public Member Functions

HRESULT About (void)
 Displays the control's credits More...
 
HRESULT Click (void)
 Clicks the frame by code More...
 
HRESULT GetControlState ([out, retval] ControlStateConstants *pControlState)
 Retrieves a bit field describing the control's state More...
 
HRESULT LoadSettingsFromFile ([in] BSTR file,[out, retval] VARIANT_BOOL *pSucceeded)
 Loads the control's settings from the specified file More...
 
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 More...
 

Properties

AppearanceConstants Appearance [get, set]
 Controls the style of the control's outer border More...
 
OLE_COLOR BackColor [get, set]
 Specifies the control's background color More...
 
BorderStyleConstants BorderStyle [get, set]
 Controls the style of the control's inner border More...
 
VARIANT_BOOL BorderVisible [get, set]
 Specifies whether the control's border and caption are drawn More...
 
ContentTypeConstants ContentType [get, set]
 Controls the type of the control's caption More...
 
DisabledEventsConstants DisabledEvents [get, set]
 Controls which events are fired More...
 
VARIANT_BOOL DontRedraw [get, set]
 Controls redrawing of the control More...
 
VARIANT_BOOL Enabled [get, set]
 Controls whether the control accepts user input More...
 
IFontDisp Font [get, set]
 Specifies the control's font More...
 
OLE_COLOR ForeColor [get, set]
 Specifies the control's text color More...
 
HAlignmentConstants HAlignment [get, set]
 Controls the horizontal alignment of the control's caption More...
 
OLE_HANDLE hImageList [get, set]
 Specifies the control's associated imagelist More...
 
LONG HoverTime [get, set]
 Controls when the MouseHover event is fired More...
 
OLE_HANDLE hWnd [get]
 Retrieves the control's window handle More...
 
IconAlignmentConstants IconAlignment [get, set]
 Controls the location of the control's icon More...
 
LONG IconIndex ([in, defaultvalue(-1)] LONG controlState) [get, set]
 Specifies the control's icons More...
 
OLE_YSIZE_PIXELS IconMarginBottom [get, set]
 Controls the location of the control's icon More...
 
OLE_XSIZE_PIXELS IconMarginLeft [get, set]
 Controls the location of the control's icon More...
 
OLE_XSIZE_PIXELS IconMarginRight [get, set]
 Controls the location of the control's icon More...
 
OLE_YSIZE_PIXELS IconMarginTop [get, set]
 Controls the location of the control's icon More...
 
OLE_HANDLE Image [get, set]
 Specifies the bitmap or icon displayed as caption More...
 
IPictureDisp MouseIcon [get, set]
 Controls the control's mouse cursor More...
 
MousePointerConstants MousePointer [get, set]
 Controls the control's mouse cursor More...
 
VARIANT_BOOL RegisterForOLEDragDrop [get, set]
 Controls the control's behavior in drag'n'drop operations More...
 
RightToLeftConstants RightToLeft [get, set]
 Controls the control's right-to-left features More...
 
StyleConstants Style [get, set]
 Controls the control's appearance More...
 
VARIANT_BOOL SupportOLEDragImages [get, set]
 Controls the control's behavior in drag'n'drop operations More...
 
BSTR Text [get, set]
 Specifies the control's caption More...
 
VARIANT_BOOL UseImprovedImageListSupport [get, set]
 Specifies whether the control uses code that makes usage of image lists easier More...
 
VARIANT_BOOL UseSystemFont [get, set]
 Specifies whether the control uses the system font More...
 
BSTR Version [get]
 Retrieves the control's version More...
 

Detailed Description

The main interface (frame)

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

See Also
_IFrameEvents

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 frame by code

See Also
_IFrameEvents::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
ControlStateConstants
HRESULT LoadSettingsFromFile ( [in] BSTR  file,
[out, retval] VARIANT_BOOL *  pSucceeded 
)

Loads the control's settings from the specified file

Parameters
[in]fileThe 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]fileThe file to write to.
Returns
True if the settings could be saved; otherwise False.
See Also
LoadSettingsFromFile

Property Documentation

AppearanceConstants Appearance
getset

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, Style, AppearanceConstants
OLE_COLOR BackColor
getset

Specifies the control's background color

Retrieves or sets the control's background color.

Remarks
This property isn't supported for themed frames.
See Also
ForeColor
BorderStyleConstants BorderStyle
getset

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, BorderVisible, Style, BorderStyleConstants
VARIANT_BOOL BorderVisible
getset

Specifies whether the control's border and caption are drawn

Retrieves or sets whether the control's border and caption are drawn. If set to True, the border and caption are drawn. If set to False, only the control's background is drawn.

See Also
BorderStyle, Text
ContentTypeConstants ContentType
getset

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
getset

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
getset

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
getset

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
getset

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
getset

Specifies the control's text color

Retrieves or sets the control's text color.

Remarks
This property isn't supported for themed frames.
See Also
BackColor, Text, Font
HAlignmentConstants HAlignment
getset

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, IconAlignment, HAlignmentConstants
OLE_HANDLE hImageList
getset

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 frame is in no special state.
  • 1 - Used if the frame is in 'hot' state, i. e. it's below the mouse cursor.
  • 2 - Currently not used.
  • 3 - Used if the frame is disabled.
  • 4 - Currently not used.
  • 5 - (Tablet PC specific) Currently not used.

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 previously set image list does NOT get destroyed automatically.
See Also
Image, Text, IconAlignment, UseImprovedImageListSupport, IconIndex
LONG HoverTime
getset

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
_IFrameEvents::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
_IFrameEvents::RecreatedControlWindow, _IFrameEvents::DestroyedControlWindow
IconAlignmentConstants IconAlignment
getset

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, IconAlignmentConstants
LONG IconIndex
getset

Specifies the control's icons

Retrieves or sets the zero-based indexes of the control's icons in the image list specified by the hImageList property. The control can use a different icon for each control state.

Parameters
[in]controlStateThe control state for the icon index shall be retrieved or set. If set to -1, the icon index is applied for all control states. The following control states exist:
  • Icon 0 - Used if the frame is in no special state.
  • Icon 1 - Used if the frame is in 'hot' state, i. e. it's below the mouse cursor.
  • Icon 2 - Currently not used.
  • Icon 3 - Used if the frame is disabled.
  • Icon 4 - Currently not used.
  • Icon 5 - (Tablet PC specific) Currently not used. If a state's icon index is set to -1, no icon is drawn for this state.
Remarks
This property is ignored if the UseImprovedImageListSupport is set to False.
See Also
UseImprovedImageListSupport, hImageList
OLE_YSIZE_PIXELS IconMarginBottom
getset

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
getset

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
getset

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
getset

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
getset

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 destroyed automatically by the control.
Due to limitations in Windows' Button window class, frames displaying a bitmap or icon won't use Windows XP themes.
See Also
ContentType, Text, hImageList
IPictureDisp MouseIcon
getset

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
getset

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 RegisterForOLEDragDrop
getset

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, _IFrameEvents::OLEDragEnter
RightToLeftConstants RightToLeft
getset

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.

See Also
RightToLeftConstants
StyleConstants Style
getset

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, StyleConstants
VARIANT_BOOL SupportOLEDragImages
getset

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
getset

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, ForeColor, Font, ContentType, Image, hImageList
VARIANT_BOOL UseImprovedImageListSupport
getset

Specifies whether the control uses code that makes usage of image lists easier

The Windows native button control supports assignment of an image list to display an icon on the button, but it requires the icon to be the first one in the image list. For this reason each button needs its own image list, so the more buttons with icons are used, the more image lists have to be created and managed. This leads to bloated code.
TimoSoft ButtonControls can work around this issue and allow the client application to specify the icons used by a button individually, so that all buttons can share the same image list. However, this feature slightly changes the control's behavior, so it must be activated explicitly to keep backward compatibility.
If this property is set to True, the work-around is activated; otherwise not.

Remarks
This property cannot be set at run-time.
See Also
hImageList, IconIndex
VARIANT_BOOL UseSystemFont
getset

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
BSTR Version
get

Retrieves the control's version

Remarks
This property is read-only.