AttachTrayIconMenu

int AttachTrayIconMenu (int iconHandle);

Purpose

This function attaches a right–click popup menu to the specified System Tray icon. See the Class Help for more information on the recommended usage of System Tray icons and their popup menus.

You will add items to this popup menu with InsertTrayIconMenuItem.

Parameters

Input
Name Type Description
iconHandle integer The handle of the System Tray icon for which you wish to attach a popup menu. This handle will have been returned from InstallSysTrayIcon.

Return Value

Name Type Description
status integer The status code that the function returns.

0 indicates success.

A negative value indicates an error.

This function may return a Programmer's Toolbox or UI Library error code. Call GetGeneralErrorString to obtain a text description of the error.