I've done an evC++ app that shows battery as a little barat the bottom of
the screen.
I want to hide the App from task switchers in order to avoid being closed
when "close all app" are selected.
First I've tried creating the windows with the extended style
WS_EX_TOOLWINDOW set, and it works and hide the app for the control
panel-memory applet-task switcher and for WISbaar Advance 2, but not for
some others like Vbar.
Then I've found this link related to Windows 2000:
http://msdn.microsoft.com/msdnmag/issues/0500/c/ that talks about creating a
hidden main window with extended style WS_EX_TOOLWINDOW set and a Child
window with WS_EX_APPWINDOW turned off.
I've tried it, but WS_EX_APPWINDOW isn't supported on pocket pc, and if I
hide the main window the child window is also hidden (but the app doesn't
appear in Vbar). If I show the main Window, even without content and border,
then works but the child window doesn't remain as WS_EX_TOPMOST and also it
appears in Vbar.
The last try was only the main window, hidden and paint directly to the
screen (hDC = ::GetDC(NULL);) It works. The app doesn't appear in Vbar and
the battery is shown, but I can't interact with the window. I've an
ON_LBUTTON_UP to show a dialog for closing the app and I cannot show it in
this mode.
I've not more ideas: Does anybody knows how to hide completely an APP from
taskbars and remain visible and clickable? It have to be psiible because I
know some app that do this, like the icons in menubar and many others.