Jump to content
KodeZwerg

Redirect all Notify Icons to a seperate window possible?

Recommended Posts

Hello Winapi lovers,

 

I would like to have all notify icons (system tray?) in a seperate window. (everthing between taskbar entries and time display)

Is that possible at all?

 

Reason:

I would run that program to have a OnTop window open that does not close on its own and inform me what icons are avail (usb device, network symbol, programms with their bubble[number], and such....)

By default I do minimize TaskBar and having such would make my workflow alot easier!

 

For now I even dont have a starting point. Searching Msdn did not result me any positive clue.

 

I would also accept any pre-made application that do such to not reinvent wheels.

 

Thank you for reading!

Share this post


Link to post
Guest

hi @ KodeZwerg 

 

for this task you need to access the API to receive the TNotifications Center message on the MSWindows system, so you can do the form (SHOW) yourself to show the icons on the Taskbar ... but I don't know how to do it :))) )

 

https://docs.microsoft.com/en-us/windows/win32/shell/notification-area

https://docs.microsoft.com/en-us/windows/win32/uxguide/winenv-notification

Quote

NotificationIcon Sample
===============================
Demonstrates how to use the Shell_NotifyIcon and Shell_NotifyIconGetRect APIs to display a notification
icon. This also demonstrates how to display a rich flyout window, context menu, and balloon notifications.

Please note that Shell_NotifyIconGetRect and CalcualtePopupWindowPosition are only available on Windows 7 and higher.

https://docs.microsoft.com/en-us/windows/win32/shell/samples-notificationicon#downloading-the-sample

 

here an example from MS to access the Notifications and show it.

https://github.com/microsoft/Windows-classic-samples/blob/master/Samples/Win7Samples/winui/shell/appshellintegration/NotificationIcon/NotificationIcon.cpp

 

hug

Edited by Guest

Share this post


Link to post
1 hour ago, KodeZwerg said:

I would like to have all notify icons (system tray?) in a seperate window. (everthing between taskbar entries and time display)

Is that possible at all?

Maybe possible, but not easily.  Once upon a time, you could use a WH_CALLWNDPROC hook to intercept WM_COPYDATA messages being sent to the Taskbar's "Shell_TrayWnd" window, and then extract the NOTIFYICONDATA info from those messages.  But I'm not sure if that still applies anymore, what with all of the changes Microsoft has made to the Taskbar's system tray icon handling in the past decade.

Edited by Remy Lebeau

Share this post


Link to post

I do appreciate answers!

 

@emailx45 You might have misunderstood me. I do not want to place something into the tray, I like to make a copy of the tray 🙂  (or I did not found proper info in your links?)

 

@Remy Lebeau This would, if I get it running, just take effect on new created Icons, not those that are present before app run, right?

 

Maybe this is more easy and possible, having this window (appended image from emailx45 link) open all the time, that would help too!

 

(I do search ATM for a possibility to get with WinSpy or similar Information, but that window closes before I can access it..... arf!)

Screenshot - 19_03.png

Share this post


Link to post
2 hours ago, KodeZwerg said:

@Remy Lebeau This would, if I get it running, just take effect on new created Icons, not those that are present before app run, right?

Correct.  There is no Win32 API to enumerate and query existing tray icons.  In the old days, the Tray was a simple toolbar that you could enumerate with standard Toolbar messages, but that would not get you any details about the app/window associated with each icon.  With the redesign of the Taskbar and Tray in Windows 7 onward, I don't think that is doable anymore, or at least not 100%, due to the user's ability to hide icons.

Edited by Remy Lebeau

Share this post


Link to post
Guest
3 hours ago, KodeZwerg said:

You might have misunderstood me. I do not want to place something into the tray, I like to make a copy of the tray

hi @KodeZwerg

 

I understood your desire... HAVE the notifications in a YOUR WINDOWS ALL TIME ON SCREEN... for sure, I understood you.

But, as I said, you would need use API MSWindows to receive this notifications direct from system, or be, "catch a hook" from Notification Center from MSWindows to feed your FORM(Window)... but, I said I dont know as do it.

