views:

206

answers:

2

I maintain an MFC (VC6) MDI application that uses Frame Windows as views for a document. There is only one document at a time but there are several MDI-Frames each with a different view of the document data.

Recently a request came up to be able to keep one of those frame windows on top of the others while being able to interact with the background windows.

  • One idea was to add a "pin-button" to the frame's title bar. During my research I found out that every implementation uses bitmaps instead of for example CButton objects. This starts to get ugly as soon as one uses window colors other than the default-grey let alone UI-Themes.

  • An option in the menu of the frame window (the thing that appears when left-clicking the window icon in the title bar) would be possible but I'm searching for something that is more obvious to the user.

What other possibilities to set this frame window's on-top state are there?

Update

I have decided to go for the solution suggested by Uli as that one works fine with the XP themes. Unfortunately this directly lead me to my next question: How can I actually make the frame window stay on top?

+1  A: 

Maybe this or this helps.

Uli

Ulrich Gerhardt
A: 

Another answer that might help is here:

http://stackoverflow.com/questions/593403/always-in-front-dialogs/593421#593421

Adam Davis