Public Member Functions | Protected Attributes

ToolTipExtender Class Reference

This reference page is linked to from the following overview topics: What's New: 3ds Max 2009 SDK.


Search for all occurrences

Detailed Description

Internal use only. Hidden internal implementation for ToolTipExtender.

See also:
Class ToolTipExtender.

Description:
This class allows a developer to add tooltips to one or more window controls. Controls of all types are supported. One extender object can support all tooltips for a dialog, it's not necessary to create one extender per tooltip. This is useful for control types which do not have native tooltip support.

#include <winutil.h>

Inheritance diagram for ToolTipExtender:
Inheritance graph
[legend]

List of all members.

Public Member Functions

CoreExport  ToolTipExtender ()
  Class constructor.
virtual CoreExport  ~ToolTipExtender ()
  Class destructor.
virtual CoreExport void  SetToolTip (HWND hWnd, const MSTR &toolTipIn)
  Sets a tooltip for an arbitrary UI control.
virtual CoreExport void  GetToolTip (HWND hWnd, MSTR &toolTipOut)
  Gets the tooltip for an arbitrary UI control.
virtual CoreExport void  RemoveToolTip (HWND hWnd)
  Removes the tooltip from an arbitrary UI control.
virtual CoreExport void  RemoveToolTips ()
  Removes all tooltips and releases heap memory.
virtual CoreExport HWND  GetToolTipHWND ()
  Returns a handle to the operating system's ToolTip object.

Protected Attributes

ToolTipExtenderImpl *  impl
  Internal use only. This implementation object is created when the first tooltip is set.

Constructor & Destructor Documentation

CoreExport ToolTipExtender ( )

Class constructor.

No heap memory is allocated until tooltips are actually set.

virtual CoreExport ~ToolTipExtender ( ) [virtual]

Class destructor.

Removes all tooltips and releases heap memory.


Member Function Documentation

virtual CoreExport void SetToolTip ( HWND  hWnd,
const MSTR toolTipIn 
) [virtual]

Sets a tooltip for an arbitrary UI control.

Calling this twice for a single control is safe, and will remove the first tooltip. Calling this for multiple controls is allowed, as this class supports an unlimited number of tooltips. Note that tooltip resources are not automatically freed when a control is destroyed. Resources are freed when the extender is destroyed, or by calling RemoveToolTip() or Reset().

Parameters:
hWnd Handle to the window control.
toolTipIn ToolTip string. The string is copied, so the caller may safely delete this.
virtual CoreExport void GetToolTip ( HWND  hWnd,
MSTR toolTipOut 
) [virtual]

Gets the tooltip for an arbitrary UI control.

This only functions for tooltips set with this class. Returns an empty string if no tooltip is set.

Parameters:
hWnd Handle to the window control.
toolTipOut ToolTipOutput string. The method will resize the string as necessary.
virtual CoreExport void RemoveToolTip ( HWND  hWnd ) [virtual]

Removes the tooltip from an arbitrary UI control.

This only functions for tooltips set with this class. Note that tooltip resources are not automatically freed when a control is destroyed. Resources are freed when the extender is destroyed, or by calling this function or Reset().

Parameters:
hWnd Handle to the window control.
virtual CoreExport void RemoveToolTips ( ) [virtual]

Removes all tooltips and releases heap memory.

virtual CoreExport HWND GetToolTipHWND ( ) [virtual]

Returns a handle to the operating system's ToolTip object.

This provides access to extended tooltip functionality. See the operating system's documentation for TOOLTIPS_CLASS.


Member Data Documentation

ToolTipExtenderImpl* impl [protected]

Internal use only. This implementation object is created when the first tooltip is set.


ToolTipExtender ToolTipExtender ToolTipExtender ToolTipExtender ToolTipExtender ToolTipExtender ToolTipExtender ToolTipExtender ToolTipExtender ToolTipExtender
ToolTipExtender ToolTipExtender ToolTipExtender ToolTipExtender ToolTipExtender ToolTipExtender ToolTipExtender ToolTipExtender ToolTipExtender ToolTipExtender