News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Demonstration of Windows notifications and badges

Started by jorgon, July 07, 2025, 04:02:04 PM

Previous topic - Next topic

jorgon

The Email Client I am writing in GoAsm needs to give notifications and attach badges to the taskbar icon, for example when emails are received and are unread. 

So I created a demo to test what was available.

The attached demo starts with the ubiquitous MessageBox, then offers two types of popup notification - one which slides in from the bottom right hand side using timed paint functions, and another which uses a tracked tooltip.  For the badges, the demo offers Shell_NotifyIcon which puts an icon in the status area of the taskbar and the COM function SetOverlayIcon which overlays the application's taskbar icon. 

Finally the demo makes a good attempt at using the Windows Runtime Badge Notification interfaces to attach a badge or glyph to the taskbar icon. Unfortunately I then discovered that these interfaces do not work in an ordinary "Desktop app".  But at least the sample code in the demo shows that it is possible to code Windows Runtime in assembler.

Biterider

Hi jorgon
Thanks – it will definitely be useful for me  :thup:

Biterider

Biterider

#2
Hi jorgon
Here is some brief feedback.
I tried the application on Windows 10 Enterprise 22H2 and all the options worked except F5 and F6.
Perhaps I'm missing something?

Biterider


rsala

Hi Jeremy,

I tried your application on Windows 11 Pro 24H2 and all the options worked except F5 and F6.

Regards!
EC coder

jj2007

Win10: no luck with F5+F6, what does "try to show balloon" mean? I don't see any balloon...

jorgon

Yes as explained in the source .asm file and indeed in my original post, F6 does not work.  However, I've left the coding in the source .asm file to demonstrate that it is possible to code for Windows Runtime in assembler, despite almost all of the published examples being in C sharp or javascript.  I believe F6 does not work because  Windows Runtime Badge Notification (which it uses) does not work on an ordinary "Desktop app".  It is only for Universal Windows Platform (UWP) apps.

To see the result of F5 you need to look at the status area of the taskbar. An icon appears there for 5 seconds.  It's easy to miss it.

Quote from: jj2007 on July 08, 2025, 09:47:30 PMwhat does "try to show balloon" mean? I don't see any balloon...
As explained in the source .asm file, the code is there which should add a balloon to the icon which appears for 5 seconds in the status area of the taskbar after pressing F5, but this balloon does not actually appear.  I have no idea why this does not work.