encapsulation of tool tip controls More...
#include <window.h>
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) |
encapsulation of tool tip controls
Definition at line 849 of file window.h.
typedef WindowHandle ToolTip::super |
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(); }
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); }
void ToolTip::add | ( | HWND | hparent, |
HWND | htool, | ||
LPCTSTR | txt = LPSTR_TEXTCALLBACK , |
||
LPARAM | lparam = 0 |
||
) | [inline] |
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 }
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 }
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); }
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); }
ROS Explorer Source Code Documentation
generated on 02.01.2013 by ![]() |