8#if !defined(OWL_TOOLTIP_H)
12#if defined(BI_HAS_PRAGMA_ONCE)
47 LPCTSTR txt = LPSTR_TEXTCALLBACK);
58 int resId, HINSTANCE txtResModule);
65 LPCTSTR txt = LPSTR_TEXTCALLBACK);
75 TToolInfo(HWND parent, HWND toolHwnd,
int resId, HINSTANCE strResModule);
86 void SetText(
int resId, HINSTANCE hinstance);
87 void SetText(LPCTSTR text,
bool copy =
true);
89 void SetRect(
const TRect& rect);
96 void EnableSubclassing(
bool enable =
true);
101 HWND GetToolWindow()
const;
102 void GetToolRect(
TRect& rect)
const;
107 bool IsPointInTool(HWND win,
const TPoint& pt)
const;
120 LPCTSTR GetCacheText()
const;
121 void FlushCacheText();
155 virtual void SetText(LPCTSTR text);
204 void Activate(
bool activate =
true);
215 bool AddTool(HWND ctrl,
const tstring& tip,
bool enableSubclassing =
true);
220 bool AddTool(HWND toolWnd,
int ctrlId,
const tstring& tip,
bool enableSubclassing =
true)
227 bool AddTool(HWND ctrl,
int tipResId,
TModule* m =
nullptr,
bool enableSubclassing =
true);
233 bool AddTool(HWND toolWnd,
int ctrlId,
int tipResId,
TModule* m =
nullptr,
bool enableSubclassing =
true)
240 bool AddTool(HWND toolWnd,
const TRect& tipArea,
uint toolId,
const tstring& tip,
bool enableSubclassing =
true);
247 bool AddTool(HWND toolWnd,
const TRect& tipArea,
uint toolId,
int tipResId,
TModule* m =
nullptr,
bool enableSubclassing =
true);
253 uint GetToolCount()
const;
286 void RelayEvent(MSG&);
290 void GetMargins(
int& left,
int& top,
int& right,
int& bottom)
const;
291 void SetMargins(
int left,
int top,
int right,
int bottom);
293 void SetDelayTime(
uint flag,
int delay);
294 int GetDelayTime(
uint flag)
const;
296 TResult GetMaxTipWidth()
const;
297 void SetMaxTipWidth(
int width);
299 TColor GetBkColor()
const;
300 void SetBkColor(
const TColor& clr);
302 TColor GetTextColor()
const;
303 void SetTextColor(
const TColor& clr);
306 void TrackActivate(
const TToolInfo& info,
bool activate =
true);
307 void TrackPosition(
const TPoint& pos);
337 lpszText =
CONST_CAST(LPTSTR, MAKEINTRESOURCE(resId));
357 enable ? (uFlags |= TTF_SUBCLASS) : (uFlags &= ~TTF_SUBCLASS);
368 return (uId == ti.uId && hwnd == ti.hwnd) ? true :
false;
555 return static_cast<int>(
CONST_CAST(
TTooltip*,
this)->SendMessage(TTM_GETDELAYTIME,flag));
572 TRect rec(left,top,right,bottom);
591 return static_cast<COLORREF
>(
CONST_CAST(
TTooltip*,
this)->SendMessage(TTM_GETTIPBKCOLOR));
603 return static_cast<COLORREF
>(
CONST_CAST(
TTooltip*,
this)->SendMessage(TTM_GETTIPTEXTCOLOR));
Pointer to an array of type T.
Class wrapper for management of color values.
TCommandEnabler(uint id, HWND hWndReceiver=0)
Constructs the TCommandEnabler object with the specified command ID.
TControl(TWindow *parent, int id, LPCTSTR title, int x, int y, int w, int h, TModule *module=nullptr)
Invokes TWindow's constructor, passing it parent (parent window), title (caption text),...
TFont derived from TGdiObject provides constructors for creating font objects from explicit informati...
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
TPoint is a support class, derived from tagPOINT.
TRect is a mathematical class derived from tagRect.
TTooltipText identifies a tool for which text is to be displayed.
Type-safe encapsulation of a Windows class name, a union between ATOM and LPCTSTR.
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
HWND GetDlgItem(int childId) const
Retrieves the handle of a control specified by childId.
TWindow * GetParent() const
Retrieves the OWL object of the parent window. If none exists, returns 0.
TModule * GetModule() const
Returns a pointer to the module object.
TResult SendMessage(TMsgId, TParam1=0, TParam2=0) const
Sends a message (msg) to a specified window or windows.
Definition of classes for CommonControl encapsulation.
int operator==(const TBitSet< T > &bs1, const TBitSet< T > &bs2)
TWindowFlag
Define bit masks for the internally used flag attributes of TWindow.
Object Windows Library (OWLNext Core).
uint32 MkUint32(uint16 lo, uint16 hi)
LPARAM TParam2
Second parameter type.
WPARAM TParam1
First parameter type.
LRESULT TResult
Result type.
General definitions used by all ObjectWindows programs.
#define CONST_CAST(targetType, object)