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]

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 832 of file window.h.


Member Typedef Documentation

typedef WindowHandle ToolTip::super

Definition at line 834 of file window.h.


Constructor & Destructor Documentation

ToolTip::ToolTip ( HWND  owner  ) 


Member Function Documentation

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

Definition at line 838 of file window.h.

00839     {
00840         SendMessage(_hwnd, TTM_ACTIVATE, active, 0);
00841     }

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 843 of file window.h.

00844     {
00845         TOOLINFO ti = {
00846             sizeof(TOOLINFO), TTF_SUBCLASS|TTF_IDISHWND|TTF_TRANSPARENT, hparent, (UINT)htool,
00847             {0,0,0,0}, 0, (LPTSTR)txt, lparam
00848         };
00849 
00850 #ifdef UNICODE  ///@todo Why is it neccesary to try both TTM_ADDTOOLW and TTM_ADDTOOLW ?!
00851         if (!SendMessage(_hwnd, TTM_ADDTOOLW, 0, (LPARAM)&ti))
00852             SendMessage(_hwnd, TTM_ADDTOOLA, 0, (LPARAM)&ti);
00853 #else
00854         if (!SendMessage(_hwnd, TTM_ADDTOOLA, 0, (LPARAM)&ti))
00855             SendMessage(_hwnd, TTM_ADDTOOLW, 0, (LPARAM)&ti);
00856 #endif
00857     }

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

Definition at line 859 of file window.h.

00860     {
00861         TOOLINFO ti = {
00862             sizeof(TOOLINFO), TTF_SUBCLASS|TTF_TRANSPARENT, hparent, id,
00863             {rect.left,rect.top,rect.right,rect.bottom}, 0, (LPTSTR)txt, lparam
00864         };
00865 
00866 #ifdef UNICODE
00867         if (!SendMessage(_hwnd, TTM_ADDTOOLW, 0, (LPARAM)&ti))
00868             SendMessage(_hwnd, TTM_ADDTOOLA, 0, (LPARAM)&ti);
00869 #else
00870         if (!SendMessage(_hwnd, TTM_ADDTOOLA, 0, (LPARAM)&ti))
00871             SendMessage(_hwnd, TTM_ADDTOOLW, 0, (LPARAM)&ti);
00872 #endif
00873     }

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

Definition at line 875 of file window.h.

00876     {
00877         TOOLINFO ti = {
00878             sizeof(TOOLINFO), TTF_IDISHWND, hparent, (UINT)htool,
00879             {0,0,0,0}, 0, 0, 0
00880         };
00881 
00882         SendMessage(_hwnd, TTM_DELTOOL, 0, (LPARAM)&ti);
00883     }

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

Definition at line 885 of file window.h.

00886     {
00887         TOOLINFO ti = {
00888             sizeof(TOOLINFO), 0, hparent, id,
00889             {0,0,0,0}, 0, 0, 0
00890         };
00891 
00892         SendMessage(_hwnd, TTM_DELTOOL, 0, (LPARAM)&ti);
00893     }


The documentation for this struct was generated from the following file:
IBrowser Source Code Documentation
generated on 18.09.2008 by doxygen

Homepage