Help With TRAYICON

Help With TRAYICON

Postby lailton.webmaster » Wed Aug 27, 2008 4:50 am

Hey there boys

Me new here hehehe

well i wanna make it with fivewin

Image

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 ???

8)
lailton.webmaster
 
Posts: 603
Joined: Sun May 04, 2008 8:44 pm

Help

Postby lailton.webmaster » Thu Aug 28, 2008 4:40 am

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

thanks :o
lailton.webmaster
 
Posts: 603
Joined: Sun May 04, 2008 8:44 pm

Postby Antonio Linares » Thu Aug 28, 2008 9:53 am

Here you have a working example:

Image

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
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

=]

Postby lailton.webmaster » Thu Aug 28, 2008 2: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
lailton.webmaster
 
Posts: 603
Joined: Sun May 04, 2008 8:44 pm

Postby James Bott » Thu Aug 28, 2008 3: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Antonio Linares » Thu Aug 28, 2008 3:55 pm

James,

> except one which shows the ballon tooltip

Which app is it ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Antonio Linares » Thu Aug 28, 2008 3:59 pm

Lailton,

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

Code: Select all  Expand view  RUN
  // 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:
Code: Select all  Expand view  RUN
#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
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby James Bott » Thu Aug 28, 2008 4: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Antonio Linares » Thu Aug 28, 2008 4:11 pm

James,

Are you used to Microsoft Spy++ ?

Do you have it ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby James Bott » Thu Aug 28, 2008 4: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby James Bott » Thu Aug 28, 2008 5: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

tray

Postby lailton.webmaster » Thu Aug 28, 2008 8:30 pm

I need recomple my libs of fivewin ? or i can input it direct in my prg
lailton.webmaster
 
Posts: 603
Joined: Sun May 04, 2008 8:44 pm

Re: tray

Postby JC » Thu Aug 28, 2008 8: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
Code: Select all  Expand view  RUN
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
User avatar
JC
 
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil

My PRG TESTE

Postby lailton.webmaster » Thu Aug 28, 2008 9:11 pm

Code: Select all  Expand view  RUN
#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
Last edited by lailton.webmaster on Thu Aug 28, 2008 10:31 pm, edited 1 time in total.
lailton.webmaster
 
Posts: 603
Joined: Sun May 04, 2008 8:44 pm

error

Postby lailton.webmaster » 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.
lailton.webmaster
 
Posts: 603
Joined: Sun May 04, 2008 8:44 pm

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 25 guests