Vassili Philippov (vasja@spbteam.com), November 06, 2002.
I want my icon to appear on the task bar (the blue bar in the top of the screen). How can I do it?
First of all check that you really need it. "Designed for Windows for Pocket PC" logo requirements mention that you should not put anything on the taskbar:
Required: Applications May Not Use NavBar for Anything Application Specific
Other than the title, as required above, and the alert and notifications systems
supplied through the API, the applications may not use the NavBar area for any
additional functionality, such as for example subtitles of the current view,
controls, tool bars, status icons, etc.
The best way of adding an icon to the taskbar in using Notification API. You can read about using it in the following article The New Notification API in Pocket PC 2002.
Nevertheless a lot of things cannot be done with Notification API. For example:
To insert your own window to the taskbar you have to find taskbar window and create your window with the taskbar window as a parent. Here is a sample code for that:
Note that the taskbar can be completely covered by programs like WisBar or Dashboard. So if you want to work in all possible situations you should first check if such programs are running and insert your icon into their window (which is a child window of the taskbar) instead of the taskbar window.