The Toolbar control provided as a part of Compact Framework v1.0 does not support tooltips (they are shown when you tap and hold toolbar button). Here is how to add this missing functionality.
First of all, let's see how the tooltips are added. The proper way to do it is to create a tooltip control and pass its handle to the TB_SETTOOLTIPS message as wParam. This sounds pretty painful if we were to do this by means of CF. Fortunately there is an easier way listed in the documentation as legacy but supported all the way through CE 5.0. You can send TB_SETTOOLTIPS passing an array of tooltip strings as lParam and string count as wParam and the toolbar control will create a tooltip control for you. Finally one has to remember to modify toolbar style to include TBS_TOOLTIP and do all of the above before adding the buttons to the toolbar.
Armed with this knowledge we start with defining a few P/Invoke functions:
[DllImport("coredll")]
extern
static IntPtr GetCapture();
[DllImport("coredll")]
extern
static IntPtr LocalAlloc(int flags, int size);
[DllImport("coredll")]
extern
static IntPtr LocalFree(IntPtr p);[DllImport("aygshell")]
extern
static IntPtr SHFindMenuBar(IntPtr hwnd);
[DllImport("coredll")]
extern
static int SendMessage(IntPtr hWnd, int msg, int wParam, IntPtr lParam);
[DllImport("coredll")]
extern
static int SendMessage(IntPtr hWnd, int msg, int wParam, int lParam);
const
int TB_SETTOOLTIPS = (WM_USER + 81);
const
int TB_SETSTYLE = (WM_USER + 56);
const
int TB_GETSTYLE = (WM_USER + 57);
const
int TBSTYLE_TOOLTIPS = 0x0100;
const
int WM_USER = 0x0400;
Now, that we are almost ready to set tooltips, there is one final step left. The control expects to receive an array of string pointers. The Compact Framework marshaller is not capable of creating one. Instead we write a special piece of code that would marshal an array of strings into a block of unmanaged memory.
To add tootlips we create a string array, convert it into unmanaged array and then use it as the LPARAM when sending a TB_SETTOOLTIPS message. Keep in mind that the tooltip control will expect this memory to be preserved throught the application lifetime. Release it when the form is closed (or the tooltips are changed).
private IntPtr m_pLabels;
private string[] m_labels = new string[]
{ "Button1", "Button2", "Another button" };
SendMessage(hWndToolbar, TB_SETSTYLE, 0, SendMessage(hWndToolbar, TB_GETSTYLE, 0, 0) | TBSTYLE_TOOLTIPS);
m_pLabels = AllocateStringArray(m_labels);
SendMessage(hWndToolbar, TB_SETTOOLTIPS, m_labels.Length, m_pLabels);
The end result looks like this:

The sample code can be found here.