Windowless Applications
-
Some applications work in the background and have no window (but usually have a system tray icon) such as antivirus programs. Do these applications create a window but don't show it (by not using ShowWindow function) or there's a way to get around having to create a window? Thanks
-
Some applications work in the background and have no window (but usually have a system tray icon) such as antivirus programs. Do these applications create a window but don't show it (by not using ShowWindow function) or there's a way to get around having to create a window? Thanks
In order to create an icon in the system tray, you have to have a window. If you look at the Shell_NotifyIcon function, you pass it a window handle as part of the NOTIFYICONDATA structure. It is to this window that any messages (usually mouse move/click) are passed for you to respond to (e.g. show a popup menu). So in short, yes, you have to create a window. Nick Carruthers
-
In order to create an icon in the system tray, you have to have a window. If you look at the Shell_NotifyIcon function, you pass it a window handle as part of the NOTIFYICONDATA structure. It is to this window that any messages (usually mouse move/click) are passed for you to respond to (e.g. show a popup menu). So in short, yes, you have to create a window. Nick Carruthers
And if you're really cunning, you can use it for a splash screen before you hide it... Christian The content of this post is not necessarily the opinion of my yadda yadda yadda. To understand recursion, we must first understand recursion.
-
In order to create an icon in the system tray, you have to have a window. If you look at the Shell_NotifyIcon function, you pass it a window handle as part of the NOTIFYICONDATA structure. It is to this window that any messages (usually mouse move/click) are passed for you to respond to (e.g. show a popup menu). So in short, yes, you have to create a window. Nick Carruthers
-
Thanks a lot. I still have another question .. Is it possible to write a Windows application that doesn't have a window and doesn't even appear in the "Close Program" dialog box?
You could write a service application