forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Always on top

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
IanLambley



Joined: 17 Dec 2006
Posts: 490
Location: Sunderland

PostPosted: Mon Nov 12, 2012 6:19 pm    Post subject: Always on top Reply with quote

Folks,
This is probably a simple question, but how do I create a window in response to a menu command for example and that window will stay on top of the application's main window but not on top of every other application. At the same time I want to have the main menu options available.
I have created a window with a %ww[always_on_top] and finished with a %lw[owned].

It works but it is always on top of everything even when I switch to other applications. I only want it on top of my application.

I am also a "little" confused about parent and child windows, but I'm sure they must have something to do with it.
Please help.
Ian
Back to top
View user's profile Send private message Send e-mail
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Tue Nov 13, 2012 12:15 am    Post subject: Reply with quote

Hi Ian,

I've had some of these questions myself!

Clearwin's always_on_top means always on top of all windows, whether they belong to your application or not. I've never found a way of keeping a window simply at the top of the other windows in its particular application (using Clearwin alone – which is more or less the limit of my abilities), although if a window is modal it does stay on top of other windows in the application because they are all disabled until the modal window is closed. You have to be careful, as several things like %mi and %sy allow such a window to be minimised out of the way. However, the main window’s menu stays disabled.

The key is surely sorting out the Z order of windows ... something that is written up in MSDN – but which looked rather difficult when I read it.

Parent and child windows in Clearwin aren't simply 'this window called that one into existence', but rather that a parent window operates as a container for other windows (children). Pod and peas seems a better analogy. A typical use of this is for example, a multiple document interface MDI program where each 'document' occupied a separate child window. A strength of the parent-child approach is that one minimise action closes the whole lot, whereas separate windows (with %lw) have to be closed one at a time (or at least, not without a great deal of programming). The child windows can all be clones of each other, i.e. all doing the same job but on different documents, or they can all be different with each performing a different job (like floating toolboxes). The child windows all need their own captions, or you need to use the procedures written up by Jalih for moving his clock by the client area (other thread).

Modern versions of MS Office apps have abandoned the pure parent-child approach as in Clearwin, and do an alternative, which is to spawn a new copy of the application for each document. This reverts to the way Windows worked before it had any MDI applications.

If you go down the parent-child window route (as in Clearwin), you need to keep a copy of all main menu grey codes for each window, as making a different child window active means reinstating its menus as they were last time the window was active. (Not always necessary if the windows all have different functions). You may have to ALLOCATE new data structures each time you open a new child window, and DEALLOCATE them when a child window is closed, in order to make MDI programs work smoothly, or have a fixed number of data structures and a maximum number of children.

Eddie
Back to top
View user's profile Send private message
IanLambley



Joined: 17 Dec 2006
Posts: 490
Location: Sunderland

PostPosted: Tue Nov 13, 2012 12:43 am    Post subject: Reply with quote

Eddie,
Thanks, I know it must be possible because lots of the CAD software we use at work does exactly that.
%ww[independent] sort of works, but it vanishes when you click anything in the main window. I has a small saving grace in that it can be located in the taskbar and re-displayed.
What I need is a halfway house between "topmost" and "independent".

It needs to stay over the main application and disappear if that application is minimised, but only over the main application and not everything, my programs are not THAT important!
Regards
Ian
Back to top
View user's profile Send private message Send e-mail
IanLambley



Joined: 17 Dec 2006
Posts: 490
Location: Sunderland

PostPosted: Tue Nov 13, 2012 12:49 am    Post subject: Reply with quote

%ww[toolwindow] seems to do the trick.
To be honest, it makes sense as MicroStation refers to all the windows of this type a "Tools", the terminology must be the same.
Now I have to change loads of programs which would benefit from the effect.
Ian
Back to top
View user's profile Send private message Send e-mail
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Tue Nov 13, 2012 10:39 am    Post subject: Reply with quote

That's interesting. I used toolwindow (doesn't show in taskbar), volatile (disappears when focus is lost) and no_caption, no_border to create pop up windows when I couldn't get %pm to work with %gr (prior to v5.50 where it was fixed). The volatile characteristic must have stopped me from being aware of the useful property of toolwindow making the window "relatively topmost".

My popup windows also use drop shadows, but the option casts_shadow isn't very attractive by Win 7 standards.

Eddie
Back to top
View user's profile Send private message
IanLambley



Joined: 17 Dec 2006
Posts: 490
Location: Sunderland

PostPosted: Tue Nov 13, 2012 7:06 pm    Post subject: Reply with quote

Eddie,
Ah, yes. We do get confused at times. To quote a line from the Hitch Hikers Guide to the Galaxy "Perhaps our minds are too highly tuned!"
Regards
Ian
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group