FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Help With TRAYICON
Posts: 603
Joined: Sun May 04, 2008 08:44 PM
Help With TRAYICON
Posted: Wed Aug 27, 2008 04:50 AM
Hey there boys

Me new here hehehe

well i wanna make it with fivewin



is possible ?? if is please show me !!!!!!!!!


i wanna input it in my sis, i only know insert icon in tray but the more
important is show a message the same it

someone know ???

:-)
Posts: 603
Joined: Sun May 04, 2008 08:44 PM
Help
Posted: Thu Aug 28, 2008 04:40 AM

Hey there someone know make it please
i need is very important

thanks :o

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Help With TRAYICON
Posted: Thu Aug 28, 2008 09:53 AM
Here you have a working example:



Here you have the EXE to test it:
http://rapidshare.com/files/140743748/testtray.zip.html
Please copy the EXE to c:\FWH\samples

Based on our tests, the balloon tooltip is only shown the first time the app is placed in the tray. Later on, the standard tooltip is shown. We don't know yet if this is the standard Windows behavior or can be modified.

What FWH version are you using ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 603
Joined: Sun May 04, 2008 08:44 PM
=]
Posted: Thu Aug 28, 2008 02:22 PM

I use FWH8.5

I compilling my sample testtray.prg more he only chance a
icon by other icon...

can u show me ur prg, is possible with 8.5 i have 8.7 too more i dont use because 8.5 i have other dependece lib that i dont have in 8.7

thanks so much

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Help With TRAYICON
Posted: Thu Aug 28, 2008 03:31 PM

Antonio,

>Based on our tests, the balloon tooltip is only shown the first time the app is placed in the tray. Later on, the standard tooltip is shown. We don't know yet if this is the standard Windows behavior or can be modified.

In my tray all the apps show the standard tooltip except one which shows the ballon tooltip. So, it seems that the standard tooltip is standard behavior but it can be modified.

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Help With TRAYICON
Posted: Thu Aug 28, 2008 03:55 PM

James,

> except one which shows the ballon tooltip

Which app is it ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Help With TRAYICON
Posted: Thu Aug 28, 2008 03:59 PM
Lailton,

You have to do these changes in Class TTray (fwh\sources\ttray.prg):

  // c := oTray:cBuffer

  c = GetNotifyIconData( ::oWnd:hWnd, 1, WM_TASKBAR, oIcon:hIcon, "text of the tooltip", "The Title" )

and add this code at the bottom of the Class:
#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
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Help With TRAYICON
Posted: Thu Aug 28, 2008 04:08 PM

Antinio,

> Which app is it?

It is called Free Download Manager:

http://www.freedownloadmanager.org/

This is a great program by the way. It downloads files much faster than the built-in windows system.

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Help With TRAYICON
Posted: Thu Aug 28, 2008 04:11 PM

James,

Are you used to Microsoft Spy++ ?

Do you have it ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Help With TRAYICON
Posted: Thu Aug 28, 2008 04:17 PM

Antinio,

>Are you used to Microsoft Spy++ ?

>Do you have it ?

I have not heard of it. Do you want me to use it to test the Free Download Manager?

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Help With TRAYICON
Posted: Thu Aug 28, 2008 05:07 PM

Antonio,

I found a program that claims to be better than Spy++. It is called Winspector.

http://www.windows-spy.com/

It is free. I have installed it, but I don't know what to look for or what information you need.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 603
Joined: Sun May 04, 2008 08:44 PM
tray
Posted: Thu Aug 28, 2008 08:30 PM

I need recomple my libs of fivewin ? or i can input it direct in my prg

Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
Re: tray
Posted: Thu Aug 28, 2008 08:36 PM
lailton.webmaster wrote:I need recomple my libs of fivewin ? or i can input it direct in my prg


Lailton, tu precisa fazer a alteração no ttray.prg e somente executar a remoção/inclusão do .obj na fivehx.lib

Caso tu não saiba como, aqui tá um código para .bat que faz isso
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 )

Vc só precisa alterar os paths para os teus aí e depois, só faz a chamada no DOS assim: arquivo.bat ttray sem adicionar extensão do .prg
Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
Posts: 603
Joined: Sun May 04, 2008 08:44 PM
My PRG TESTE
Posted: Thu Aug 28, 2008 09:11 PM
#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
Posts: 603
Joined: Sun May 04, 2008 08:44 PM
error
Posted: Thu Aug 28, 2008 10:17 PM

xHarbour Compiler build 1.1.0 (SimpLex) (Rev. 6095)
Copyright 1999-2008, http://www.xharbour.org http://www.harbour-project.org/
Compiling 'DEMO.PRG'...

100

100

100

200

300

400

500

600

700

800

900

1000

100

200

100

200

100

200

300

400

500

600

700

800

900

1000

1100

1200

1300

1400

1500

Lines 66, Functions/Procedures 2
Generating C source output to 'obj\DEMO.c'...
Done.

Building object module for 'obj\DEMO.c'
using C compiler 'BCC32' as defined in 'c:\xharbour\bin\harbour.cfg'...
Exec: BCC32 -c -D__EXPORT__ -Ic:\xharbour\include -d -Lc:\xharbour\lib -oobj\DEMO.obj obj\DEMO.c
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
obj\DEMO.c:
Error E2451 DEMO.PRG 55: Undefined symbol 'NIF_INFO' in function HB_FUN_GETNOTIFYICONDATA
Error E2451 DEMO.PRG 56: Undefined symbol 'dwInfoFlags' in function HB_FUN_GETNOTIFYICONDATA
Error E2451 DEMO.PRG 56: Undefined symbol 'NIIF_INFO' in function HB_FUN_GETNOTIFYICONDATA
Error E2451 DEMO.PRG 60: Undefined symbol 'szInfo' in function HB_FUN_GETNOTIFYICONDATA
Error E2451 DEMO.PRG 61: Undefined symbol 'szInfoTitle' in function HB_FUN_GETNOTIFYICONDATA
*** 5 errors in Compile ***
Done.
Deleting: "obj\DEMO.c"
Done.