Taskbar – Giavapps Windows API

 

 

api_taskbar_add_notify_icon(WindowHandle, IconIndex, IconHandle) Adds an icon to the taskbar notification area. The function returns true if successful, or false otherwise.

WindowHandle: it must be a WindowHandle.
IconIndex: zero-based index of the taskbar icon.
IconHandle: it must be an IconHandle.

 

api_taskbar_set_notify_icon_tooltip(WindowHandle,IconIndex,IconFlags,Text,Title) Shows a tooltip balloon in the taskbar notification area. The function returns true if successful, or false otherwise.

WindowHandle: it must be a WindowHandle.
IconIndex: zero-based index of the taskbar icon.
IconFlag: Flags that can be set to modify the behavior and appearance of a balloon notification.
Text: text of the tooltip.
Title: title of the tooltip.

IconFlags argument can be a combination of the following values:

NIIF_NONE No icon.

NIIF_INFO An information icon.

NIIF_WARNING A warning icon.

NIIF_ERROR An error icon.

NIIF_USER Windows XP SP2 and later. uses the IconHandle specified in api_taskbar_add_notify_icon() as the notification balloon’s title icon.

NIIF_NOSOUND Windows XP and later. Do not play the associated sound. Applies only to notifications.

NIIF_LARGE_ICON Windows Vista and later. The large version of the icon should be used as the notification icon.

NIIF_RESPECT_QUIET_TIME Windows 7 and later. Do not display the balloon notification if the current user is in "quiet time", which is the first hour after a new user logs into his or her account for the first time. During this time, most notifications should not be sent or shown. This lets a user become accustomed to a new computer system without those distractions. Quiet time also occurs for each user after an operating system upgrade or clean installation. A notification sent with this flag during quiet time is not queued; it is simply dismissed unshown. The application can resend the notification later if it is still valid at that time. Because an application cannot predict when it might encounter quiet time, we recommended that this flag always be set on all appropriate notifications by any application that means to honor quiet time. During quiet time, certain notifications should still be sent because they are expected by the user as feedback in response to a user action, for instance when he or she plugs in a USB device or prints a document. If the current user is not in quiet time, this flag has no effect.

NIIF_ICON_MASK Windows XP and later. Reserved.

 

api_taskbar_get_notify_icon_clicked(IconIndex, MouseButton) Returns true when the user clicks on the specified icon in the taskbar notification area or false otherwise.

IconIndex: zero-based index of the taskbar icon.
MouseButton: this argument accepts mb_left, mb_right, mb_middle or mb_any constants.

 

api_taskbar_get_notify_icon_doubleclicked(IconIndex, MouseButton) Returns true when the user double clicks on the specified icon in the taskbar notification area or false otherwise.

IconIndex: zero-based index of the taskbar icon.
MouseButton: this argument accepts mb_left, mb_right, mb_middle or mb_any constants.

 

api_taskbar_get_notify_icon_released(IconIndex, MouseButton) Returns true when the user released the mouse click on the specified icon in the taskbar notification area or false otherwise.

IconIndex: zero-based index of the taskbar icon.
MouseButton: this argument accepts mb_left, mb_right, mb_middle or mb_any constants.

 

api_taskbar_get_notify_icon_over(IconIndex) Returns true when the user moves the mouse pointer over the specified icon in the taskbar notification area or false otherwise.

IconIndex: zero-based index of the taskbar icon.

 

api_taskbar_delete_notify_icon(WindowHandle, IconIndex) Deletes an icon from the notification area. The function returns true if successful, or false otherwise.

WindowHandle: it must be a WindowHandle.
IconIndex: zero-based index of the taskbar icon.

 

api_taskbar_set_flash(WindowHandle, FlashFlags, Count, Timeout) Flashes the specified window. It does not change the active state of the window. The return value specifies the window’s state before the call to the function. If the window caption was drawn as active before the call, the return value is nonzero. Otherwise, the return value is zero.

WindowHandle: it must be a WindowHandle.
FlashFlags: specifies the flash status.
Count: the number of times to flash the window.
Timeout: the rate at which the window is to be flashed, in milliseconds. If Timeout is zero, the function uses the default cursor blink rate.

FlashFlags argument can be a combination of the following values:

FLASHW_ALL Flash both the window caption and taskbar button. This is equivalent to setting the FLASHW_CAPTION | FLASHW_TRAY flags.

FLASHW_CAPTION Flash the window caption.

FLASHW_STOP Stop flashing. The system restores the window to its original state.

FLASHW_TIMER Flash continuously, until the FLASHW_STOP flag is set.

FLASHW_TIMERNOFG Flash continuously until the window comes to the foreground.

FLASHW_TRAY Flash the taskbar button.

 

Code Examples

 

Adding an Icon to the Taskbar Notification Area

 

icon = api_icon_add("myicon.ico");
api_taskbar_add_notify_icon(window,0,icon);

 

Checking When Mouse Pointer is Over an Icon

 

Create Event

 

alarm[0] = room_speed;//sets the alarm 0 event

 

Alarm 0 Event

 

if(api_taskbar_get_notify_icon_over(0))
{
api_taskbar_set_notify_icon_tooltip(window,0,NIIF_INFO | NIIF_LARGE_ICON,"Mouse Pointer is over the Icon in the Taskbar Notification Area!","INFORMATION");
}
alarm[0] = room_speed;//loops the alarm…

 

Flashing the Taskbar Button

 

api_taskbar_set_flash(window,FLASHW_TRAY,10,0);

 

I am Luigi Piscopo, also known as DJ GiDeejay / Producer / Remixer in the music world. I am a Producer with a lot of experience in photo editing, video editing, audio editing, graphic design, web design, programming and promotion.

Leave a Reply

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *

*