replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - When a Window changes
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 

When a Window changes

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



Joined: 13 Oct 2014
Posts: 1257
Location: Morrison, CO, USA

PostPosted: Thu Aug 22, 2019 5:34 pm    Post subject: When a Window changes Reply with quote

I know how to get the size and position of a window. What I didn't expect is that when the window is minimised the callback returns some pretty weird values. In my case, with two monitors, the position/size returns -32000 for both the X and Y position, and what would appear to be a width and height about equal to the menu bar.

My question is: Is there a way to determine whether the size/position callback has been called as a result of a minimise operation? I see "RESIZE" is a possibility, but it doesn't give me the insight I was looking for. Unless, when minimising, there is always a set value for X and Y, for example.
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


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

PostPosted: Thu Aug 22, 2019 6:43 pm    Post subject: Reply with quote

One possible approach is to call the Windows API function IsIconic. This tells you whether or not the window is currently minimised.
Back to top
View user's profile Send private message AIM Address
LitusSaxonicum



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

PostPosted: Thu Aug 22, 2019 6:51 pm    Post subject: Reply with quote

I think those are the right coordinates - they minimised coords appear to have varied between old Windows versions but stabilised to (-32000, -32000) with NT and later.

There's a function GetWindowPlacement function (MSDN) that can give you the miniised Window coords - worth looking at.

Paul's solution is probably best.

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



Joined: 13 Oct 2014
Posts: 1257
Location: Morrison, CO, USA

PostPosted: Thu Aug 22, 2019 7:36 pm    Post subject: Reply with quote

Paul and Eddie, thanks for the hints. I'll pursue it!
Back to top
View user's profile Send private message Visit poster's website
wahorger



Joined: 13 Oct 2014
Posts: 1257
Location: Morrison, CO, USA

PostPosted: Thu Aug 22, 2019 7:49 pm    Post subject: Reply with quote

IsIconic works great, and since it returns a LOGICAL, easy enough to use!

Thanks!!
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 -> Support 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