Archived

This topic is now archived and is closed to further replies.

Zeke

Multiple windows having own icon on the taskbar

Recommended Posts

Ive got an app that has a number of windows i.e. a main window and a number of secondary windows. They are all mfc dialogs. When i run the app only 1 icon appears on the system tray but I want to be able to specify whether any of the secondary windows also appear on the task bar. The idea is that these secondary windows are dockable and should the user move them and then obscure them with another window they should be able to bring the obscured window to the top on its own by clicking on the corresponding taskbar item. Its quite puzzling because i managed to make something similar in win32 and if i specified a parent when creating the secondary windows then there would be only 1 icon on the taskbar but if i specified null as the parent then each secondary window would have its own seperate icon on the taskbar. However the same is not true of these mfc dialogs. Can anyone give me any clue as to how to make these windows all appear on the taskbar? Thanks for your time

Share this post


Link to post
Share on other sites
Thanks for the reply.

Thats what i thought so i checked the window styles of these dialog boxes and sure enough they all have the WS_POPUP style and none of them have the WS_CHILD style and yet they still dont show up seperately on the taskbar.

edit:
Just in case theres any confusion, by taskbar i mean the bar across the whole length of the bottom of the screen not the system tray thingy to the bottom right of the screen (im just not sure if taskbar is the right term for what im on about ).

[edited by - Zeke on July 30, 2002 11:38:54 AM]

Share this post


Link to post
Share on other sites
Ive figured out a sort of cheat for doing this. If as i create the secondary windows i create a standard win32 window (specifying no parent and WS_POPUP) and minimise it it will be on the taskbar, I can then handle messages from it (i.e. WM_ACTIVATE or whatever) and instead of processing them for that window process them for the window it is masquerading as.

A problem Ive found with this is that I end up with the secondary windows taskbar item before the main one. The reason for this is easy: in the OnInitDialog of the main window i create the other windows (and therefore the "fake" windows) whos items show up on the taskbar and then the main window is finished creating (adding its item to the taskbar). I need to recieve a message or something when my main window is finished being created so that then i can create my fake windows. Is there a message or something that will tell me when its finished being created?

Cheers

Share this post


Link to post
Share on other sites