Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.


Channels ▼
RSS

Tools

Building a Callout Control

Source Code Accompanies This Article. Download It Now.


August, 2004: Building a Callout Control

Message Wrapper macro Description
WM_GETFONT Font handle to use for the text
WM_SETFONT
WM_GETICON Icon handle (optional)
WM_SETICON
CM_GETANCHOR Callout_GetAnchor(hwnd) Position of anchor in client coordinates
CM_SETANCHOR Callout_SetAnchor(hwnd, x, y)
CM_GETBACKCOLOR Callout_GetBackColor(hwnd) Color of interior of balloon
CM_SETBACKCOLOR Callout_SetBackColor(hwnd, Color, Repaint)
CM_GETBORDER Callout_GetBorder(hwnd) Border thickness
CM_SETBORDER Callout_SetBorder(hwnd, Width, Repaint)
CM_GETDRAWTEXTPROC Callout_GetDrawTextProc(hwnd) Text drawing function to replace DrawText()
CM_SETDRAWTEXTPROC Callout_SetDrawTextProc(hwnd, Proc, Repaint)
CM_GETEXTRAHEIGHT Callout_GetExtraHeight(hwnd) Extra height of balloon text box
CM_SETEXTRAHEIGHT Callout_SetExtraHeight(hwnd, Height, Repaint)
CM_GETMINWIDTH Callout_GetMinWidth(hwnd) Minimum width of balloon text box
CM_SETMINWIDTH Callout_SetMinWidth(hwnd, Width, Repaint)
CM_GETRADIUS Callout_GetRadius(hwnd) Radius of rectangle rounding
CM_SETRADIUS Callout_SetRadius(hwnd, Radius, Repaint)
CM_GETRECT Callout_GetRect(hwnd) Position and size of balloon text box
CM_GETTAILHEIGHT Callout_GetTailHeight(hwnd) Height of tail in pixels
CM_SETTAILHEIGHT Callout_SetTailHeight(hwnd, Height, Repaint)
CM_GETTAILJOIN Callout_GetTailJoin(hwnd) Horizontal position where tail joins balloon; a percentage of the balloon width
CM_SETTAILJOIN Callout_SetTailJoin(hwnd, Join, Repaint)
CM_GETTAILOFFSET Callout_GetTailOffset(hwnd) Vertical offset of tail to anchor point
CM_SETTAILOFFSET Callout_SetTailOffset(hwnd, Offset, Repaint)
CM_GETTAILSLANT Callout_GetTailSlant(hwnd) Tail slant (tangent of the angle); a negative value slants to the left
CM_SETTAILSLANT Callout_SetTailSlant(hwnd, Slant, Repaint)
CM_GETTAILSTYLE Callout_GetTailStyle(hwnd) Tail style: CS_SPEAK or CS_THINK
CM_SETTAILSTYLE Callout_SetTailStyle(hwnd, Style, Repaint)
CM_GETTAILWIDTH Callout_GetTailWidth(hwnd) Width of the tail where it joins the balloon
CM_SETTAILWIDTH Callout_SetTailWidth(hwnd, Width, Repaint)
CM_GETTEXTCOLOR Callout_GetTextColor(hwnd) Color of the text and border of the callout
CM_SETTEXTCOLOR Callout_SetTextColor(hwnd, Color, Repaint)
CM_GETTIMEOUT Callout_GetTimeout(hwnd) Timeout in milliseconds; 0 = no timeout
CM_SETTIMEOUT Callout_SetTimeout(hwnd, Timeout)
CM_GETVERTALIGN Callout_GetVertAlign(hwnd) Alignment of callout relative to the anchor point: CS_ALIGNABOVE or CS_ALIGNBELOW
CM_SETVERTALIGN Callout_SetVertAlign(hwnd, Alignment, Repaint)

Table 1: An overview of the standard and custom messages that you can send to the callout control.


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.