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 

Minimise an open Window

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



Joined: 13 Oct 2014
Posts: 331
Location: Morrison, CO

PostPosted: Thu Dec 31, 2015 12:13 am    Post subject: Minimise an open Window Reply with quote

I would like to programmatically minimise a window I have created. I do not see any specific function to do this.

Is there one, or will I have to use WiN32API calls to accomplish that?

I'm looking to minimise the status window that opens for you automatically when the WINAPP starts. I have created the window , but putting [minimise] as a %ww option doesn't cause the window to be minimised from the start.

I already have a handle to the window.
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


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

PostPosted: Thu Dec 31, 2015 10:10 am    Post subject: Reply with quote

Try calling ShowWindow(hwnd, SW_SHOWMINIMIZED) with SW_SHOWMINIMIZED = 2. The interface for ShowWindow can be found for example in WIN32API.INS.
Back to top
View user's profile Send private message
LitusSaxonicum



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

PostPosted: Thu Dec 31, 2015 1:39 pm    Post subject: Reply with quote

... and probably the call needs to go into the callback for %sc so that the window is fully formed before it is minimsed.
Back to top
View user's profile Send private message
wahorger



Joined: 13 Oct 2014
Posts: 331
Location: Morrison, CO

PostPosted: Thu Dec 31, 2015 4:05 pm    Post subject: Reply with quote

Thanks, Paul! This was what I was looking for.

Eddie, the callback via %sc was not needed. That said, I will keep it in mind if I run into some asynchronicity issues.

Bill
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