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 

Creating a non-visible window

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



Joined: 04 Nov 2005
Posts: 165
Location: Darkest Devon

PostPosted: Tue May 30, 2006 3:36 am    Post subject: Creating a non-visible window Reply with quote

Is there any way of creating a clearwin window initially hidden, so that its position can be changed (and controls modified) before making it visible without having it flash up in its default location first. I can't just use %sy to set its position as I need to get the window size.

BTW - I need to reposition after creation because its a %di window which is not initially positioned in the centre of the screen, unlike standard clearwin windows (%di windows seem to have their upper-left corner in the centre).

Thanks
Alan
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Tue May 30, 2006 5:51 am    Post subject: Creating a non-visible window Reply with quote

Alan

Have you tried using STYLE DS_CENTER in the script for the dialog?

Otherwise you could set the initial position somewhere way off screen so it cannot be seen.

A better solution may be to use GET_WINDOW_LOCATION@ from a %sc callback. This gives the size as well as the position.
Back to top
View user's profile Send private message AIM Address
acw



Joined: 04 Nov 2005
Posts: 165
Location: Darkest Devon

PostPosted: Tue May 30, 2006 7:08 am    Post subject: Creating a non-visible window Reply with quote

The resource does have STYLE DS_CENTER but this doesn't seem have any effect. Actually I think it does, its just that its the top-left of the dialog that is centred for some reason (is this perhaps a ClearWin buggette with %di windows - I've noticied it before ?).

I currently use GET_WINDOW_LOCATION@ within the dialog startup function and centre it manually which is fine, its just you see it briefly in its original position - hence the query about whether it can be created hidden. I guess creating it somewhere off screen would be a reasonable approach if I can't create it hidden.

I have also tried setting (or rather not setting) the dialog WS_VISIBLE style but the dialog still appears.
Back to top
View user's profile Send private message Visit poster's website
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