// c := oTray:cBuffer
c = GetNotifyIconData( ::oWnd:hWnd, 1, WM_TASKBAR, oIcon:hIcon, "text of the tooltip", "The Title" )
#pragma BEGINDUMP
#include <hbapi.h>
#include <windows.h>
HB_FUNC( GETNOTIFYICONDATA )
{
NOTIFYICONDATAA nid;
memset( &nid, 0, sizeof( NOTIFYICONDATA ) );
nid.cbSize = sizeof( NOTIFYICONDATA );
nid.hWnd = ( HWND ) hb_parnl( 1 );
nid.uID = ( UINT ) hb_parnl( 2 );
nid.uFlags = NIF_INFO | NIF_MESSAGE | NIF_ICON | NIF_TIP;
nid.dwInfoFlags = NIIF_INFO;
nid.uCallbackMessage = ( UINT ) hb_parnl( 3 );
nid.hIcon = ( HICON ) hb_parnl( 4 );
strcpy( nid.szTip, hb_parc( 5 ) );
strcpy( nid.szInfo, hb_parc( 5 ) );
strcpy( nid.szInfoTitle, hb_parc( 6 ) );
hb_retclen( ( char * ) &nid, sizeof( NOTIFYICONDATA ) );
}
#pragma ENDDUMP
lailton.webmaster wrote:I need recomple my libs of fivewin ? or i can input it direct in my prg
set XHB=H:\xharbour
set BCC=H:\BCC55
set FWH=H:\FWH
%XHB%\bin\harbour %1 -I%XHB%\include;%FWH%\INCLUDE /m/n
%BCC%\bin\bcc32.exe -d -P- -c -tW -o%1.OBJ -I%FWH%\INCLUDE;%XHB%\include -DHARBOUR_USE_WIN_GTAPI -DHB_COMPAT_C53 %1.c
%BCC%\bin\tlib %FWH%\lib\fivehx.lib -%1.OBJ
%BCC%\bin\tlib %FWH%\lib\fivehx.lib +%1.OBJ
IF EXIST %1.c ( DEL %1.c )
#INCLUDE "Fivewin.CH"
STATIC oApp, oTray, oIcon
FUNCTION TESTIT()
LOCAL oIcon1
c := GetNotifyIconData( ::oWnd:hWnd, 1, WM_TASKBAR, oIcon:hIcon, "text of the tooltip", "The Title" )
DEFINE ICON oIcon FILE "..\icons\fivewin.ICO"
DEFINE ICON oIcon1 FILE "..\icons\folder.ico"
DEFINE WINDOW oApp TITLE "Icon Tray Class for FiveWin! from Jim Gale" ICON oIcon
ACTIVATE WINDOW oApp ;
ON INIT oTray := TTrayIcon():New(oApp,oIcon,"Testing tray ...",{||MsgInfo("Left CLick")},{|nRow,nCol|MenuTray(nRow,nCol,oTray)}) ;
VALID oTray:End() ;
ON RIGHT CLICK oTray:SetIcon( oIcon1, "Another" )
RETURN NIL
FUNCTION MenuTray( nRow, nCol, oTray )
LOCAL oMenu
MENU oMenu POPUP
MENUITEM "Show" ACTION oApp:Show(), oApp:SetFocus()
MENUITEM "Hide" ACTION oApp:Hide()
SEPARATOR
MENUITEM "Close Application" ACTION oApp:end()
ENDMENU
ACTIVATE POPUP oMenu AT nRow, nCol OF oTray:oWnd
RETURN NIL
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 57 guests