SysThumbnailAddButton (Function) In french: SysMiniatureAjouteBouton Adds a button into the thumbnail of the application in the taskbar. Used to give quickly access to some application features.
// Initialize a multimedia reader SysThumbnailAddButton("reading.ico", "Reading", Reading) SysThumbnailAddButton("pause.ico", "Pause", Pause, sysbtnGrayed) SysThumbnailAddButton("stop.ico", "Stop", "", sysbtnGrayed) SysThumbnailAddButton(CompleteDir(fExeDir()) + "close.gif", "Close", "", sysbtnCloseThumbnail)
Syntax
<Result> = SysThumbnailAddButton(<Icon to display> , <Tooltip> , <WLanguage procedure> [, <Options>])
<Result>: Integer - Rank of the added button (between 1 and 7),
- -1 if the addition failed (or if the bar is already full).
<Icon to display>: Ansi or Unicode character string Path of the icon file to be displayed. This file can be found on the disk or in the application library (WDL file). The icon must be 16x16. If the icon is not 16x16, it will be automatically resized by Windows. <Tooltip>: Ansi or Unicode character string Text of the rollover tooltip of the button. <WLanguage procedure>: Procedure name Name of WLanguage procedure called during a click on the button. No procedure will be started if this parameters corresponds to an empty string (""). <Options>: Optional integer constant Management mode of button. The available constants are as follows: | | sysbtnActive (Default value) | The button is active. | sysbtnCloseThumbnail | Clicking the button closes the thumbnail of the application. | sysbtnGrayed | The button is grayed. | sysbtnInactive | The button cannot be clicked (this constant can be used only when the button is used as notification icon). | sysbtnInvisible | The button is invisible (its location is empty in the button bar). | sysbtnNoBackground | Only the button icon is drawn (not the button border). This constant can be used when the icon contains the border drawing. |
Remarks Special cases - Only 7 buttons can be associated with a thumbnail.
- If the icon is not 16x16, it will be automatically resized by Windows.
- The following image formats are supported in Windows:
- Bitmap (*.BMP)
- Graphics Interchange Format (*.gif)
- Joint Picture Experts Group (*.jpg ; *.jpeg)
- Kodak Photo CD (*.pcd)
- PaintBrush (*.pcx)
- Adobe Photoshop Format (*.psd)
- TrueVision TARGA (*.tga)
- Tagged Image File Format (*.tif ; *.tiff)
Remark: the "tiled tiff" option of tiff 6.0 standard is not supported. In this case, we advise you to save the image in tiff 5.0 standard. - Portable Network Graphics (*.png)
- Windows MetaFiles (*.emf ; *.wmf)
- Icons (*.ico ; *.icw)
Remarks: - HQ display (High Quality) available.
- Management of sheets in transparent BMP format (32 bits).
- Cursors (*.cur)
- Portable Document Format (*.pdf)
- Scalable Vector Graphics (*.svg)
- WINDEV images (generated by the image editor, *.WDPIC).
Caution This function must not be used in the declaration code of global variables of the window. The window must be displayed to get the desired result. If the button must be found in the thumbnail as soon as the window is opened, the function must be used in the initialization code of the window.
This page is also available for…
|
|
|
|