Public Types | Public Member Functions

ToolTip Struct Reference

encapsulation of tool tip controls More...

#include <window.h>

Inheritance diagram for ToolTip:
Inheritance graph
[legend]
Collaboration diagram for ToolTip:
Collaboration graph
[legend]

List of all members.

Public Types

typedef WindowHandle super

Public Member Functions

 ToolTip (HWND owner)
void activate (BOOL active=TRUE)
void add (HWND hparent, HWND htool, LPCTSTR txt=LPSTR_TEXTCALLBACK, LPARAM lparam=0)
void add (HWND hparent, UINT id, const RECT &rect, LPCTSTR txt=LPSTR_TEXTCALLBACK, LPARAM lparam=0)
void remove (HWND hparent, HWND htool)
void remove (HWND hparent, UINT id)

Detailed Description

encapsulation of tool tip controls

Definition at line 849 of file window.h.


Member Typedef Documentation

Definition at line 851 of file window.h.


Constructor & Destructor Documentation

ToolTip::ToolTip ( HWND  owner )

Definition at line 1260 of file window.cpp.

References activate().

 :  super(CreateWindowEx(WS_EX_TOPMOST|WS_EX_NOPARENTNOTIFY, TOOLTIPS_CLASS, 0,
                 WS_POPUP|TTS_NOPREFIX|TTS_ALWAYSTIP, CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,
                 owner, 0, g_Globals._hInstance, 0))
{
    activate();
}

Here is the call graph for this function:


Member Function Documentation

void ToolTip::activate ( BOOL  active = TRUE ) [inline]

Definition at line 855 of file window.h.

References WindowHandle::_hwnd.

Referenced by ToolTip().

    {
        SendMessage(_hwnd, TTM_ACTIVATE, active, 0);
    }

Here is the caller graph for this function:

void ToolTip::add ( HWND  hparent,
HWND  htool,
LPCTSTR  txt = LPSTR_TEXTCALLBACK,
LPARAM  lparam = 0 
) [inline]

Todo:
Why is it neccesary to try both TTM_ADDTOOLW and TTM_ADDTOOLW ?!

Definition at line 860 of file window.h.

References WindowHandle::_hwnd.

Referenced by ClockWindow::ClockWindow(), and NotifyArea::UpdateIcons().

    {
        TOOLINFO ti = {
            sizeof(TOOLINFO), TTF_SUBCLASS|TTF_IDISHWND|TTF_TRANSPARENT, hparent, (UINT)htool,
            {0,0,0,0}, 0, (LPTSTR)txt, lparam
        };

#ifdef UNICODE  ///@todo Why is it neccesary to try both TTM_ADDTOOLW and TTM_ADDTOOLW ?!
        if (!SendMessage(_hwnd, TTM_ADDTOOLW, 0, (LPARAM)&ti))
            SendMessage(_hwnd, TTM_ADDTOOLA, 0, (LPARAM)&ti);
#else
        if (!SendMessage(_hwnd, TTM_ADDTOOLA, 0, (LPARAM)&ti))
            SendMessage(_hwnd, TTM_ADDTOOLW, 0, (LPARAM)&ti);
#endif
    }

Here is the caller graph for this function:

void ToolTip::add ( HWND  hparent,
UINT  id,
const RECT &  rect,
LPCTSTR  txt = LPSTR_TEXTCALLBACK,
LPARAM  lparam = 0 
) [inline]

Definition at line 876 of file window.h.

References WindowHandle::_hwnd.

    {
        TOOLINFO ti = {
            sizeof(TOOLINFO), TTF_SUBCLASS|TTF_TRANSPARENT, hparent, id,
            {rect.left,rect.top,rect.right,rect.bottom}, 0, (LPTSTR)txt, lparam
        };

#ifdef UNICODE
        if (!SendMessage(_hwnd, TTM_ADDTOOLW, 0, (LPARAM)&ti))
            SendMessage(_hwnd, TTM_ADDTOOLA, 0, (LPARAM)&ti);
#else
        if (!SendMessage(_hwnd, TTM_ADDTOOLA, 0, (LPARAM)&ti))
            SendMessage(_hwnd, TTM_ADDTOOLW, 0, (LPARAM)&ti);
#endif
    }
void ToolTip::remove ( HWND  hparent,
HWND  htool 
) [inline]

Definition at line 892 of file window.h.

References WindowHandle::_hwnd.

Referenced by NotifyArea::UpdateIcons().

    {
        TOOLINFO ti = {
            sizeof(TOOLINFO), TTF_IDISHWND, hparent, (UINT)htool,
            {0,0,0,0}, 0, 0, 0
        };

        SendMessage(_hwnd, TTM_DELTOOL, 0, (LPARAM)&ti);
    }

Here is the caller graph for this function:

void ToolTip::remove ( HWND  hparent,
UINT  id 
) [inline]

Definition at line 902 of file window.h.

References WindowHandle::_hwnd.

    {
        TOOLINFO ti = {
            sizeof(TOOLINFO), 0, hparent, id,
            {0,0,0,0}, 0, 0, 0
        };

        SendMessage(_hwnd, TTM_DELTOOL, 0, (LPARAM)&ti);
    }

The documentation for this struct was generated from the following files:

ROS Explorer Source Code Documentation
generated on 02.01.2013 by doxygen

ROS Explorer Homepage