Page 1 of 1

Windows Notification Service

PostPosted: Tue Nov 23, 2021 10:15 am
by Natter
Hi

Is it possible to use the Windows Notification Service via FW ?

Re: Windows Notification Service

PostPosted: Tue Nov 23, 2021 12:13 pm
by cnavarro
Look and try

Code: Select all  Expand view

#define NIIF_NONE                      0x00000000
#define NIIF_INFO                      0x00000001
#define NIIF_WARNING                   0x00000002
#define NIIF_ERROR                     0x00000003
#define NIIF_USER                      0x00000004
#define NIIF_NOSOUND                   0x00000010
#define NIIF_LARGE_ICON                0x00000020
#define NIIF_RESPECT_QUIET_TIME        0x00000040
#define NIIF_ICON_MASK                 0x0000000F

#define NIM_ADD                        0x00000000
#define NIM_MODIFY                     0x00000001
#define NIM_DELETE                     0x00000002
#define NIM_SETFOCUS                   0x00000003
#define NIM_SETVERSION                 0x00000004

#define WIN_LR_DEFAULTSIZE             0x00000040
#define WIN_IMAGE_ICON                 0x00000001

//----------------------------------------------------------------------------//

function Main()

   local nUuid
   local cText  := "En un lugar de la Mancha de cuyo nombre no quiero acordarme, vivía un hidalgo caballero"
   
   nUuid := win_UuidCreateString()
   win_ShellNotifyIcon( , nUuid, 2, , , .F., , , , )
   win_ShellNotifyIcon( , nUuid, 0, , "My tooltip", .T., hb_AnsiToOem( cText ), 10000, "Title info", NIIF_WARNING + NIIF_RESPECT_QUIET_TIME )

return nil
 

Re: Windows Notification Service

PostPosted: Tue Nov 23, 2021 12:37 pm
by karinha
Para que version de windows esto funciona? En 7 de 32 bits no funciona.

1 => En xHarbour no compila.

2 => en Harbour compila, más no executa.

Que pasa? Gracias.

Regards, saludos.

Re: Windows Notification Service

PostPosted: Tue Nov 23, 2021 12:58 pm
by cnavarro
Joao, lo has probado en Windows 10 ?

Image

Re: Windows Notification Service

PostPosted: Tue Nov 23, 2021 1:19 pm
by Natter
Thank you, Cristobal! This is what we need. At the same time, I will rebuild my program for Harbour. Is it possible to cause a full message window to appear (as if you click on the right button on the taskbar - Notifications)?

Re: Windows Notification Service

PostPosted: Tue Nov 23, 2021 1:23 pm
by cnavarro
Natter wrote:Thank you, Cristobal! This is what we need. At the same time, I will rebuild my program for Harbour. Is it possible to cause a full message window to appear (as if you click on the right button on the taskbar - Notifications)?


I'm sorry, I don't quite understand what you need
Can you put an image or something that is more descriptive?

Re: Windows Notification Service

PostPosted: Tue Nov 23, 2021 1:30 pm
by Natter
I can't get a photo to match the message in any way :(

Re: Windows Notification Service

PostPosted: Tue Nov 23, 2021 1:31 pm
by karinha
How a TrayIcon()? Type AVG anti virus messages? I didn't understand the issue either.

Regards, saludos.

Re: Windows Notification Service

PostPosted: Tue Nov 23, 2021 1:36 pm
by cnavarro
Use the "Screen Clipping" utility from Windows 10 itself

Re: Windows Notification Service

PostPosted: Tue Nov 23, 2021 1:51 pm
by Natter
Thanks, I try !

Click on the message icon to open a large pop-up message window. The latest messages are visible in this window.(including "Title info"). I was talking about this window

Re: Windows Notification Service

PostPosted: Tue Nov 23, 2021 2:15 pm
by cnavarro
Do you want to automatically open this window from Fivewin?

Re: Windows Notification Service

PostPosted: Tue Nov 23, 2021 2:32 pm
by Natter
Yes

Re: Windows Notification Service

PostPosted: Tue Nov 23, 2021 10:27 pm
by Ariel
Gracias Cristobal!!!!

Excelente aporte!

Re: Windows Notification Service

PostPosted: Wed Nov 24, 2021 12:16 am
by horacio
Excelente Cristobal! un gran aporte.

Saludos