TimoSoft EditControls  1.11.0.214
IHotKeyBox Interface Reference

The main interface More...

Inherits IDispatch.

Public Member Functions

HRESULT About (void)
 Displays the control's credits More...
 
HRESULT GetCurrentKeyCombination ([in, out, defaultvalue(0)] ModifierKeysConstants *modifierKeys, [in, out, defaultvalue(0)] BYTE *keyCode)
 Retrieves the current key combination displayed by the control 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...
 
HRESULT SetCurrentKeyCombination ([in] ModifierKeysConstants modifierKeys, [in] BYTE keyCode)
 Sets the key combination displayed by the control More...
 
HRESULT FinishOLEDragDrop (void)
 Finishes a pending drop operation 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...
 
ModifierKeysConstants DefaultModifierKeys [get, set]
 Controls the automatic correction of invalid key combinations More...
 
OLE_COLOR DisabledBackColor [get, set]
 Specifies the control's background color 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...
 
LONG HoverTime [get, set]
 Controls when the MouseHover event is fired More...
 
OLE_HANDLE hWnd [get]
 Retrieves the control's window handle More...
 
InvalidKeyCombinationsConstants InvalidKeyCombinations [get, set]
 Specifies the kinds of key combinations that are handled as invalid 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 ProcessContextMenuKeys [get, set]
 Specifies whether the ContextMenu event can be invoked using the keyboard 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...
 
VARIANT_BOOL SupportOLEDragImages [get, set]
 Controls the control's behavior in drag'n'drop operations More...
 
BSTR Text [get]
 Retrieves the current key combination as a string More...
 
VARIANT_BOOL UseSystemFont [get, set]
 Specifies whether the control uses the system font More...
 
BSTR Version [get]
 Retrieves the control's version More...
 
VARIANT_BOOL DetectDoubleClicks [get, set]
 Specifies whether the control intercepts double clicks More...
 

Detailed Description

The main interface

Author
Timo "TimoSoft" Kunze This is the hot key control's main interface. It wraps the control window.
See also
_IHotKeyBoxEvents

Member Function Documentation

◆ About()

HRESULT About ( void  )

Displays the control's credits

Displays some information about this control and its author.

◆ GetCurrentKeyCombination()

HRESULT GetCurrentKeyCombination ( [in, out, defaultvalue(0)] ModifierKeysConstants modifierKeys,
[in, out, defaultvalue(0)] BYTE *  keyCode 
)

Retrieves the current key combination displayed by the control

Parameters
[out]modifierKeysThe modifier keys that are part of the key combination. Any combination of the values defined by the ModifierKeysConstants enumeration is valid.
[out]keyCodeThe virtual key code of the key that the key combination is based on.
See also
SetCurrentKeyCombination, ModifierKeysConstants

◆ LoadSettingsFromFile()

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

◆ 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

◆ SetCurrentKeyCombination()

HRESULT SetCurrentKeyCombination ( [in] ModifierKeysConstants  modifierKeys,
[in] BYTE  keyCode 
)

Sets the key combination displayed by the control

Parameters
[in]modifierKeysThe modifier keys that are part of the key combination. Any combination of the values defined by the ModifierKeysConstants enumeration is valid.
[in]keyCodeThe virtual key code of the key that the key combination is based on.
Remarks
Setting modifierKeys and keyCode to 0 clears the key combination.
See also
GetCurrentKeyCombination, ModifierKeysConstants

◆ FinishOLEDragDrop()

HRESULT FinishOLEDragDrop ( void  )

Finishes a pending drop operation

During a drag'n'drop operation the drag image is displayed until the OLEDragDrop event has been handled. This order is intended by Microsoft Windows. However, if a message box is displayed from within the OLEDragDrop event, or the drop operation cannot be performed asynchronously and takes a long time, it may be desirable to remove the drag image earlier.
This method will break the intended order and finish the drag'n'drop operation (including removal of the drag image) immediately.

Remarks
This method will fail if not called from the OLEDragDrop event handler or if no drag images are used.
See also
_IHotKeyBoxEvents::OLEDragDrop, SupportOLEDragImages

Property Documentation

◆ Appearance

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, AppearanceConstants

◆ BackColor

OLE_COLOR BackColor
getset

Specifies the control's background color

Retrieves or sets the control's background color.

See also
DisabledBackColor

◆ BorderStyle

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, BorderStyleConstants

◆ DefaultModifierKeys

ModifierKeysConstants DefaultModifierKeys
getset

Controls the automatic correction of invalid key combinations

Retrieves or sets the combination of modifier keys, that is used automatically if the user enters an invalid key combination. Any combination of the values defined by the ModifierKeysConstants enumeration is valid.

See also
InvalidKeyCombinations, ModifierKeysConstants

◆ DisabledBackColor

OLE_COLOR DisabledBackColor
getset

Specifies the control's background color

Retrieves or sets the color used as the control's background color, if the control is disabled. If set to -1, the system's default color is used.

See also
Enabled, BackColor

◆ DisabledEvents

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

◆ DontRedraw

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.

◆ Enabled

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.

◆ Font

IFontDisp Font
getset

Specifies the control's font

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

See also
UseSystemFont, Text

◆ HoverTime

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
_IHotKeyBoxEvents::MouseHover

◆ hWnd

OLE_HANDLE hWnd
get

Retrieves the control's window handle

Retrieves the control's window handle.

Remarks
This property is read-only.
See also
_IHotKeyBoxEvents::RecreatedControlWindow, _IHotKeyBoxEvents::DestroyedControlWindow

◆ InvalidKeyCombinations

InvalidKeyCombinationsConstants InvalidKeyCombinations
getset

Specifies the kinds of key combinations that are handled as invalid

Retrieves or sets the types of key combinations, that the control won't accept. Any combination of the values defined by the InvalidKeyCombinationsConstants enumeration is valid.

See also
DefaultModifierKeys, InvalidKeyCombinationsConstants

◆ MouseIcon

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

◆ MousePointer

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

◆ ProcessContextMenuKeys

VARIANT_BOOL ProcessContextMenuKeys
getset

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 events get fired; otherwise not.

See also
_IHotKeyBoxEvents::ContextMenu

◆ RegisterForOLEDragDrop

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, _IHotKeyBoxEvents::OLEDragEnter

◆ RightToLeft

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

◆ SupportOLEDragImages

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, FinishOLEDragDrop, IDropTargetHelper

◆ Text

BSTR Text
get

Retrieves the current key combination as a string

Retrieves a (localized) string representation of the key combination currently displayed by the control.

Remarks
This is the control's default property.
This property is read-only.
See also
Font

◆ UseSystemFont

VARIANT_BOOL UseSystemFont
getsetproperty

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

◆ Version

BSTR Version
get

Retrieves the control's version

Remarks
This property is read-only.

◆ DetectDoubleClicks

VARIANT_BOOL DetectDoubleClicks
getset

Specifies whether the control intercepts double clicks

Enables or disables double clicks. If set to True, double clicks are accepted; otherwise all clicks are handled as single clicks.

See also
_IHotKeyBoxEvents::DblClick, _IHotKeyBoxEvents::MDblClick, _IHotKeyBoxEvents::RDblClick, _IHotKeyBoxEvents::XDblClick