And the links by MS I thinked that can help you in this way...

 

hug

Share this post


Link to post

Kisses or hugs to both, you guys rock!

 

emailx45 you are right! msdn links are helpful, more knowlegde does never hurt! i just can repeat, i do appreciate answers, that includes you too *hug*

 

my conclusion for now is that hooking is no option since it is too late at the moment my program run.

what remy lebeau mentioned, that would make my day so shiny "enumerate and go", all problems solved.

 

on my image, the arrow button to pop-up customisation window, is that a callable api, does someone know that?

 

excuse my bad spelling, i try my best to write understandable text.

Share this post


Link to post
Guest

hi @KodeZwerg

 

if possible, Im curious about this task. Then, if you get it, please, post your code for us... :classic_cheerleader:

 

hug

Share this post


Link to post

@KodeZwerg I do not know if it will help you but

a few years ago I was asking a question

about how to put an icon on the taskbar. I got no real answer.

However, there is an application "FastCopy" https://fastcopy.jp/en/

which has a source.

While working the program puts its icon on the toolbar (left to the clock) and turns.

I wanted to do something similar with Delphi.

The source in c ,for that, is in the file "forceTray.cpp and mainwin.cpp"

if you can decipher its behavior (which I did not) 

it might help.

Edited by limelect

Share this post


Link to post

@limelect

On that page you are refering to I do not find any kind of source code at all.

Quote

FastCopy ver3.x Copyright(C) 2004-2020 by SHIROUZU Hiroaki and FastCopy Lab, LLC.

This program is free software. You can redistribute it and/or modify it under the GNU General Public License version 3.
license-gpl3.txt

(Due to various circumstances, distribution of the source code is temporarily suspended ... Please use FastCopy as freeware with no guarantee)

Can you share your copy of source please? Thank you!

Share this post


Link to post

Found it send me your mail

P.S I remember that the info was in the registry

so you can scan it

Edited by limelect
  • Thanks 1

Share this post


Link to post
9 minutes ago, limelect said:

Found it send me your mail

You got mail 🙂

Share this post


Link to post
6 hours ago, emailx45 said:

FastCopy "C" on Github souce include... (links)

Thank you @emailx45

BTW, name should be SlowCopy from that japanese Version. I never saw a slower Copy mechanism in my entire life. (more slower can just ReadByte, WriteByte, VerifyByte in a loop, hmm maybe thats how it works lol)

I Did not tested your linked versions, maybe there is one that deserves that title, but nevertheless, here we deal with Notify Icons^^

Share this post


Link to post
Guest
8 hours ago, KodeZwerg said:

Can you share your copy of source please? Thank you!

I not have reaponsability about your ask and I just find the Github repository... now about it have or not part if code to "icons subject" is not my responsability too. just helping both have a link for you... just see your posts, include below

10 hours ago, limelect said:

However, there is an application "FastCopy" https://fastcopy.jp/en/

which has a source.

While working the program puts its icon on the toolbar (left to the clock) and turns.

I wanted to do something similar with Delphi.

The source in c ,for that, is in the file "forceTray.cpp and mainwin.cpp"

if you can decipher its behavior (which I did not) 

it might help.

 

anyway, im exiting this discution.

 

hug

Edited by Guest

Share this post


Link to post
51 minutes ago, emailx45 said:

I not have reaponsability about your ask and I just find the Github repository... now about it have or not part if code to "icons subject" is not my responsability too. just helping both have a link for you... just see your posts, include below

 

anyway, im exiting this discution.

 

hug

no no no, stay, do not feel attacked by my bad spelling or misunderstood phrases.

if i did said something that makes you sad i do apology!

you ARE helpful! i just was not searching for any copy programs or codes to copy.

Share this post


Link to post
Guest
1 hour ago, KodeZwerg said:

i just was not searching for any copy programs or codes to copy.

ok! the words can dont xpress itself.

not problems.

 

if I can, I help.

 

hug

Edited by Guest

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×